function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function eraseCookie(a){createCookie(a,"",-1);setTimeout("location.reload(true);",0)}function removeItem(a){alert(a)}function updateValues(){setTimeout("location.reload(true);",0)}function addQuote(h,e,d,g,c){strCookie=h+"|"+e+"|"+g+"|"+d;var f=readCookie("quote");skuMatch=0;if(f){f=f.replace(/^\s+|\s+$/g,"");var a=f.split("|");var b=0;while(b<a.length){if(h==a[b]){a[b+2]=g;skuMatch=1}b=b+4}if(skuMatch==1){var b=1;strCookie=a[0];while(b<a.length){strCookie=strCookie+"|"+a[b];b=b+1}}else{strCookie=f+"|"+strCookie}createCookie("quote",strCookie,0)}else{createCookie("quote",strCookie,0)}if(c==1){setTimeout("location.reload(true);",0)}}function addQuoteOption(h,e,d,g,c){QuantityValue=h+"-Q";OptionValue=h+"-O";strCookie=h+"|"+e+" (Option: "+document.getElementById(OptionValue).value.toUpperCase()+")|"+document.getElementById(QuantityValue).value+"|"+d;var f=readCookie("quote");skuMatch=0;if(f){f=f.replace(/^\s+|\s+$/g,"");var a=f.split("|");var b=0;while(b<a.length){if(h==a[b]){a[b+2]=document.getElementById(QuantityValue).value;a[b+1]=e+" (Option: "+document.getElementById(OptionValue).value.toUpperCase()+")";skuMatch=1}b=b+4}if(skuMatch==1){var b=1;strCookie=a[0];while(b<a.length){strCookie=strCookie+"|"+a[b];b=b+1}}else{strCookie=f+"|"+strCookie}createCookie("quote",strCookie,0)}else{createCookie("quote",strCookie,0)}if(c==1){setTimeout("location.reload(true);",0)}}function addQuoteOptionENVIROMUXLDS(h,e,d,g,c){d=51+(9*document.tableform.watersensor.value);strCookie=h+"|"+e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)|"+document.tableform.ldsquantityQ.value+"|"+d;var f=readCookie("quote");skuMatch=0;if(f){f=f.replace(/^\s+|\s+$/g,"");var a=f.split("|");var b=0;while(b<a.length){if(h==a[b]){a[b+3]=d;a[b+2]=document.tableform.ldsquantityQ.value;a[b+1]=e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)";skuMatch=1}b=b+4}if(skuMatch==1){var b=1;strCookie=a[0];while(b<a.length){strCookie=strCookie+"|"+a[b];b=b+1}}else{strCookie=f+"|"+strCookie}createCookie("quote",strCookie,0)}else{createCookie("quote",strCookie,0)}if(c==1){setTimeout("location.reload(true);",0)}}function addQuoteOptionENVIROMUXLD(h,e,d,g,c){d=23+(9*document.tableform.watersensor.value);strCookie=h+"|"+e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)|"+document.tableform.ldquantityQ.value+"|"+d;var f=readCookie("quote");skuMatch=0;if(f){f=f.replace(/^\s+|\s+$/g,"");var a=f.split("|");var b=0;while(b<a.length){if(h==a[b]){a[b+3]=d;a[b+2]=document.tableform.ldquantityQ.value;a[b+1]=e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)";skuMatch=1}b=b+4}if(skuMatch==1){var b=1;strCookie=a[0];while(b<a.length){strCookie=strCookie+"|"+a[b];b=b+1}}else{strCookie=f+"|"+strCookie}createCookie("quote",strCookie,0)}else{createCookie("quote",strCookie,0)}if(c==1){setTimeout("location.reload(true);",0)}}function addQuoteOptionENVIROMUXLDT(h,e,d,g,c){d=23+(9*document.tableform.watersensor.value);strCookie=h+"|"+e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)|"+document.tableform.ldtquantityQ.value+"|"+d;var f=readCookie("quote");skuMatch=0;if(f){f=f.replace(/^\s+|\s+$/g,"");var a=f.split("|");var b=0;while(b<a.length){if(h==a[b]){a[b+3]=d;a[b+2]=document.tableform.ldtquantityQ.value;a[b+1]=e+": "+document.tableform.watersensor.value+" Water Sensor Cable (x-value) and "+document.tableform.wirecables.value+" Wire Cable (y-value)";skuMatch=1}b=b+4}if(skuMatch==1){var b=1;strCookie=a[0];while(b<a.length){strCookie=strCookie+"|"+a[b];b=b+1}}else{strCookie=f+"|"+strCookie}createCookie("quote",strCookie,0)}else{createCookie("quote",strCookie,0)}if(c==1){setTimeout("location.reload(true);",0)}}function displayCookie(c){document.write('<table border="0" align="center"><tr><td align="right">');document.write('<form name="formItems">');document.write('<table cellspacing="0" cellpadding="1" border="1" width="550">');document.write('<tr class="quoteform"><td colspan="5" align="center"><h2>Angebotsanfrage</h2></td></tr>');document.write('<tr class="quoteform">');document.write("<td nowrap><b>Entfernen</b></td>");document.write("<td nowrap><b>NTI Teile-Nr.</b></td>");document.write("<td nowrap><b>Beschreibung</b></td>");document.write("<td><b>Menge</b></td>");document.write("</tr>");var h=readCookie(c);if(h){h=h.replace(/^\s+|\s+$/g,"");var a=h.split("|");var d=0;var b=0;var f=0;var g=0;while(d<a.length){var e=a[d];if(b==0){if(a[d+2]!=0){document.write('<tr class="main-text" onMouseOver="this.bgColor=\'#ffffcc\';" onMouseOut="this.bgColor=\'\';">');document.write("<td>");document.write('<input type="checkbox" value="0" onClick="addQuote(\''+a[d]+"', '"+a[d+1]+"', '"+a[d+2]+"', '0', '1');\">");document.write("</td><td nowrap>");document.write(e);document.write("</td>");g=1}}if(b==1){if(a[d+1]!=0){document.write("<td>");document.write(e);document.write("</td>")}}if(b==2){if(a[d]!=0){document.write("<td>");document.write('<input name="item1" type="text" value="'+a[d]+'" size="4" class="box-yellow" onChange="addQuote(\''+a[d-2]+"', '"+a[d-1]+"', '"+a[d+1]+"', this.value, '0');\">");document.write("</td>");f=f+1}}if(b==3){if(a[d-1]!=0){document.write("</tr>")}}b=b+1;if(b==4){b=0}d=d+1}}document.write('<input type="hidden" name="itemno" value="'+f+'">');document.write("</table></form>");if(g==1){document.write('<br><input type="button" name="update" value="Aktualisieren" onClick="updateValues()">&nbsp;<input type="button" name="clear" value="Alles löschen" onClick="eraseCookie(\'quote\')">')}}function formCookie(c){var h=readCookie(c);if(h){h=h.replace(/^\s+|\s+$/g,"");var a=h.split("|");var d=0;var b=0;var f=0;var g=0;while(d<a.length){var e=a[d];if(b==0){if(a[d+2]!=0){document.write('<input type="hidden" name="sku'+f+'" value="'+e+'">');g=1}}if(b==1){if(a[d+1]!=0){document.write('<input type="hidden" name="description'+f+'" value="'+e+'">')}}if(b==2){if(a[d]!=0){document.write('<input type="hidden" name="qty'+f+'" value="'+e+'">')}}if(b==3){if(a[d-1]!=0){document.write('<input type="hidden" name="price'+f+'" value="'+e+'">');f=f+1}}b=b+1;if(b==4){b=0}d=d+1}}document.write('<input type="hidden" name="itemno" value="'+f+'">')}function ccode(){wordid="cword";imagedir="images/capform/";wordfield=20;randpic=(Math.floor(Math.random()*10))+1;imageid=parseInt(randpic);randomword=["alarm","mouse","share","guide","video","power","alert","ports","audio","cable"];document.write('<table><tr><td><input type="text" id="'+wordid+'" name="'+wordid+'" size="'+wordfield+'"></td>');document.write('<td>&nbsp;<img src="'+decodeURIComponent(imagedir)+"cap-"+imageid+'.jpg" width="100" height="20" alt=""></td>');document.write('<td>&nbsp;<a href="#" onclick="playSound(\'images/capform/cap-'+imageid+'.wav\');"><img src="images/audio.gif" border="0" alt="Play audio and enter the 5 letter word you hear." title="Play audio and enter the 5 letter word you hear."></a></td></tr></table>')}function FormValidation(c,d){ErrorString="";if(d=="formQuote"){cwordentered=document.getElementById(wordid).value;cword=cwordentered.toLowerCase();if(cword==randomword[randpic-1]){}else{ErrorString="Code incorrectly entered, please retry."}}if(d=="formQuote"){AtPos=document.formQuote.email.value.indexOf("@");StopPos=document.formQuote.email.value.lastIndexOf(".");if(AtPos==-1||StopPos==-1){ErrorString="The email address entered is not a valid email address."}if(StopPos<AtPos){ErrorString="The email address entered is not a valid email address."}if(StopPos-AtPos==1){ErrorString="The email address entered is not a valid email address."}if(document.formQuote.email.value==""){ErrorString=""}if(document.formQuote.email.value==""){ErrorString="Please Enter Your Email Address"}if(document.formQuote.email.value!=document.formQuote.confirmemail.value){ErrorString="Email Address and Confirmation Email Address Do Not Match"}}if(d=="formEnvMgr"){AtPos=document.formEnvMgr.email.value.indexOf("@");StopPos=document.formEnvMgr.email.value.lastIndexOf(".");if(AtPos==-1||StopPos==-1){ErrorString="The email address entered is not a valid email address."}if(StopPos<AtPos){ErrorString="The email address entered is not a valid email address."}if(StopPos-AtPos==1){ErrorString="The email address entered is not a valid email address."}if(document.formEnvMgr.email.value==""){ErrorString=""}if(document.formEnvMgr.email.value==""){ErrorString="Please Enter Your Email Address"}if(document.formEnvMgr.email.value!=document.formEnvMgr.confirmemail.value){ErrorString="Email Address and Confirmation Email Address Do Not Match"}}if(d=="formEnvMgr"&&ErrorString==""){if(document.formEnvMgr.fname.value==""){ErrorString=ErrorString+"First Name, "}if(document.formEnvMgr.lname.value==""){ErrorString=ErrorString+"Last Name, "}if(document.formEnvMgr.company.value==""){ErrorString=ErrorString+"Company, "}if(document.formEnvMgr.company.value==""){ErrorString=ErrorString+"Address, "}if(document.formEnvMgr.company.value==""){ErrorString=ErrorString+"City, "}if(document.formEnvMgr.company.value==""){ErrorString=ErrorString+"Country, "}if(document.formEnvMgr.serial.value==""){ErrorString=ErrorString+"ENVIROMUX Software Serial Number, "}if(document.formEnvMgr.machineid.value==""){ErrorString=ErrorString+"Machine ID, "}if(document.formEnvMgr.edition.value==""){ErrorString=ErrorString+"ENVIROMUX Software Edition, "}if(ErrorString!=""){ErrorString="Please enter values for: "+ErrorString;ErrorString=ErrorString.substring(0,ErrorString.length-2)}}if(d=="formEnvMgr"){for(var b=0;b<document.formEnvMgr.eula.length;b++){if(document.formEnvMgr.eula[b].checked){var a=document.formEnvMgr.eula[b].value}}if(a=="no"){ErrorString="You Must Agree to the End User License Agreement to Sumbit your License Request"}}if(ErrorString!=""){alert(ErrorString)}if(ErrorString==""){c.submit()}}function writeHelp(a){if(a=="serialhelp"){msgstring='<br><table border="0" width="500" align="center" cellspacing="2" cellpadding="2" bgcolor="#cccccc"><tr bgcolor="#ffffff"><td class="med-text"><br>Your ENVIROMUX Management Software serial number is available in the order confirmation email.<br><br><div align="right"><a href="javascript:writeHelp(\'serialhelp-close\');">Close</a>&nbsp;&nbsp;</td></tr></table></div><br>'}if(a=="serialhelp-close"){msgstring="";a="serialhelp"}if(a=="machineidhelp"){msgstring='<br><table border="0" width="500" align="center" cellspacing="2" cellpadding="2" bgcolor="#cccccc"><tr bgcolor="#ffffff"><td class="med-text"><br>To obtain the Machine ID, open the Server software to the main menu, click on the “Help” link, then click on the “Install License” tab. The Machine ID is shown as the first item listed.<br><br><div align="center"><img src="images/enviro-ms-menu.jpg" alt="Main Menu Screen"><br><br><img src="images/enviro-ms-activate.jpg" alt="License Activation Screen"></div><br><br><div align="right"><a href="javascript:writeHelp(\'machineidhelp-close\');">Close</a>&nbsp;&nbsp;</td></tr></table></div><br>'}if(a=="machineidhelp-close"){msgstring="";a="machineidhelp"}if(document.layers){textlayer=document.layers[a];textlayer.document.open();textlayer.document.write(msgstring);textlayer.document.close()}if(document.all){textlayer=document.all[a];textlayer.innerHTML=msgstring}if(document.getElementById){textlayer=document.getElementById(a);textlayer.innerHTML=msgstring}}function InitCable(){document.tableform.watersensor.value="1 foot (0.3 meter)";document.tableform.wirecables.value="5 foot (1.5 meter)"}function SaveFormData(a){SavedValue=a}function CableSelect(){write_layer("ldsprice");write_layer("ldsoptions")}function VerifyNumericRange(c,b){ErrorString="";var a=/^[0-9]+$/;if(b.match(a)){if(c=="ldsquantity"){write_layer("ldsoptions")}}else{ErrorString="Only Numeric Values may be entered for this field."}if(ErrorString!=""){alert(ErrorString);if(c=="ldsquantity"){document.tableform.ldsquantity.value=SavedValue}ErrorString=""}}function write_layer(a){if(a=="ldsprice"){Price=23+(9*document.tableform.watersensor.value);msgstring=Price;if(document.layers){textlayer=document.layers[a];textlayer.document.open();textlayer.document.write(msgstring);textlayer.document.close()}if(document.all){textlayer=document.all[a];textlayer.innerHTML=msgstring}if(document.getElementById){textlayer=document.getElementById(a);textlayer.innerHTML=msgstring}}if(a=="ldsoptions"){document.tableform.ldsquantityweb.value=document.tableform.ldsquantity.value;document.tableform.watersensorweb.value="watcble"+document.tableform.watersensor.value;document.tableform.wirecablesweb.value="wirecble"+document.tableform.wirecables.value}}function InitCableLD(){document.tableform.watersensor.value="1 foot (0.3 meter)";document.tableform.wirecables.value="5 foot (1.5 meter)"}function CableSelectLD(){write_layer2("ldprice");write_layer2("ldoptions")}function VerifyNumericRangeLD(c,b){ErrorString="";var a=/^[0-9]+$/;if(b.match(a)){if(c=="ldquantity"){write_layer2("ldoptions")}}else{ErrorString="Only Numeric Values may be entered for this field."}if(ErrorString!=""){alert(ErrorString);if(c=="ldquantity"){document.tableform.ldquantity.value=SavedValue}ErrorString=""}}function write_layer2(a){if(a=="ldprice"){Price=23+(9*document.tableform.watersensor.value);msgstring=Price;if(document.layers){textlayer=document.layers[a];textlayer.document.open();textlayer.document.write(msgstring);textlayer.document.close()}if(document.all){textlayer=document.all[a];textlayer.innerHTML=msgstring}if(document.getElementById){textlayer=document.getElementById(a);textlayer.innerHTML=msgstring}}if(a=="ldoptions"){document.tableform.ldquantityweb.value=document.tableform.ldquantity.value;document.tableform.watersensorweb.value="watcble"+document.tableform.watersensor.value;document.tableform.wirecablesweb.value="wirecble"+document.tableform.wirecables.value}}function InitCableLDT(){document.tableform.watersensor.value="1 foot (0.3 meter)";document.tableform.wirecables.value="5 foot (1.5 meter)"}function CableSelectLDT(){write_layer3("ldtprice");write_layer3("ldtoptions")}function VerifyNumericRangeLDT(c,b){ErrorString="";var a=/^[0-9]+$/;if(b.match(a)){if(c=="ldtquantity"){write_layer3("ldtoptions")}}else{ErrorString="Only Numeric Values may be entered for this field."}if(ErrorString!=""){alert(ErrorString);if(c=="ldtquantity"){document.tableform.ldtquantity.value=SavedValue}ErrorString=""}}function write_layer3(a){if(a=="ldtprice"){Price=23+(9*document.tableform.watersensor.value);msgstring=Price;if(document.layers){textlayer=document.layers[a];textlayer.document.open();textlayer.document.write(msgstring);textlayer.document.close()}if(document.all){textlayer=document.all[a];textlayer.innerHTML=msgstring}if(document.getElementById){textlayer=document.getElementById(a);textlayer.innerHTML=msgstring}}if(a=="ldtoptions"){document.tableform.ldtquantityweb.value=document.tableform.ldtquantity.value;document.tableform.watersensorweb.value="watcble"+document.tableform.watersensor.value;document.tableform.wirecablesweb.value="wirecble"+document.tableform.wirecables.value}}function optionQty(a,b){document.getElementById(a).value=b};
