function ebi(id) { return document.getElementById(id); } function str_replace( from, to, text ) { var old_text = ""; while( old_text != text ) { old_text = text; text = text.replace( from, to ); } return text; } function up( gotobj, lfaction ) { if( typeof( gotobj ) != "number" ) { id = ( gotobj.parentNode.id.replace( "cplace", "" ) ); } else { id = gotobj; } if( ebi( "cplace"+(id-1) ) ) { temp = ebi( "cplace"+(id-1) ).innerHTML; ebi( "cplace"+(id-1) ).innerHTML = ebi( "cplace"+(id) ).innerHTML; ebi( "cplace"+(id) ).innerHTML = temp; } save_order( lfaction ); return false; } function down( gotobj, lfaction ) { id = gotobj.parentNode.id.replace( "cplace", "" ); id = (parseFloat(id)+1); if( ebi( "cplace"+(id) ) ) up( id, lfaction ); return false; } function save_order( lfaction ) { id = 1; //sorder = ""; if( typeof( order_top ) != "undefined" ) { order_field = "torder"; } else { order_field = "order"; } while( ebi( "cplace"+id ) ) { rowid = ebi( "cplace"+id ).innerHTML.split( "||" ); rowid = rowid[1]; var uri = "lfaction.php?lfaction="+lfaction+"&lfupdate=yes&lfupdate_id="+rowid+"&"+order_field+"="+id; ajax_call( uri ); //sorder += "lfaction.php?lfaction="+lfaction+"&lfupdate=yes&lfupdate_id="+rowid+"&order="+id+"\n"; id++; } //alert( sorder); } function ajax_call( url ) { if(window.XMLHttpRequest) req = new XMLHttpRequest(); if(window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP"); req.open("GET", url, true); req.setRequestHeader("content-type","application/x-www-form-urlencoded"); req.send(null); } function order_update_status( rid, sel_obj ) { ebi( "order_update" ).lfupdate_id.value = rid; ebi( "order_update" ).status.value = sel_obj.options[sel_obj.selectedIndex].text; ebi( "order_update" ).submit(); } function product_view(menu_obj) { var show = menu_obj.id.replace( "m_", "" ); var parts = Array( "tech","benefits","main","options" ); for( i in parts ) { var name = parts[i]; if( show == name ) { document.getElementById( "m_"+name ).className = "active"; document.getElementById( name ).style.display = "block"; } else { document.getElementById( "m_"+name ).className = ""; document.getElementById( name ).style.display = "none"; } } return false; } p_status = false; function products_scale(pid) { if( typeof( pid ) == "undefined" ) pid = ""; prpid = pid; p_status = !p_status; if( typeof( p_width ) == "undefined" ) { p_width = document.getElementById( "product_image"+pid ).offsetWidth; p_height = document.getElementById( "product_image"+pid ).offsetHeight; pcur = 1; } pspd = 0.01; if( p_status ) { document.getElementById( "product_image"+pid ).style.boxShadow = "0 0 20px black"; pup(); } else { document.getElementById( "product_image"+pid ).style.boxShadow = ""; pdn(); } } function pup() { pspd += 0.01; pcur += pspd; if( pcur <= 3.5 ) { setTimeout("pup()", 40 ); } document.getElementById( "product_image"+prpid ).style.width = Math.round( p_width*pcur )+"px"; document.getElementById( "product_image"+prpid ).style.height = Math.round( p_height*pcur )+"px"; } function pdn() { pspd += 0.01; pcur -= pspd; if( pcur > 1 ) { setTimeout("pdn()", 40 ); } else { pcur = 1; } document.getElementById( "product_image"+prpid ).style.width = Math.round( p_width*pcur )+"px"; document.getElementById( "product_image"+prpid ).style.height = Math.round( p_height*pcur )+"px"; } last_fid = 0; fl_div = 2; function flsh(id) { if( typeof( fto ) != "undefined" ) { clearTimeout(fto); delete(fto); } if( id != last_fid ) { fl_div++; if( fl_div == 3 ) fl_div = 1; if( fl_div == 1 ) fl_nx = 2; if( fl_div == 2 ) fl_nx = 1; if( last_fid == 0 ) last_fid = id+1; if( last_fid == 4 ) last_fid = 1; // var flash_src = "design/somet_he/flash/"+last_fid+""+id+".swf"; var flash_src = "design/somet_he/flash/"+id+".swf"; flopac = 100; flin = ''; last_fid = id; document.getElementById( "photo"+fl_div).style.zIndex = 1; document.getElementById( "photo"+fl_nx ).style.zIndex = 2; document.getElementById( "photo"+fl_div).innerHTML = flin; setTimeout( "flsh_switch()", 500 ); } } function flsh_switch() { document.getElementById( "photo"+fl_div).style.zIndex = 2; document.getElementById( "photo"+fl_nx ).style.zIndex = 1; } function flsh_end_real() { fl_div++; if( fl_div == 3 ) fl_div = 1; if( fl_div == 1 ) fl_nx = 2; if( fl_div == 2 ) fl_nx = 1; var flash_src = "design/somet_he/flash/all.swf"; document.getElementById( "photo"+fl_div).style.zIndex = 1; document.getElementById( "photo"+fl_nx ).style.zIndex = 2; document.getElementById( "photo"+fl_div).innerHTML = ''; last_fid = 0; setTimeout( "flsh_switch()", 500 ); } function flsh_end() { fto = setTimeout( "flsh_end_real()", 1000 ); } function start_search(form_obj) { form_obj.q.value = "site:sometltd.co.il "+form_obj.q.value; search_form = form_obj; setTimeout( "endsearch()", 500 ); } function endsearch() { var url = search_form.q.value+""; search_form.q.value = url.replace( "site:sometltd.co.il ", ""); }function showgal() { if( document.getElementById( "product_1" ) ) { products_width = document.getElementById( "p_width" ).offsetWidth; product_width = document.getElementById( "product_1" ).offsetWidth; pr_products = Math.floor( products_width/product_width ); if( !ebi( "product_"+(pr_products+1) ) ) { ebi( "pr_right" ).style.display = "none"; } ebi( "pr_left" ).style.display = "none"; pr_pos = 0; pr_prod = 1; } else { if( ebi( "pr_right" ) ) ebi( "pr_right" ).style.display = "none"; if( ebi( "pr_left" ) ) ebi( "pr_left" ).style.display = "none"; } } setTimeout( "showgal()", 200 ); p_lock = false; function pr_move_right() { pr_speed += 0.1; pr_pos += pr_speed; if( pr_pos <= pr_to ) { setTimeout( "pr_move_right()", 40 ); } else { pr_pos = pr_to; if( !document.getElementById( "product_"+(pr_prod+pr_products+1 ) ) ) { ebi( "pr_right" ).style.display = "none"; } p_lock = false; ebi( "pr_left" ).style.display = "block"; } document.getElementById( "products_scroll" ).style.right = (-pr_pos)+"px"; } function p_right() { if( p_lock == false && document.getElementById( "product_"+(pr_prod+1 ) ) ) { p_lock = true; pr_prod += 1; pr_to = pr_pos+product_width; pr_speed = 3; pr_move_right(); } return false; } function pr_move_left() { pr_speed += 0.1; pr_pos -= pr_speed; if( pr_pos >= pr_to ) { setTimeout( "pr_move_left()", 40 ); } else { pr_pos = pr_to; if( !document.getElementById( "product_"+(pr_prod-1 ) ) ) { ebi( "pr_left" ).style.display = "none"; } p_lock = false; ebi( "pr_right" ).style.display = "block"; } document.getElementById( "products_scroll" ).style.right = (-pr_pos)+"px"; } function p_left() { if( p_lock == false && pr_prod != 1 ) { p_lock = true; pr_prod -= 1; pr_to = pr_pos-product_width; pr_speed = 3; pr_move_left(); } return false; }/* To use: Depencies: In website footer: ------------------
In Image place: ---------------