function Querystring(a){this.params={};if(a==null){a=location.search.substring(1,location.search.length)}if(a.length==0){return}a=a.replace(/\+/g," ");var c=a.split("&");for(var d=0;d<c.length;d++){var f=c[d].split("=");var b=decodeURIComponent(f[0]);var e=(f.length==2)?decodeURIComponent(f[1]):b;this.params[b]=e}}Querystring.prototype.get=function(a,b){var c=this.params[a];return(c!=null)?c:b};Querystring.prototype.contains=function(a){var b=this.params[a];return(b!=null)};function movieEnd(){document.getElementById("xswfmovie").style.display="none";document.getElementById("xswfmovie").style.visibility="hidden";document.getElementById("xslideshow").style.display="block"}function instr(b,a){for(i=0;i<Len(b);i++){if(a==b.substring(i,1)){return i}}return -1}function SwapPic(a){document.getElementById("sitemap").style.height="0px";document.getElementById("sitemap").style.width="0px";document.getElementById("sitepic").style.height="273px";document.getElementById("sitepic").style.width="400px";document.getElementById("sitepic").src=a}function SwapMap(a){document.getElementById("sitemap").style.height="273px";document.getElementById("sitemap").style.width="400px";document.getElementById("sitepic").style.height="0px";document.getElementById("sitepic").style.width="0px";switch(a){case"tulsa":document.getElementById("sitemap").src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=606+n.+145th+east+ave+tulsa&amp;sll=37.0625,-95.677068&amp;sspn=40.409448,75.761719&amp;ie=UTF8&amp;ll=36.174258,-95.81357&amp;spn=0.018915,0.034332&amp;z=14&amp;output=embed"}}function PlayMovie(){document.getElementById("MovieFrame").style.width="0px";document.getElementById("MovieFrame").style.height="0px";document.getElementById("IPS-TOP").style.width="320px";document.getElementById("IPS-TOP").style.height="213px";document.getElementById("IPS-TOP").Play();setTimeout("ResetMovie()",65000)}function ResetMovie(){document.getElementById("IPS-TOP").StopPlay();document.getElementById("MovieFrame").style.width="320px";document.getElementById("MovieFrame").style.height="213px";document.getElementById("IPS-TOP").style.width="0px";document.getElementById("IPS-TOP").style.height="0px"}function loadPage(b,a){var c=document.getElementById("content");if(c!=null){resp=getHtml("pages/"+b);if(resp!=null){c.innerHTML=resp}if(a!=null){document.title=a}}}function getHtml(a){var c="";var b="";if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP")}}b.open("GET",a,false);b.send(null);if(b.status==200){var c=b.responseText}return c}function doPage(a,b){document.getElementById(b).innerHTML=getHtml("pages/"+a)}function doPhoto(a,b){document.getElementById(b).src="images/"+a}function setCookie(b,d){var e=new Date();var a=(365*24*60*60*1000);var c=e.getTime()+(a*2);e.setTime(c);document.cookie=b+"="+d+"; expires="+e.toGMTString()}function getResults(){var e=document.getElementById("mtr-target");if(e!=null){e.innerHTML="<i>Searching database, please wait ...</i>";var d="http://"+document.location.host+"/pomtr/MtrViewer";var b=document.getElementById("sdlonly");var a=document.getElementById("ponum");if(a!=null&&b!=null){d+=safeString("?username=","uid");d+=safeString("&userpo=","ponum");d+=safeBool("&sdlonly=","sdlonly");var c=syncSendHtml(d);if(c!=null){e.innerHTML=c;if(!b.checked&&c.indexOf("Sorry")==-1){setTimeout("window.open('http://"+location.hostname+"/ipsmtr/"+cleanString(a.value)+".pdf','_blank')",500)}}}}}function cleanString(a){stPoFileName=a.replace("/","-");if(stPoFileName!=null){stPoFileName=stPoFileName.replace(" ","_")}return escape(stPoFileName)}function safeString(c,a){var b=document.getElementById(a);if(b!=null){if(b.value!=null){return c+b.value}}return""}function safeBool(d,b){var c=document.getElementById(b);if(c!=null){var a=c.checked?"on":"off";return d+a}return""}function SubmitMTRResults(){document.location.href="index.html?action=online&sub=mtrs&tc="+document.getElementById("tc").value+"&tp="+document.getElementById("tp").value+"&sdlonly="+((document.getElementById("sdlonly").checked==true)?"on":"off")}function wait(b){var c=new Date().getTime();var a=c;while(a-c<b){a=new Date().getTime()}}function SubmitEmail(){if(document.getElementById("txt_Name").value.indexOf("<")>-1||document.getElementById("txt_Company").value.indexOf("<")>-1||document.getElementById("txt_Address_1").value.indexOf("<")>-1||document.getElementById("txt_City").value.indexOf("<")>-1||document.getElementById("txt_State").value.indexOf("<")>-1||document.getElementById("txt_Zip").value.indexOf("<")>-1||document.getElementById("txt_Phone").value.indexOf("<")>-1||document.getElementById("txt_EMail").value.indexOf("<")>-1||document.getElementById("txt_Body").value.indexOf("<")>-1){alert("Avast!  Ye cannot enter either ''<'' or ''>'' up in here!");return false}if(document.getElementById("txt_spamcheck").value.toLowerCase()!="red"&&document.getElementById("txt_spamcheck").value.toLowerCase()!='"red"'){document.getElementById("txt_spamcheck").style.background="red";alert("Please enter the Spam Check-Word");return false}else{document.getElementById("txt_spamcheck").style.background="white"}if(document.getElementById("txt_Body").value.length<=1){alert("You at least need to enter a comment or question before the form can be sent.");return false}var a="";a="<BR><HTML><BODY style='font-family:cabali, arial, tahoma;font-size:10pt;'><TABLE width='100%' cellpadding=4 cellspacing=0 border=1 style='font-family:cabali, arial, tahoma;font-size:10pt;'><TR><TD colspan=2 bgcolor=#E4EDF1><font size=4>IPS Website Inquiry</font></TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>Name:     </TD><TD width=*>"+document.getElementById("txt_Name").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>Company:  </TD><TD width=*>"+document.getElementById("txt_Company").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>Address1: </TD><TD width=*>"+document.getElementById("txt_Address_1").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>City:     </TD><TD width=*>"+document.getElementById("txt_City").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>State:    </TD><TD width=*>"+document.getElementById("txt_State").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>Zip:      </TD><TD width=*>"+document.getElementById("txt_Zip").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>Phone:    </TD><TD width=*>"+document.getElementById("txt_Phone").value+" </TD></TR><TR><TD width=120 align=right bgcolor=#E4EDF1><b>eMail:    </TD><TD width=*>"+document.getElementById("txt_EMail").value+" </TD></TR></TABLE><br><br>"+document.getElementById("txt_Body").value+"</TABLE></BODY></HTML>";postEMail("ips@ipipes.com","no-reply@ipipes.com","IPS Website Inquiry",a);postEMail("kwallace@ipipes.com","no-reply@ipipes.com","IPS Website Inquiry",a);if(document.getElementById("txt_EMail").value!=""){postEMail(document.getElementById("txt_EMail").value,"no-reply@ipipes.com","Confirmation of Your IPS Website Inquiry",a)}window.location="http://www.ipipes.com/index.html?action=about&sub=contact";alert("Your message has been sent.  Thank you for contacting IPS.")}function postEMail(a,d,f,e){var c=new XMLHttpRequest();var b="http://www.ipipes.com/gcMailer/drop";var g="t="+escape(a)+"&f="+escape(d)+"&s="+escape(f)+"&b="+escape(e);c.open("POST",b,false);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.setRequestHeader("Content-length",g.length);c.setRequestHeader("Connection","close");c.send(g)};