﻿var homeMsg="WELCOME TO BAY STANDARD MANUFACTURING, INC!";var url="http://www.baystandard.com/GenerateContent.aspx?";var http=getHTTPObject();var submitting=0;var logOff=0;function handleHttpResponse(){if(http.readyState==4){inxjsContent=http.responseText.split("^^^");document.title=""+inxjsContent[1]+"";document.getElementById('sideAnchor').innerHTML=inxjsContent[2];document.getElementById('contentAnchor').innerHTML=inxjsContent[0];document.getElementById('msgAnchor').innerHTML="";fixSizes();submitting=0}};function sendHttpResponse(){http.onreadystatechange=handleHttpResponse;http.send(null)};function getHTTPObject(){var a;if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){return new ActiveXObject('Microsoft.XMLHTTP')};if(!a&&typeof XMLHttpRequest!='undefined')try{a=new XMLHttpRequest()}catch(e){a=false}return a};function historyChange(a,b){wait();if(!(window.location.href.indexOf("https://")==-1)){wait();window.location.href="default.aspx?page=Cart"}else{wait();var c="";var d=(typeof b=="object"&&b!=null?historyStorage.toJSON(b):b);if(d==null){if(!(window.location.href.indexOf("#pageundefined")==-1)){c=window.location.href.replace("#pageundefined","");window.location.href=c}else{c=window.location.href.split("#page%3D");if(!(c[1]=="undefined"||c[1]==null||c[1]=="")){d="page%3D"+c[1];http.open("GET",url+unescape(d),true);sendHttpResponse()}else{window.location.href=window.location.href.replace("#","")}}}else{if(d=="pageundefined"){c=window.location.href.replace("#pageundefined","");window.location.href=c}else{http.open("GET",url+unescape(d),true);sendHttpResponse()}}}};function wait(){if((getIEVersionNumber()>=7)||(getFFVersionNumber()>=1)){document.getElementById('msgAnchor').innerHTML="<div style='z-index:21474836;position:relative;top:-40px;left:58px;'><img src='http://www.baystandard.com/images/wait.gif' /></div>"}};function ship(){if((getIEVersionNumber()>=7)||(getFFVersionNumber()>=1)){document.getElementById('msgAnchor').innerHTML="<div style='z-index:21474836;position:relative;top:-40px;left:58px;'><img src='http://www.baystandard.com/images/ship.gif' /></div>"}else{}};function updateWait(){if((getIEVersionNumber()>=7)||(getFFVersionNumber()>=1)){document.getElementById('msgAnchor').innerHTML="<img src='http://www.baystandard.com/images/updateBox.gif'><div style='z-index:2147483;position:relative;top:-40px;left:58px;'><img src='http://www.baystandard.com/images/wait.gif' ></div>"}};function fixSizes(){document.getElementById('contentAnchor').style.height='100%';document.getElementById('sideAnchor').style.height=document.getElementById('contentAnchor').offsetHeight+"px";if(document.getElementById('contentAnchor').offsetHeight<800){document.getElementById('sideAnchor').style.height='800px';document.getElementById('contentAnchor').style.height='800px'}};function cleanTitle(a){a=a.replace(/\%20/gi," ");a=a.replace(/\%26/gi,"&");a=a.replace(/\%2C/gi,",");a=a.replace(/\%3B/gi,":");a=a.replace(/\%2F/gi,"/");a=a.replace(/\%3A/gi,";");a=a.replace(/\%3F/gi,"?");a=a.replace(/\%7C/gi,"|");a=a.replace(/\%3D/gi,"=");a=a.replace(/\%23/gi,"");return a};function disableEnterKey(a){var b;if(window.event)b=window.event.keyCode;else b=a.which;return(b!=13)};function getIEVersionNumber(){var a=navigator.userAgent;var b=a.indexOf("MSIE ");if(b==-1){return 0}else{return parseFloat(a.substring(b+5,a.indexOf(";",b)))}};function getFFVersionNumber(){var a=navigator.userAgent;var b=a.indexOf("Firefox")+8;if(b==-1){return 0}else{return parseInt(a.charAt(b))}};function getQuerystring(a,b){if(b==null)b="";a=a.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)");var d=unescape(window.location.href.replace(/#/,"?"));d=d.replace("%3D","=");d=d.replace("%26","&");var f=c.exec(d);if(f==null)return b;else return f[1]};var timeout=0;var closetimer=0;var ddmenuitem=0;function mopen(a){mcancelclosetime();if(ddmenuitem){ddmenuitem.style.visibility="hidden"}ddmenuitem=document.getElementById(a);ddmenuitem.style.visibility="visible"}function mclose(){if(ddmenuitem){ddmenuitem.style.visibility="hidden"}}function mclosetime(){closetimer=window.setTimeout(mclose,timeout)}function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null}}document.onclick=mclose;function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++){b.src=b.oSrc}}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p){a.MM_p=new Array()}var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++){if(d[b].indexOf("#")!=0){a.MM_p[c]=new Image;a.MM_p[c++].src=d[b]}}}}function MM_findObj(a,b){var c,d,f;if(!b){b=document}if((c=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(c+1)].document;a=a.substring(0,c)}if(!(f=b[a])&&b.all){f=b.all[a]}for(d=0;!f&&d<b.forms.length;d++){f=b.forms[d][a]}for(d=0;!f&&b.layers&&d<b.layers.length;d++){f=MM_findObj(a,b.layers[d].document)}if(!f&&b.getElementById){f=b.getElementById(a)}return f}function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=new Array;for(a=0;a<(d.length-2);a+=3){if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc){c.oSrc=c.src}c.src=d[a+2]}}}var timeout=0;var closetimer=0;var ddmenuitem=0;function mopen(a){mcancelclosetime();if(ddmenuitem){ddmenuitem.style.visibility="hidden"}ddmenuitem=document.getElementById(a);ddmenuitem.style.visibility="visible"}function mclose(){if(ddmenuitem){ddmenuitem.style.visibility="hidden"}}function mclosetime(){closetimer=window.setTimeout(mclose,timeout)}function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null}}document.onclick=mclose;

