﻿iframeids="myframe";iframehide="yes";getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];FFextraHeight=0;function resizeCaller(){if(document.getElementById)resizeIframe(iframeids);if((document.all||document.getElementById)&&iframehide=="no"){var tempobj=document.all?document.all[iframeids]:document.getElementById(iframeids);tempobj.style.display="block"}}function resizeIframe(frameid){var currentfr=document.getElementById(frameid);if(currentfr&&!window.opera){currentfr.style.display="block";if(currentfr.contentDocument&&currentfr.contentDocument.documentElement.scrollHeight){currentfr.height=1;currentfr.parentNode.style.height="auto";currentfr.height=currentfr.contentDocument.documentElement.scrollHeight+FFextraHeight}else if(currentfr.Document&&currentfr.Document.body.scrollHeight)currentfr.height=currentfr.Document.body.scrollHeight;if(currentfr.addEventListener)currentfr.addEventListener("load",readjustIframe,false);else if(currentfr.attachEvent){currentfr.detachEvent("onload",readjustIframe);currentfr.attachEvent("onload",readjustIframe);}}}function readjustIframe(loadevt){var crossevt=(window.event)?event:loadevt;var iframeroot=(crossevt.currentTarget)?crossevt.currentTarget:crossevt.srcElement;if(iframeroot)resizeIframe(iframeroot.id);}function loadintoIframe(iframeid,url){if(document.getElementById)document.getElementById(iframeid).src=url}if(window.addEventListener)window.addEventListener("load",resizeCaller,false);else if(window.attachEvent)window.attachEvent("onload",resizeCaller);else window.onload=resizeCaller;function PreloadPage(){switch(window.location.hash.substring(1)){case"ServicePage":loadintoIframe('myframe','services.htm');break;case"SupportPage":loadintoIframe('myframe','support.htm');break;case"JoinUsPage":loadintoIframe('myframe','joinus.htm');break;case"ContactUsPage":loadintoIframe('myframe','contactus.aspx');break;default:loadintoIframe('myframe','home.htm');}}Url={encode:function(string){return escape(this._utf8_encode(string));},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}return utftext}};function SearchSite(searchtxt){var myTextField=document.getElementById(searchtxt);if(myTextField.value!="")loadintoIframe('myframe','search.html?searWords='+Url.encode(myTextField.value));else alert("Please enter search text");}