var browser={isKHTML: false, isGecko: false, isIE: false, isIE5: false, isOpera: false, isSafe:null}; with (browser) { isKHTML = navigator.userAgent.indexOf("KHTML")>=0; isGecko = (!isKHTML) && navigator.product == "Gecko"; isIE = (!isGecko) && navigator.cpuClass != undefined && navigator.appName == "Microsoft Internet Explorer"; isIE5 = isIE && (!Function.apply); ifIE55 = isIE && (document.onmousewheel == undefined); isOpera = (!(isIE || isGecko || isKHTML)) && document.attachEvent != undefined; isSafe = document.getElementById != undefined && (!isIE5) && (document.addEventListener != undefined || document.attachEvent != undefined); } if (browser.isIE){ document.write(''); } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i"z") && (e.charAt(i)<"0" || e.charAt(i)>"9") && e.charAt(i)!="_" && e.charAt(i)!="-"){ error = true; break; } } error = (count==0) ? true : error; error = (ch==0) ? error : true; return !error; } function ShowPhoto(photoname, w, h) { url = "/showphoto.php?img="+photoname; Win=window.open(url, 'viewPhoto', 'toolbar=0,scrollbars=0,location=0,directories=0,status=0,menubar=0,resizable=0,width='+w+',height='+h+',border=thin,top=50,left=50,help=0'); Win.focus(); } function ShowProduct(productid) { url = "http://merlion.ru/goods/catalog/product/" + productid + "/"; Win=window.open(url, productid, 'toolbar=0,scrollbars=1,location=0,directories=0,status=0,menubar=0,resizable=1,width=770,height=500,border=thin,top=50,left=50,help=0'); Win.focus(); } function WriteUsFormCheck(){ email = document.WriteUsForm["email"].value; name = document.WriteUsForm["name"].value; product = document.WriteUsForm["product"].value; sn = document.WriteUsForm["sn"].value; topic = document.WriteUsForm["topic"].value; problemtext = document.WriteUsForm["problemtext"].value; if (name != "" && topic != "" && problemtext != "" && sn != "" && product != ""){ if (CheckEmail(email)){ document.WriteUsForm.submit(); } else{ alert('Введите, пожалуйста, корректный e-mail.'); } } else{ alert('Заполнены не все обязательные для заполнения поля!'); } } function JoinUsFormCheck(){ var b = true; email = document.JoinUsForm["email"].value; companyName = document.JoinUsForm["companyName"].value; country = document.JoinUsForm["country"].value; city = document.JoinUsForm["city"].value; address = document.JoinUsForm["address"].value; phone = document.JoinUsForm["phone"].value; www1 = document.JoinUsForm["www1"].value; if (document.JoinUsForm["companyProfile1"].checked || document.JoinUsForm["companyProfile2"].checked || document.JoinUsForm["companyProfile3"].checked){} else{ b = false; } if (companyName != "" && email != "" && country != "" && city != "" && address != "" && phone != "" && www1 != "" && b){ if (CheckEmail(email)){ document.JoinUsForm.submit(); } else{ alert('Введите, пожалуйста, корректный e-mail.'); } } else{ alert('Заполнены не все обязательные для заполнения поля!'); } } function ContactFormCheck(){ var b = true; email = document.ContactForm["email"].value; name = document.ContactForm["name"].value; topic = document.ContactForm["topic"].value; topic = document.ContactForm["topic"].value; messagetext = document.ContactForm["messagetext"].value; if (name != "" && topic != "" && messagetext != "" && email != ""){ if (CheckEmail(email)){ document.ContactForm.submit(); } else{ alert('Введите, пожалуйста, корректный e-mail.'); } } else{ alert('Заполнены не все обязательные для заполнения поля!'); } } function SubscribeFormCheck(){ email=document.SubscribeForm["email"].value; if (CheckEmail(email)){ document.SubscribeForm.submit(); } else{ alert('Введите, пожалуйста, корректный e-mail.'); } } function CopyToClipboard(fldname){ document.frm[fldname].select(); var rng = document.selection.createRange(); clipboardData.setData("Text",rng.text); } var DOM = (typeof(document.getElementById) != 'undefined'); function SelectAll(Name){ if (DOM) { thisCheckBoxes = document.getElementsByTagName('input'); for (i = 1; i < thisCheckBoxes.length; i++) { if (thisCheckBoxes[i].name == Name){ thisCheckBoxes[i].checked = true; } } } } function UnSelectAll(Name){ if (DOM) { thisCheckBoxes = document.getElementsByTagName('input'); for (i = 1; i < thisCheckBoxes.length; i++) { if (thisCheckBoxes[i].name == Name){ thisCheckBoxes[i].checked = false; } } } } function ShowCompare(Name) { var valid = false; var items = ""; if (DOM) { thisCheckBoxes = document.getElementsByTagName('input'); for (i = 1; i < thisCheckBoxes.length; i++) { if (thisCheckBoxes[i].name == Name){ if (thisCheckBoxes[i].checked == true){ valid = true; items = items + thisCheckBoxes[i].value + ","; } } } } if (valid){ var url = "../goods/catalog/compare/index.html"; Win=window.open(null, "hCompare", 'toolbar=0,scrollbars=1,location=0,directories=0,status=0,menubar=0,resizable=1,width=770,height=500,border=thin,top=50,left=50,help=0'); document.forms['ProductsForm'].action = url; document.forms['ProductsForm'].CompareItems.value = items; document.forms['ProductsForm'].submit() Win.focus(); } } function ShowItem(itemid) { url = "http://positronica.ru/goods/catalog/" + itemid + "/"; Win=window.open(url, itemid, 'toolbar=0,scrollbars=1,location=0,directories=0,status=0,menubar=0,resizable=1,width=850,height=550,border=thin,top=50,left=50,help=0'); Win.focus(); }