var timerId; function menu21Item(id, active) { clearTimeout(timerId); // clearInterval(); timerId = setTimeout("menu21Item1("+active+")", 3000); for (i=1;i<5;i++) if (i!=id) document.all["menu21_item"+i].src="/common/1/menu21_item"+i+".jpg"; document.all["menu21_item"+id].src="/common/1/menu21_item"+id+"_active.jpg"; for (i=1;i<6;i++) if (i!=id) document.all["menu22_"+i].style.display="none"; document.all["menu22_"+id].style.display="block"; } function menu21Item1(id) { for (i=1;i<5;i++) if (i!=id) document.all["menu21_item"+i].src="/common/1/menu21_item"+i+".jpg"; if (id<5) document.all["menu21_item"+id].src="/common/1/menu21_item"+id+"_active.jpg"; for (i=1;i<5;i++) if (i!=id) document.all["menu22_"+i].style.display="none"; document.all["menu22_"+id].style.display="block"; } function insertFlash2(bnFlash,bnW,bnH,flashV,params,nocashe,bgcolor){ var rnd = Math.round(Math.random()*1048576); var flashID=bnFlash; if (bnFlash.indexOf('/')!=-1){ flashID=bnFlash.split('/'); flashID=flashID[flashID.length-1]; } flashID=flashID.split('.'); flashID=flashID[0]; var flashHtm=''; flashHtm+=''; flashHtm+=''; flashHtm+=(nocashe)?'':''; flashHtm+=''; flashHtm+=''; if (!bgcolor){ flashHtm+=''; flashHtm+=''; }else{ flashHtm+=''; flashHtm+=''; } flashHtm+=''; document.write(flashHtm); } function shop_object_description(url){window.open(url,'','scrollbars=1,resizable=1,width=800,height=700,status=no,toolbar=no,menubar=no');} function shop_vent_object_description(url){window.open(url,'','scrollbars=1,resizable=1,width=800,height=700,status=no,toolbar=no,menubar=no');} function show_hide(element) { if (document.all[element].style.display=='block') { document.all[element].style.display='none'; document.all["calculation_img"].src='/common/calculation/001_show.gif'; } else { document.all[element].style.display='block'; document.all["calculation_img"].src='/common/calculation/001_hide.gif'; } } function show_hide1(element) { if (document.all[element].style.display=='block') { document.all[element].style.display='none'; } else { document.all[element].style.display='block'; } } function show_hide2(element) { if (document.all[element].style.display=='block') { document.all[element].style.display='none'; document.all["generic_page_img1"].src='/common/1/_002_y1.gif'; } else { document.all[element].style.display='block'; document.all["generic_page_img1"].src='/common/1/_002_y2.gif'; } } function show_hide3(element) { if (document.all[element].style.display=='block') { document.all[element].style.display='none'; document.all[element+"_img"].src='/common/1/__plus.gif'; } else { document.all[element].style.display='block'; document.all[element+"_img"].src='/common/1/__minus.gif'; } } function show_hide4(element) { if (document.all[element].style.display=='block') { document.all[element].style.display='none'; document.all[element+"_img"].src='/common/1/button__show1.gif'; } else { document.all[element].style.display='block'; document.all[element+"_img"].src='/common/1/button__hide1.gif'; } } // ============================================================================= function zzz0_1() { document.all['zzz0'].style.display='block'; document.all['zzz1'].style.display='none'; document.all['zzz2'].style.display='none'; document.all['zzz3'].style.display='none'; document.all['zzz5'].style.display='none'; document.all["zzz0_img"].src='/common/t05/0_active.gif'; document.all["zzz1_img"].src='/common/t05/1_after_active.gif'; document.all["zzz3_img"].src='/common/t05/3_after_passive.gif'; document.all["zzz5_img"].src='/common/t05/5_after_passive.gif'; } function zzz1_1() { document.all['zzz0'].style.display='none'; document.all['zzz1'].style.display='block'; document.all['zzz2'].style.display='none'; document.all['zzz3'].style.display='none'; document.all['zzz5'].style.display='none'; document.all["zzz0_img"].src='/common/t05/0.gif'; document.all["zzz1_img"].src='/common/t05/1_active.gif'; document.all["zzz3_img"].src='/common/t05/3_after_active.gif'; document.all["zzz5_img"].src='/common/t05/5_after_passive.gif'; } function zzz2_1() { document.all['zzz0'].style.display='none'; document.all['zzz1'].style.display='none'; document.all['zzz2'].style.display='block'; document.all['zzz3'].style.display='none'; document.all['zzz5'].style.display='none'; document.all["zzz0_img"].src='/common/t05/0.gif'; document.all["zzz1_img"].src='/common/t05/1_after_passive.gif'; document.all["zzz3_img"].src='/common/t05/3_active.gif'; document.all["zzz5_img"].src='/common/t05/5_after_active.gif'; } function zzz4_1() { document.all['zzz0'].style.display='none'; document.all['zzz1'].style.display='none'; document.all['zzz2'].style.display='none'; document.all['zzz3'].style.display='none'; document.all['zzz5'].style.display='block'; document.all["zzz0_img"].src='/common/t05/0.gif'; document.all["zzz1_img"].src='/common/t05/1_after_passive.gif'; document.all["zzz3_img"].src='/common/t05/3_after_passive.gif'; document.all["zzz5_img"].src='/common/t05/5_active.gif'; } // ============================================================================= function yyy1() { document.all['yyy1'].style.display='block'; document.all['yyy2'].style.display='none'; document.all["yyy1_img"].src='/common/1/cold__select__active.gif'; document.all["yyy2_img"].src='/common/1/cold__calculate__inactive.gif'; } function yyy2() { document.all['yyy1'].style.display='none'; document.all['yyy2'].style.display='block'; document.all["yyy1_img"].src='/common/1/cold__select__inactive.gif'; document.all["yyy2_img"].src='/common/1/cold__calculate__active.gif'; } function getRadioGroupValue(radioGroupObj) { for (var i=0; i < radioGroupObj.length; i++) if (radioGroupObj[i].checked) return radioGroupObj[i].value; return null; } function f2011051101(img, id) { document.getElementById('comparsion_link1').style.display = "block"; document.getElementById('comparsion_link2').style.display = "block"; img.src='/comparsion/add.php?id='+id; img.onclick = function() { window.open("/comparsion/", "comparsion"); } // /?c=9&action=shop_comparsion window.open("/comparsion/", "comparsion"); } function f2011052601(img, id) { alert('Копирование материалов сайта возможно только с письменного разрешения компании Поколение'); return false; } function strpos (haystack, needle, offset) { var i = (haystack + '').indexOf(needle, (offset || 0)); return i === -1 ? false : i; } function strlen (string) { var str = string + ''; var i = 0, chr = '', lgth = 0; if (!this.php_js || !this.php_js.ini || !this.php_js.ini['unicode.semantics'] || this.php_js.ini['unicode.semantics'].local_value.toLowerCase() !== 'on') { return string.length; } var getWholeChar = function (str, i) { var code = str.charCodeAt(i); var next = '', prev = ''; if (0xD800 <= code && code <= 0xDBFF) { // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single characters) if (str.length <= (i + 1)) { throw 'High surrogate without following low surrogate'; } next = str.charCodeAt(i + 1); if (0xDC00 > next || next > 0xDFFF) { throw 'High surrogate without following low surrogate'; } return str.charAt(i) + str.charAt(i + 1); } else if (0xDC00 <= code && code <= 0xDFFF) { // Low surrogate if (i === 0) { throw 'Low surrogate without preceding high surrogate'; } prev = str.charCodeAt(i - 1); if (0xD800 > prev || prev > 0xDBFF) { //(could change last hex to 0xDB7F to treat high private surrogates as single characters) throw 'Low surrogate without preceding high surrogate'; } return false; // We can pass over low surrogates now as the second component in a pair which we have already processed } return str.charAt(i); }; for (i = 0, lgth = 0; i < str.length; i++) { if ((chr = getWholeChar(str, i)) === false) { continue; } // Adapt this line at the top of any loop, passing in the whole string and the current iteration and returning a variable to represent the individual character; purpose is to treat the first part of a surrogate pair as the whole character and then ignore the second part lgth++; } return lgth;} function search_patch() { tmp = document.search_form.query_string.value; if ((tmp=='lg') || (tmp=='LG') || (tmp=='Lg') || (tmp=='lG')) { document.location = "/?c=kondicionery&producer_id=51"; } else { a1 = tmp.substr(0, strpos(tmp, "-")); a2 = tmp.substr(strpos(tmp, "-")+1, strlen(tmp)-strpos(tmp, "-")-1 ); if ( (!isNaN(a1)) && (!isNaN(a2)) && (a1!="") && (a2!="") ) { if (a1 == 0) { document.location = "/search/search1.php?c=kondicionery&id="+a2; } if ( (a1 > 0 ) && (a1 < 10) ) { document.location = "/search/search1.php?c=ventilyaciya&action=shop00"+a1+"&id="+a2; } if ( (a1 > 9 ) && (a1 < 30) ) { document.location = "/search/search1.php?c=ventilyaciya&action=shop0"+a1+"&id="+a2; } /* if (a1 == "0") { document.location = "/kondicionery/id-"+a2+".html"; } if ( (a1 > 0 ) && (a1 < 10) ) { document.location = "/ventilyaciya/action-shop00"+a1+"/id-"+a2+".html"; } if ( (a1 > 9 ) ) // && (a1 < 18) { document.location = "/ventilyaciya/action-shop0"+a1+"/id-"+a2+".html"; } */ } else { document.getElementById('search_form').submit(); } } }