function OpenWindow(c,b,a){return window.open(c,"mywin","left=20, top=20, width="+b+", height="+a+", toolbar=0, resizable=0, location=0, directories=0, menubar=0, status=0")}function closeExistingCallout(){if(AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout!=null){AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout.hide()}}Type.registerNamespace("YourQuest");YourQuest.URQuestTextBox=function(a){YourQuest.URQuestTextBox.initializeBase(this,[a]);this._safeKeys=[];this._maxLength=0;this._validators=[];this._keyDownPressDelegate;this._keyReleaseDelegate;this._pageLoadDelegate};YourQuest.URQuestTextBox.prototype={initialize:function(){YourQuest.URQuestTextBox.callBaseMethod(this,"initialize");if(this._maxLength!=0){this._setupSafeKeys();this._keyDownPressDelegate=Function.createDelegate(this,this._keyDownPress);$addHandler(this.get_element(),"keydown",this._keyDownPressDelegate)}this._keyReleaseDelegate=Function.createDelegate(this,this._keyRelease);$addHandler(this.get_element(),"keyup",this._keyReleaseDelegate);this._pageLoadDelegate=Function.createDelegate(this,this._pageLoadEvent);Sys.Application.add_load(this._pageLoadDelegate)},dispose:function(){$removeHandler(this.get_element(),"keyup",this._keyReleaseDelegate);if(this._maxLength!=0){$removeHandler(this.get_element(),"keydown",this._keyDownPressDelegate)}Sys.Application.remove_load(this._pageLoadDelegate);this._safeKeys=null;this._keyDownPressDelegate=null;this._keyReleaseDelegate=null;this._pageLoadDelegate=null;YourQuest.URQuestTextBox.callBaseMethod(this,"dispose")},_pageLoadEvent:function(){if(this.get_element().Validators){var c=this.get_element();var b=c.Validators.length;for(var a=0;a<b;++a){Array.add(this._validators,c.Validators[a])}}},_setupSafeKeys:function(){Array.add(this._safeKeys,37);Array.add(this._safeKeys,38);Array.add(this._safeKeys,39);Array.add(this._safeKeys,40);Array.add(this._safeKeys,127);Array.add(this._safeKeys,8);Array.add(this._safeKeys,9);Array.add(this._safeKeys,35);Array.add(this._safeKeys,36);Array.add(this._safeKeys,13)},_keyDownPress:function(a){if(this.get_element().value.length>=this._maxLength){for(var b=0;b<this._safeKeys.length;++b){if(a.keyCode==this._safeKeys[b]){return}}var c=String.fromCharCode(a.keyCode);if(a.ctrlKey&&(c=="A"||c=="C"||c=="V"||c=="X")){return}a.preventDefault()}},_keyRelease:function(a){if(this._maxLength!=0){if(this.get_element().value.length>this._maxLength){this.get_element().value=this.get_element().value.substring(0,this._maxLength)}}if(a.keyCode!=9){if(this._validators.length!=0){Array.forEach(this._validators,function(b){ValidatorValidate(b)})}}},set_maxLength:function(a){this._maxLength=a},get_maxLength:function(){return this._maxLength}};YourQuest.URQuestTextBox.registerClass("YourQuest.URQuestTextBox",Sys.UI.Control);Type.registerNamespace("YourQuest");YourQuest.PersonStatus=function(){YourQuest.PersonStatus.initializeBase(this);this._isLoggedIn;this._xmlHttp;this._timeStamp;this._timeDifferenceAllowed};YourQuest.PersonStatus.prototype={initialize:function(){YourQuest.PersonStatus.callBaseMethod(this,"initialize");this._isLoggedIn=false;window.PersonStatus=this;this._timeDifferenceAllowed=5;this._timeStamp=new Date()},dispose:function(){YourQuest.PersonStatus.callBaseMethod(this,"dispose")},CheckStatus:function(){if(this._doesUserNeedToAuthAgain()){this._checkForStatus();this._timeStamp=new Date()}},_checkForStatus:function(){this._isLoggedIn=false;var a=window.location+"?test="+new Date().getMilliseconds().toString();if(window.XMLHttpRequest){this._xmlHttp=new XMLHttpRequest()}else{if(window.ActiveXObject){try{this._xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}}if(this._xmlHttp){this._xmlHttp.open("GET",a,false);this._xmlHttp.onreadystatechange=Function.createDelegate(this,this._onSuccess);this._xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");try{this._xmlHttp.send()}catch(b){this._isLoggedIn=false}}if(!this._isLoggedIn){this._redirectUser()}},_redirectUser:function(){var a=new String();a=window.location.toString();a=a.toLowerCase();var c=a.indexOf("securesite");var b;if(c!=-1){b=a.substring(0,c)}else{b="/login.aspx"}window.location=b+"login.aspx?ReturnUrl="+window.location.pathname},_doesUserNeedToAuthAgain:function(){var a=new Date();var b=a-this._timeStamp;b=Math.floor(b/(1000*60));if(b>this._timeDifferenceAllowed){return true}else{return false}},_determineAction:function(d){var b=/(<form.*action="Login.aspx\?ReturnUrl=)/;var a=b.exec(d);var c=a?false:true;return c},_onSuccess:function(){if(this._xmlHttp.readyState==4){if(this._xmlHttp.status==200){if(this._determineAction(this._xmlHttp.responseText)){this._isLoggedIn=true}}}}};YourQuest.PersonStatus.registerClass("YourQuest.PersonStatus",Sys.Component);function getFlashMovieObject(a){if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[a]){return document.embeds[a]}}else{return document.getElementById(a)}}(function(a){a.fn.oneCheckboxSelectedAtAllTimes=function(){var b=this.filter("input:checkbox");b.click(function(){checkedState=a(this).attr("checked");if(!checkedState){var c=false;a(b).each(function(){if(!c){c=a(this).attr("checked")}});if(!c){return false}}})}})(jQuery);(function(a){a.fn.makeCheckboxesMutuallyExclusive=function(){var b=this.filter("input:checkbox");b.click(function(){checkedState=a(this).attr("checked");a(b).each(function(){a(this).attr("checked",false)});a(this).attr("checked",checkedState)})}})(jQuery);