/* misc.js */function addLoadEvent(func){var current=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){if(current){current()}func()}}}
/* flash.js */var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version")}catch(e){}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version")}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version")}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0"}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11"}catch(e){version=-1}}return version}function GetSwfVer(type){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];if(descArray[3]!=""){tempArrayMinor=descArray[3].split("r")}else{tempArrayMinor=descArray[4].split("r")}var versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var flashVer=versionMajor+"."+versionMinor+"."+versionRevision}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion()}if(type!=null&&flashVer!=(-1||0)){if(isIE&&isWin&&!isOpera){tempArray=flashVer.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=flashVer.split(".")}flashVer=versionArray[0]+'.'+versionArray[1]+'.'+versionArray[2]}return flashVer}function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision){versionStr=GetSwfVer();if(versionStr==-1){return false}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))return true}}return false}}function AC_AddExtension(src,ext){if(src.indexOf('?')!=-1)return src.replace(/\?/,ext+'?');else return src+ext}function AC_Generateobj(objAttrs,params,embedAttrs){var str='';if(isIE&&isWin&&!isOpera){str+='<object ';for(var i in objAttrs)str+=i+'="'+objAttrs[i]+'" ';for(var i in params)str+='><param name="'+i+'" value="'+params[i]+'" /> ';str+='></object>'}else{str+='<embed ';for(var i in embedAttrs)str+=i+'="'+embedAttrs[i]+'" ';str+='> </embed>'}document.write(str)}function flashContent(){var ret=AC_GetArgs(arguments,"","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs)}function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1]}}ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret}var requiredMajorVersion=8;var requiredMinorVersion=0;var requiredRevision=0;var resW=screen.availWidth;var resH=screen.availHeight;function altToggle(currentsetting,id,req){var altContent="";var hasRequestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);if(hasRequestedVersion){if(currentsetting=="False"){var swfV=GetSwfVer('string');var updateInit='?resW='+resW+'&resH='+resH+'&swfV='+swfV+'&swfS=true';var altContent='/r/flash/'+id+req+updateInit}}else if(currentsetting=="True"){var swfV=GetSwfVer('string');var updateInit='?resW='+resW+'&resH='+resH+'&swfV='+swfV+'&swfS=false';var altContent='/r/flash/'+id+req+updateInit}return altContent}/* productlist.js*/var xmlhttp;if(typeof XMLHttpRequest!="undefined"){xmlhttp=new XMLHttpRequest()}else if(typeof ActiveXObject!="undefined"){xmlhttp=new ActiveXObject("MSXML2.XmlHttp")}else{xmlhttp=false}function modItem(action,id){document.documentElement.style.cursor='wait';var cursorWait=setTimeout("document.documentElement.style.cursor='default';",5000);if(xmlhttp.readyState!=0){xmlhttp.abort()}xmlhttp.open("GET","http://www.granzow.com/"+action+"/"+id+"/",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if(xmlhttp.status!=404){var listStatus=new Function("return "+xmlhttp.responseText)();if(listStatus.status=="add"){document.getElementById("prodListItem").innerHTML='<span onclick="modItem(\'remove\','+id+')" title="Remove item from list"><img src="/images/removefromlist.gif" width="12" height="12" border="0" alt="Remove from list" /></span><span class="content_itemfeatures" onclick="modItem(\'remove\','+id+')" title="Remove item from list">Remove from list</span>'}else if(listStatus.status=="remove"){document.getElementById("prodListItem").innerHTML='<span onclick="modItem(\'add\','+id+')" title="Add item to list"><img src="/images/addtolist.gif" width="12" height="12" border="0" alt="Add to list" /></span><span class="content_itemfeatures" onclick="modItem(\'add\','+id+')" title="Add item to list">Add item to list</span>'}else if(listStatus.status=="error"){alert(listStatus.message);return}switch(listStatus.itemCount){case 1:document.getElementById("prodListCount").innerHTML='<a class="rightmenu1-hyperlinked" href="'+listStatus.viewLink+'" title="View your list">Your list contains <b>1 item</b>.  View your list here, or submit it if you are finished browsing.</a><a href="'+listStatus.viewLink+'" title="View your list"><img border="0" align="right" style="padding-right:10px; padding-top:5px;" src="/images/arrow.gif" alt="Request Information" /></a>';break;case 0:document.getElementById("prodListCount").innerHTML='<span class="rightmenu1-hyperlinked" onclick="modItem(\'add\','+id+');" title="Add item to list">If you would like to request more information about this item, <b>add it to your list</b>.</span><span onclick="modItem(\'add\','+id+')" style="cursor:pointer;" title="Add item to list"><img border="0" align="right" style="padding-right:10px; padding-top:5px;" src="/images/arrow.gif" alt="Request Information" /></span>';break;default:document.getElementById("prodListCount").innerHTML='<a class="rightmenu1-hyperlinked" href="'+listStatus.viewLink+'" title="View your list">Your list contains<br><b>'+listStatus.itemCount+' items</b>.  View your list here, or submit it if you are finished browsing.</a><a href="'+listStatus.viewLink+'" title="View your list"><img border="0" align="right" style="padding-right:10px; padding-top:5px;" src="/images/arrow.gif" alt="Request Information" /></a>'}}}};xmlhttp.send(null);clearTimeout(cursorWait);document.documentElement.style.cursor='default'}function modList(action,id,ret){if(navigator.appName=="Microsoft Internet Explorer"){var form=document.createElement('<form action="http://www.granzow.com/'+action+'/'+id+ret+'/" method="post">');document.appendChild(form);var returnView=document.createElement('<input type="hidden" name="return" value="true">');form.appendChild(returnView)}else{var form=document.createElement('FORM');document.body.appendChild(form);form.setAttribute('action','http://www.granzow.com/'+action+'/'+id+ret+'/');form.setAttribute('method','post');var returnView=form.appendChild(document.createElement('INPUT'));returnView.setAttribute('name','return');returnView.setAttribute('type','hidden');returnView.setAttribute('value','true')}form.submit()}/* woptions.js */function wOpen(url,name,w,h){var newWin=window.open(url,name,'width='+w+',height='+h+','+'location=0,menubar=0,status=0,toolbar=0,scrollbars=0,resizable=0');if(!newWin){return true}newWin.resizeTo(w,h);var maxW=screen.availWidth;var maxH=screen.availHeight;newWin.moveTo(Math.round((maxW-w)/2),Math.round((maxH-h)/2));newWin.focus();return false}function wParent(url){window.opener.parent.location=url}function wPop(url,name,w,h){return wOpen(url+'popup/',name,w,h)}function wResize(w,h){if(typeof window.innerWidth=='number'){innerW=window.innerWidth;innerH=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){innerW=document.documentElement.clientWidth;innerH=document.documentElement.clientHeight}else if(document.body){innerW=document.body.clientWidth;innerH=document.body.clientHeight}if(document.all){var outerW=w;var outerH=h}else{var outerW=window.outerWidth;var outerH=window.outerHeight}if(innerW<outerW||innerH<outerH){window.resizeBy(outerW-innerW,outerH-innerH);window.moveBy(-(outerW-innerW)/2,-(outerH-innerH)/2)}}/* searchsuggest.js */function AutoSuggestControl(oTextbox,oProvider){this.cur=-1;this.layer=null;this.provider=oProvider;this.textbox=oTextbox;this.init()}AutoSuggestControl.prototype.autosuggest=function(aSuggestions,bTypeAhead){if(aSuggestions&&aSuggestions.length>0){if(bTypeAhead){this.typeAhead(aSuggestions[0])}this.showSuggestions(aSuggestions)}else{this.hideSuggestions()}};AutoSuggestControl.prototype.createDropDown=function(){var oThis=this;this.layer=document.createElement("div");this.layer.className="suggestions";this.layer.style.visibility="hidden";this.layer.style.width=this.textbox.offsetWidth;this.layer.onmousedown=this.layer.onmouseup=this.layer.onmouseover=function(oEvent){oEvent=oEvent||window.event;oTarget=oEvent.target||oEvent.srcElement;if(oEvent.type=="mousedown"){oThis.textbox.value=oTarget.firstChild.nodeValue;oThis.hideSuggestions()}else if(oEvent.type=="mouseover"){oThis.highlightSuggestion(oTarget)}else{oThis.textbox.focus()}};document.body.appendChild(this.layer)};AutoSuggestControl.prototype.getLeft=function(){var oNode=this.textbox;var iLeft=0;while(oNode.tagName!="BODY"){iLeft+=oNode.offsetLeft;oNode=oNode.offsetParent}return iLeft};AutoSuggestControl.prototype.getTop=function(){var oNode=this.textbox;var iTop=0;while(oNode.tagName!="BODY"){iTop+=oNode.offsetTop;oNode=oNode.offsetParent}return iTop};AutoSuggestControl.prototype.handleKeyDown=function(oEvent){switch(oEvent.keyCode){case 38:this.previousSuggestion();break;case 40:this.nextSuggestion();break;case 13:this.hideSuggestions();break}};AutoSuggestControl.prototype.handleKeyUp=function(oEvent){var iKeyCode=oEvent.keyCode;if(iKeyCode==8||iKeyCode==46){this.provider.requestSuggestions(this,false)}else if(iKeyCode<32||(iKeyCode>=33&&iKeyCode<46)||(iKeyCode>=112&&iKeyCode<=123)){}else{this.provider.requestSuggestions(this,true)}};AutoSuggestControl.prototype.hideSuggestions=function(){this.layer.style.visibility="hidden"};AutoSuggestControl.prototype.highlightSuggestion=function(oSuggestionNode){for(var i=0;i<this.layer.childNodes.length;i++){var oNode=this.layer.childNodes[i];if(oNode==oSuggestionNode){oNode.className="current"}else if(oNode.className=="current"){oNode.className=""}}};AutoSuggestControl.prototype.init=function(){var oThis=this;this.textbox.onkeyup=function(oEvent){if(!oEvent){oEvent=window.event}oThis.handleKeyUp(oEvent)};this.textbox.onkeydown=function(oEvent){if(!oEvent){oEvent=window.event}oThis.handleKeyDown(oEvent)};this.textbox.onblur=function(){oThis.hideSuggestions()};this.createDropDown()};AutoSuggestControl.prototype.nextSuggestion=function(){var cSuggestionNodes=this.layer.childNodes;if(cSuggestionNodes.length>0&&this.cur<cSuggestionNodes.length-1){var oNode=cSuggestionNodes[++this.cur];this.highlightSuggestion(oNode);this.textbox.value=oNode.firstChild.nodeValue}};AutoSuggestControl.prototype.previousSuggestion=function(){var cSuggestionNodes=this.layer.childNodes;if(cSuggestionNodes.length>0&&this.cur>0){var oNode=cSuggestionNodes[--this.cur];this.highlightSuggestion(oNode);this.textbox.value=oNode.firstChild.nodeValue}};AutoSuggestControl.prototype.selectRange=function(iStart,iLength){if(this.textbox.createTextRange){var oRange=this.textbox.createTextRange();oRange.moveStart("character",iStart);oRange.moveEnd("character",iLength-this.textbox.value.length);oRange.select()}else if(this.textbox.setSelectionRange){this.textbox.setSelectionRange(iStart,iLength)}this.textbox.focus()};AutoSuggestControl.prototype.showSuggestions=function(aSuggestions){var oDiv=null;this.layer.innerHTML="";for(var i=0;i<aSuggestions.length;i++){oDiv=document.createElement("div");oDiv.appendChild(document.createTextNode(aSuggestions[i]));this.layer.appendChild(oDiv)}if(navigator.appName=="Microsoft Internet Explorer"){if(typeof sBoxHome!="undefined"){this.layer.style.left="707px";this.layer.style.top="63px"}else{this.layer.style.left="688px";this.layer.style.top="60px"}this.layer.style.width="auto"}else{this.layer.style.left=this.getLeft()+"px";this.layer.style.top=(this.getTop()+this.textbox.offsetHeight)+"px"}this.layer.style.visibility="visible"};AutoSuggestControl.prototype.typeAhead=function(sSuggestion){if(this.textbox.createTextRange||this.textbox.setSelectionRange){var iLen=this.textbox.value.length;this.textbox.value=sSuggestion;this.selectRange(iLen,sSuggestion.length)}};function RemoteStateSuggestions(){if(typeof XMLHttpRequest!="undefined"){this.http=new XMLHttpRequest()}else if(typeof ActiveXObject!="undefined"){this.http=new ActiveXObject("MSXML2.XmlHttp")}}RemoteStateSuggestions.prototype.requestSuggestions=function(oAutoSuggestControl,bTypeAhead){var oHttp=this.http;if(oHttp.readyState!=0){oHttp.abort()}var sURL="/searchSuggest?q="+encodeURIComponent(oAutoSuggestControl.textbox.value);oHttp.open("get",sURL,true);oHttp.onreadystatechange=function(){if(oHttp.readyState==4){var aSuggestions=eval(oHttp.responseText);oAutoSuggestControl.autosuggest(aSuggestions,bTypeAhead)}};oHttp.send(null)};window.onload=function(){var oTextbox=new AutoSuggestControl(document.getElementById("searchbox"),new RemoteStateSuggestions())};/* valveBuilder.js */function makeValveBuilder(){document.getElementById('valveBuilder').style.display='block';vbDINBox=new dhtmlXCombo("chooseDIN","chooseDIN",200,"image");vbDINBox.loadXMLString(vbDINOpts);vbDINBox.enableOptionAutoHeight(1);vbDINBox.readonly(true);vbDINBox.attachEvent("onChange",buildModel);vbCoilBox=new dhtmlXCombo("chooseCoil","chooseCoil",80);vbCoilBox.loadXMLString(vbCoilOpts);vbCoilBox.enableOptionAutoHeight(1);vbCoilBox.readonly(true);vbCoilBox.attachEvent("onChange",buildModel)}var vbCoil=null,vbDIN=null;function buildModel(){var vbCoilSel=vbCoilBox.getSelectedValue();var vbDINSel=vbDINBox.getSelectedValue();if(vbCoil!=vbCoilSel||vbDIN!=vbDINSel){vbCoil=vbCoilSel;vbDIN=vbDINSel;if(vbCoil!=null&&vbDIN!=null){document.getElementById('vbResult').style.display='block';if(vbCoil!='SO'){document.getElementById('vbResultSpecial').style.display='none';document.getElementById('vbResultHeader').style.display='block';document.getElementById('vbResultModel').innerHTML=vbBody+'-'+vbCoil+'-'+vbDIN}else{document.getElementById('vbResultSpecial').style.display='block';document.getElementById('vbResultHeader').style.display='none';document.getElementById('vbResultModel').innerHTML=''}}else{document.getElementById('vbResult').style.display='none'}}}