﻿function newImage(_1){if(document.images){rslt=new Image();rslt.src=_1;return rslt;}}function changeImages(){if(document.images){for(var i=0;i<changeImages.arguments.length;i+=2){document[changeImages.arguments[i]].src=changeImages.arguments[i+1];}}}function imgPreview(_3){if(document.getElementById&&navigator.userAgent.toLowerCase().indexOf("opera")==-1){var _4=openWin("","imgWin","width=300, height=250, left=100, top=100");with(_4.document){writeln("<html><head><title>Loading...</title>");writeln("<style type=\"text/css\"><!-- body { margin: 0px; } --></style></head>");writeln("<body><img id=\"pic\" style=\"display:none\"></body></html>");close();}var _5=new Image();_5.onload=function(){sizeImgWin(_4,_5);};_5.src=_3;}else{openWin(_3,"imagePreview");}}function sizeImgWin(_6,_7){var _8=_7.width;var _9=_7.height;var _a=_6.innerWidth||_6.document.body.offsetWidth;var _b=_6.innerHeight||_6.document.body.offsetHeight;if(!_8){_8=_a;}if(!_9){_9=_b;}_8-=_a;_9-=_b;_6.resizeBy(_8,_9);_6.document.title="Preview Image";var _c=_6.document.getElementById("pic");_c.src=_7.src;_c.style.display="block";sw=screen.width;sh=screen.height;var _d=((sw-_8)/2)-100;var _e=((sh-_9)/2)-(100+(((sh-_9)/2)*0.1));_6.moveTo(_d,_e);}function openWin(_f,_10,_11){var w=window.open(_f,_10,_11);return w;}function resizeWin(_13,_14,_15,_16,_17){var x;if(_13<_14){for(x=_13;x<=_14;x=x+_15){window.resizeBy(_15,0);}}else{for(x=_13;x>_14;x=x-_15){window.resizeBy(_15,0);}}if(typeof (_16)!="undefined"){window.resizeTo(_16,450);}if(typeof (_17)!="undefined"){window.resizeTo(_16,_17);}}function mouseOverBg(obj,_1a){obj.style.background=_1a;}function mouseOutBg(obj,_1c){obj.style.background=_1c;}function mouseOverClass(obj,_1e){obj.className=_1e;}function mouseOutClass(obj,_20){obj.className=_20;}function debugIt(obj,_22,lev){var str=new String();for(var _25 in obj){str+=_25+" == "+escape(obj[_25])+" <br>\n\r";if(_22&&(typeof (obj[_25])=="object")&&(lev<4)){str+="<blockquote>"+debugIt(obj[_25],_22,(lev+1))+"</blockquote>";}}return str;}function DebugObject(obj,_27){PrintPreview(debugIt(obj,_27,1));}function PrintPreview(txt,_29){var _2a=new String();_2a="<html><head>\n";_2a=_2a.concat("<style>\n ");_2a=_2a.concat(" body{ font-family: verdana, arial; font-size: .9em; } \n");_2a=_2a.concat(" a { color:#000066; font-size: .7em; } \n ");_2a=_2a.concat(" .hidefromprinter{ display:none; visibility:hidden; } \n ");_2a=_2a.concat("</style>\n</head>\n");_2a=_2a.concat("<body>");_2a=_2a.concat("<div align=\"right\">");_2a=_2a.concat("<a href=\"javascript:window.print();\">");_2a=_2a.concat("Send to Printer</a>");_2a=_2a.concat(" | ");_2a=_2a.concat("<a href=\"#\" onclick=\"window.close();\">");_2a=_2a.concat("Close Print Preview</a></div>");_2a=_2a.concat("<div>"+txt+"</div></body></html>");var w=window.open("","Debugger","width=770,height=450,resizable=yes,scrollbars=yes,location=0,status=yes,menubar=0,toolbar=0");w.document.write(_2a);w.document.close();}function Cookie(){this.Enabled=true;this.Message="Cookies are accepted.";this.Test=function(){if(document.cookie!=null){document.cookie="cookiettest=ok";var _2c=document.cookie;if(_2c==""||_2c.indexOf("cookietest")==-1){this.Enabled=false;this.Message="Please turn on cookies.";}}return this.Message;};this.Add=function(_2d,_2e,_2f){var _30="";if(_2f){var _31=new Date();_31.setTime(_31.getTime()+(_2f*24*60*60*1000));_30="; expires="+_31.toGMTString();}document.cookie=_2d+"="+_2e+_30+"; path=/";};this.Get=function(_32){var _33=_32+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_33)==0){return c.substring(_33.length,c.length);}}return null;};this.Delete=function(_37){this.Add(_37,"",-1);};}var Cookies=new Cookie();function ClientOS(){var agt=navigator.userAgent.toLowerCase();var win=(agt.indexOf("win")!=-1);this.Version="";this.IsWin=true;this.IsMac=false;this.win95=((agt.indexOf("win95")!=-1)||(agt.indexOf("windows 95")!=-1));if(this.win95){this.Version="Windows 95";}this.win98=((agt.indexOf("win98")!=-1)||(agt.indexOf("windows 98")!=-1));if(this.win98){this.Version="Windows 98";}this.winNT=((agt.indexOf("winnt")!=-1)||(agt.indexOf("windows nt")!=-1));if(this.winNT){this.Version="Windows NT/XP";}this.win2000=((agt.indexOf("windows nt 5.0")!=-1));if(this.win2000){this.Version="Windows 2000";}this.win32=(this.win95||this.winnt||this.win98||this.win2000||((this.major>=4)&&(navigator.platform=="Win32"))||(agt.indexOf("win32")!=-1)||(agt.indexOf("32bit")!=-1));this.mac=((agt.indexOf("mac")!=-1)||(agt.indexOf("Mac")!=-1));if(this.mac){this.Version="Macintosh";this.IsMac=true;}return this.Version;}function Browser(){var ua,s,i;this.isIE=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="MSIE";if((i=ua.indexOf(s))>=0){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return;}s="Netscape6/";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=parseFloat(ua.substr(i+s.length));return;}s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return;}}var browser=new Browser();var SHOW,HIDE;function PreloadImage(src){var img=new Image();img.src=src;return img;}function el(id){SHOW="visible";HIDE="hidden";if(document.getElementById){return document.getElementById(id);}else{if(document.layers){SHOW="show";HIDE="hide";return document.layers[id];}else{if(document.all){return document.all(id);}}}}function elStyle(id){var dom=el(id);if(document.layers){return dom;}else{return dom.style;}}function showEl(id){var dom=elStyle(id);if(dom){dom.visibility=SHOW;dom.display="";}return false;}function hideEl(id){var dom=elStyle(id);if(dom){dom.visibility=HIDE;dom.display="none";}return false;}function toggleEl(id){var dom=elStyle(id);if(dom){var _46=dom.display;if(_46=="none"){showEl(id);}else{hideEl(id);}}return false;}function toggleDiv(id){return toggleEl(id);}function DropDownUtility(){}DropDownUtility.prototype.SelectedItem=function(id){var dd=el(id);return (dd)?dd.options[dd.selectedIndex]:null;};DropDownUtility.prototype.SelectedValue=function(id){var _4b=this.SelectedItem(id);return (_4b)?_4b.value:null;};DropDownUtility.prototype.SelectedText=function(id){var _4d=this.SelectedItem(id);return (_4d)?_4d.text:null;};DropDownUtility.prototype.SetValue=function(id,_4f){var dd=el(id);if(dd){for(var i=0;i<dd.options.length;i++){if(dd.options[i].value==val){dd.options[i].selected=true;return true;}}}return false;};var DropDowns=new DropDownUtility();function setHtml(id,_53){var obj=el(id);if(obj){obj.innerHTML=_53;}}function updateDiv(id,_56){setHtml(id,_56);}var dragObj=new Object();dragObj.zIndex=0;function dragStart(_57,id){var el;var x,y;if(id){dragObj.elNode=document.getElementById(id);}else{if(browser.isIE){dragObj.elNode=window.event.srcElement;}if(browser.isNS){dragObj.elNode=_57.target;}if(dragObj.elNode.nodeType==3){dragObj.elNode=dragObj.elNode.parentNode;}}if(browser.isIE){x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;}if(browser.isNS){x=_57.clientX+window.scrollX;y=_57.clientY+window.scrollY;}dragObj.cursorStartX=x;dragObj.cursorStartY=y;dragObj.elStartLeft=parseInt(dragObj.elNode.style.left,10);dragObj.elStartTop=parseInt(dragObj.elNode.style.top,10);if(isNaN(dragObj.elStartLeft)){dragObj.elStartLeft=0;}if(isNaN(dragObj.elStartTop)){dragObj.elStartTop=0;}dragObj.elNode.style.zIndex=++dragObj.zIndex;if(browser.isIE){document.attachEvent("onmousemove",dragGo);document.attachEvent("onmouseup",dragStop);window.event.cancelBubble=true;window.event.returnValue=false;}if(browser.isNS){document.addEventListener("mousemove",dragGo,true);document.addEventListener("mouseup",dragStop,true);_57.preventDefault();}}function dragGo(_5b){var x,y;if(browser.isIE){x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;}if(browser.isNS){x=_5b.clientX+window.scrollX;y=_5b.clientY+window.scrollY;}dragObj.elNode.style.left=(dragObj.elStartLeft+x-dragObj.cursorStartX)+"px";dragObj.elNode.style.top=(dragObj.elStartTop+y-dragObj.cursorStartY)+"px";if(browser.isIE){window.event.cancelBubble=true;window.event.returnValue=false;}if(browser.isNS){_5b.preventDefault();}}function dragStop(_5d){if(browser.isIE){document.detachEvent("onmousemove",dragGo);document.detachEvent("onmouseup",dragStop);}if(browser.isNS){document.removeEventListener("mousemove",dragGo,true);document.removeEventListener("mouseup",dragStop,true);}}if(!String.compare){String.compare=function(s1,s2){if(s1==s2){return 0;}if(s1>s2){return 1;}return -1;};}function ReplaceVB(_60,_61,_62){if(!(_60)){return _60;}var _63=eval("/"+_61+"/gi");var _64=_60.replace(_63,_62);return _64;}function updateTextBox(_65,_66){if(String.compare(_65.value,_66)==0){element.value="";}else{if(element.value.length==0){element.value=_66;}}}function SelfLabelTextBox(id,_68,txt){this.txtbox=el(id);this.TextMode=this.txtbox.type;this.IsPasswordInput=(this.TextMode=="password");if(this.IsPasswordInput){this.txtbox=changeInputType(this.txtbox,"text",txt);this.Text=txt;}else{this.Text=this.txtbox.value=(txt)?txt:this.txtbox.value;}this.txtbox.sltb=this;this.OnEnterKeyPress=_68;this.onblur=this.txtbox.onblur;this.onfocus=this.txtbox.onfocus;function txtblur(){this.sltb.toggleLableText();if(this.sltb.onblur){this.sltb.onblur();}}function txtfocus(){if(this.IsFocused){return;}this.sltb.toggleLableText();if(this.sltb.onfocus){this.sltb.onfocus();}}this.toggleLableText=function(){if(String.compare(this.txtbox.value,this.Text)==0){if(this.IsPasswordInput){this.txtbox=changeInputType(this.txtbox,"password","",true);}else{this.txtbox.value="";}}else{if(this.txtbox.value.length==0){if(this.IsPasswordInput){this.txtbox=changeInputType(this.txtbox,"text",this.Text);}else{this.txtbox.value=this.Text;}}}};this.txtbox.onblur=txtblur;this.txtbox.onfocus=txtfocus;if(_68){this.txtbox.onkeydown=function(e){e=(e)?e:event;if((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)){return this.sltb.OnEnterKeyPress(e,this);}};}}function changeInputType(_6b,_6c,_6d,_6e){if(!_6b||!_6b.parentNode||(_6c.length<4)||!document.getElementById||!document.createElement){return;}var _6f=document.createElement("input");_6f.type=_6c;_6f.value=_6d;_6f.IsFocused=false;if(_6b.name){_6f.name=_6b.name;}if(_6b.id){_6f.id=_6b.id;}if(_6b.className){_6f.className=_6b.className;}if(_6b.size){_6f.size=_6b.size;}if(_6b.tabIndex){_6f.tabIndex=_6b.tabIndex;}if(_6b.accessKey){_6f.accessKey=_6b.accessKey;}if(_6b.sltb){_6f.sltb=_6b.sltb;}if(_6b.onblur){_6f.onblur=_6b.onblur;}if(_6b.onfocus){_6f.onfocus=_6b.onfocus;}_6b.parentNode.replaceChild(_6f,_6b);if(_6e){window.newinput=_6f;setTimeout("newinput.IsFocused=true;newinput.focus();",2);}return _6f;}Array.prototype.Contains=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return true;}}return false;};function addEventToElement(obj,_73,_74){if(!(obj&&_74&&_73)){return null;}if(typeof window.attachEvent!="undefined"){_73="on"+_73;}if(typeof obj.addEventListener!="undefined"){obj.addEventListener(_73,_74,false);}else{if(typeof obj.attachEvent!="undefined"){obj.attachEvent(_73,_74);}else{return null;}}return true;}function addWindowEvent(_75,_76){return addEventToElement(window,_75,_76);}function addOnloadEvent(fnc){var ret=addWindowEvent("load",fnc);if(!ret){if(window.onload!=null){var _79=window.onload;window.onload=function(e){_79(e);if(window[fnc]){window[fnc]();}};}else{window.onload=fnc;}}}function EnterKeyDownEvent(e,fn){e=(e)?e:event;if((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)){if(fn){fn();}else{document.forms[0].submit();}return false;}else{return true;}}function toggleCheckBoxValue(chk){if(chk){chk.value=(chk.value=="on")?"checked":"on";}}function f_clientWidth(){return ClientSize.Width;}function f_clientHeight(){return ClientSize.Height;}function f_scrollLeft(){return ScrollSize.ScrollX;}function f_scrollTop(){return ScrollSize.ScrollY;}var ClientSize=new GetClientSize();var ScrollSize=new GetScrollingOffset();function GetClientSize(){this.Width=0;this.Height=0;if(typeof (window.innerWidth)=="number"){this.Width=window.innerWidth;this.Height=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){this.Width=document.documentElement.clientWidth;this.Height=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){this.Width=document.body.clientWidth;this.Height=document.body.clientHeight;}}}}function GetScrollingOffset(){this.ScrollX=0;this.ScrollY=0;if(typeof (window.pageYOffset)=="number"){this.ScrollY=window.pageYOffset;this.ScrollX=window.pageXOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){this.ScrollY=document.body.scrollTop;this.ScrollX=document.body.scrollLeft;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){this.ScrollY=document.documentElement.scrollTop;this.ScrollX=document.documentElement.scrollLeft;}}}}function AjaxLib(){this.ClientID="";this.CallbackFunction=null;this.ServerCallFunction=null;this.OnBeforeServerCall=null;this.ParameterList=new Array();this.Params="";this.SendDelay=0;this.SendForm=false;this.AjaxObject=this;}AjaxLib.prototype.AddParameter=function(_1,_2){this.ParameterList.push(Param(_1,_2));};AjaxLib.prototype.ClearParameter=function(){this.ParameterList=new Array();};AjaxLib.prototype.ProcessForm=function(){for(var i=0;i<document.forms.length;i++){for(var x=0;x<document.forms[i].elements.length;x++){var _5=document.forms[i].elements[x];if(!ExcludedFormElements.Contains(_5.id)){this.AddParameter(_5.id,_5.value);}}}};AjaxLib.prototype.ProcessParameters=function(){var _6="";if(this.SendForm){this.ProcessForm();}var _7=this.ParameterList.length;for(var i=0;i<_7;i++){_6+=this.ParameterList[i];_6+=(i+1==_7)?"":"&";}this.Params=_6;};AjaxLib.prototype.Send=function(){this.ParameterList.push(Param("ClientID",this.ClientID));this.ProcessParameters();if(this.OnBeforeServerCall){if(!this.OnBeforeServerCall(this)){return false;}}if(this.SendDelay>999){var fn=this.ClientID+".Execute()";setTimeout(fn,this.SendDelay);}else{this.Execute();}return true;};AjaxLib.prototype.Execute=function(){if(!this.ServerCallFunction){alert("No valid server function found to call.");return;}this.ServerCallFunction(this.Params,"");this.ClearParameter();};AjaxLib.prototype.Add=function(_a){var _b=new AjaxLib();_b.ClientID=_a.ClientID;_b.CallbackFunction=(_a.CallbackFunction)?_a.CallbackFunction:null;_b.OnBeforeServerCall=(_a.OnBeforeServerCall)?_a.OnBeforeServerCall:null;_b.SendDelay=(_a.SendDelay)?_a.SendDelay:0;_b.SendForm=(_a.SendForm)?_a.SendForm:false;_b.AddElementToExclude("__VIEWSTATE");return _b;};AjaxLib.prototype.ServerCallback=function(_c){if(this.CallbackFunction){try{this.CallbackFunction(new AjaxLibReturnObject(_c,this));}catch(e){LogScriptException(e);}}};AjaxLib.prototype.AddElementToExclude=function(_d){if(!ExcludedFormElements){ExcludedFormElements=new Array();}if(!ExcludedFormElements.Contains(_d)){ExcludedFormElements.push(_d);}};AjaxLib.prototype.GetHTTPObject=GetHTTPObject;function GetHTTPObject(){var _e=false;if(window.XMLHttpRequest){_e=new XMLHttpRequest();}else{if(window.ActiveXObject){try{_e=new ActiveXObject("MSXml2.XMLHttp");}catch(e){try{_e=new ActiveXObject("Microsoft.XMLHttp");}catch(e){}}}}if(!_e){return true;}return _e;}function AjaxLibReturnObject(_f,_10){var _11=0;this.value=_f;this.Ajax=_10;this.params=new Object();this.get=function(key,_13){if(_13==null){_13=null;}var _14=this.params[key];return (_14==null)?_13:_14;};var _15=this.value.split("##defineobjects##");var _16=_15[_11].split("&");for(var i=0;i<_16.length;i++){var _18=_16[i].split("=");var _19=unescape(_18[0]);var val=(_18.length==2)?parseValue(unescape(_18[1])):_19;this.params[_19]=val;if(_19){eval("this."+_19+" = val;");}}for(var j=1;j<_15.length;j++){eval("this."+unescape(_15[j]));}}function parseValue(val){return val.replace(/\+/g," ");}function AjaxLibRequestStatus(){this.Loading=1;this.Loaded=2;this.Interactive=3;this.Completed=4;}function Param(_1d,_1e){var val=(encodeURIComponent)?encodeURIComponent(_1e):escape(_1e);return _1d+"="+val;}function Params(){var _20="";var len=Params.arguments.length;for(var i=0;i<Params.arguments.length;i+=2){_20+=Param(Params.arguments[i],Params.arguments[i+1]);_20+=(len>i)?"&":"";}return _20;}function SendAjax(_23,url,_25,_26){var _27=GetHTTPObject();if(_27.preserveWhitespace){_27.preserveWhitespace=true;}_27.open(_23,url,true);_27.setRequestHeader("Content-type","application/x-www-form-urlencoded");_27.setRequestHeader("Connection","close");if(_25){_27.setRequestHeader("Content-length",_25.length);}if(_26){_27.onreadystatechange=_26;}if(_25){_27.send(_25);}else{_27.send(null);}}function LogScriptException(_28){try{LogException(_28.message,_28.fileName,_28.lineNumber);}catch(e){alert("Fatal error "+e.message);}}function LogException(msg,url,_2b){var qs=(window.location.search)?window.location.search:"";var _2d=Params("msg",msg,"url",url,"line",_2b,'stacktrace',GetStackTrace());if(qs){_2d+=Param("qs",qs);}SendAjax("POST","Net2Lib.ClientScriptError.aspx",_2d,null);return true;}function GetStackTrace(){var _2e=[];var _2f=false;try{i.dont.exist+=0;}catch(e){if(e.stack){var _30=e.stack.split("\n");for(var i=0,len=_30.length;i<len;i++){if(_30[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){_2e.push(_30[i]);}}_2e.shift();_2f=true;}else{if(window.opera&&e.message){var _32=e.message.split("\n");for(var i=0,len=_32.length;i<len;i++){if(_32[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var _34=_32[i];if(_32[i+1]){_34+=" at "+_32[i+1];i++;}_2e.push(_34);}}_2e.shift();_2f=true;}}}if(!_2f){var _35=arguments.callee.caller;while(_35){var fn=_35.toString();var _37=fn.substring(fn.indexOf("function")+8,fn.indexOf("("))||"anonymous";_2e.push(_37);_35=_35.caller;}}return _2e.join("<br/><br/>");}function ShowLoader(_38,msg){updateDiv(_38,AjaxLoaderImageTag+"&nbsp;"+msg);}function HideLoader(_3a,msg){var txt=(msg)?msg:"";updateDiv(_3a,txt);}function Ajax_Error( error ){ alert('There was an error while processing your request.  Please try your request again, and if the problem continues, please report the error to in the contact us section.');} var Ajax=new AjaxLib("Global");var ExcludedFormElements=new Array();var AjaxRequestStatus=new AjaxLibRequestStatus();var AjaxLoaderImageSrc='WebResource.axd?d=C5TZsNe6MfSGpttXJDenqNTY4UzQGkekq2aNryHwPdAuR2dLE4xOAmV1-vLfsZvL0&t=633580392600000000';var AjaxLoaderImageTag="<img src=\""+AjaxLoaderImageSrc+"\" alt=\"Loading...\" Border=\"0\" />";newImage(AjaxLoaderImageSrc);if (!String.isNullorEmpty){ String.isNullorEmpty = function ( str ){ return ( str == null || str == "" || str.length == 0 ); } }