function reset_sip_password(C,B){var D=confirm(t("confirm_reset_sip_password"));if(D!=true){return false}$("#sip_reset_password").hide();$("#sip_reset_password_loading").show();xhr=$.ajax({type:"POST",cache:false,url:"/ajax_reset_sip_password.cgi",data:"server_id="+C+"&ext="+B,error:function(F,H,G){$("#sip_reset_password_loading").hide();$("#sip_reset_password").show();E("An error has occurred making the request: "+G)},success:function(F){$("#sip_reset_password_loading").hide();$("#sip_reset_password").show();A(F)}});function A(F){alert(F)}function E(F){alert(F);return false}}function checkASCIIform(B){var A=B.elements.length;for(i=0;i=48&&A<=57)||(A>=97&&A<=122)||(A>=65&&A<=90)||(A>=33&&A<=40)||A==45||A==46||A==8||A==9||A==95||A==64||A==13){D=0}if(!F&&A==32){D=0}if(D){alert(C+" must only contain "+B+".");E.cancelBubble=true;E.returnValue=false;return false}return true}function checkNum(C,B,A){if(!A){var A=window.event}if(!C){C="This field"}if(A.keyCode){charCode=A.keyCode}else{if(A.which){charCode=A.which}}var D=0;if(((charCode<48)||(charCode>57))&&charCode!=13&&charCode!=8&&charCode!=192&&charCode!=46&&charCode!=37&&charCode!=39&&charCode!=91&&charCode!=9){D=1}if(B){if((charCode==42)||(charCode==35)||(charCode==43)||(charCode==119)){D=0}}if(!B){B=""}if(D){alert(C+" accepts only numbers"+B+".");A.cancelBubble=true;return false}}function checkPhoneNum(C,B,A){if(!A){var A=window.event}if(!C){C="This field"}if(A.keyCode){charCode=A.keyCode}else{if(A.which){charCode=A.which}}var D=0;if(((charCode<48)||(charCode>57))&&charCode!=32&&charCode!=40&&charCode!=41&&charCode!=45&&charCode!=13&&charCode!=8&&charCode!=192&&charCode!=46&&charCode!=37&&charCode!=39&&charCode!=91&&charCode!=9){D=1}if(B){if((charCode==42)||(charCode==35)||(charCode==43)||(charCode==119)){D=0}}if(!B){B=""}if(D){alert(C+" accepts only numbers"+B+".");A.cancelBubble=true;return false}}function placeFocus2(form_name,field_name){var this_form=eval("document.forms."+form_name+"."+field_name);this_form.focus()}function confirmSubmit(B){var A=confirm(B);if(A){return true}else{return false}}function setValueSubmit(A){return prompt(A)}function div_display(B,A){var C=document.getElementById(B);if(!C){return }if(A==1){C.style.display="block"}else{C.style.display="none"}}function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B2){if((A=MM_findObj(B[2]))!=null&&!A.MM_init){A.MM_init=true;A.MM_up=B[3];A.MM_dn=A.src;if((F=document[D])==null){F=document[D]=new Array()}F[F.length]=A;for(C=4;C"+E+"
";document.getElementById("prompt_text").focus();document.getElementById("prompt_text").select()}function setTableWidth(A){var B=document.getElementById(A);if(!B.new_width){B.new_width=B.rows[0].offsetWidth}B.style.width=B.new_width}function Browser(){var B,C,A;this.isIE=false;this.isNS=false;this.version=null;B=navigator.userAgent;C="MSIE";if((A=B.indexOf(C))>=0){this.isIE=true;this.version=parseFloat(B.substr(A+C.length));return }C="Netscape6/";if((A=B.indexOf(C))>=0){this.isNS=true;this.version=parseFloat(B.substr(A+C.length));return }C="Gecko";if((A=B.indexOf(C))>=0){this.isNS=true;this.version=6.1;return }}var browser=new Browser();var dragObj=new Object();dragObj.zIndex=0;function dragStart(C,E){var B;var A,D;if(E){dragObj.elNode=document.getElementById(E)}else{if(browser.isIE){dragObj.elNode=window.event.srcElement}if(browser.isNS){dragObj.elNode=C.target}if(dragObj.elNode.nodeType==3){dragObj.elNode=dragObj.elNode.parentNode}}if(browser.isIE){A=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;D=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop}if(browser.isNS){A=C.clientX+window.scrollX;D=C.clientY+window.scrollY}dragObj.cursorStartX=A;dragObj.cursorStartY=D;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);C.preventDefault()}}function dragGo(B){var A,C;if(browser.isIE){A=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;C=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop}if(browser.isNS){A=B.clientX+window.scrollX;C=B.clientY+window.scrollY}dragObj.elNode.style.left=(dragObj.elStartLeft+A-dragObj.cursorStartX)+"px";dragObj.elNode.style.top=(dragObj.elStartTop+C-dragObj.cursorStartY)+"px";if(browser.isIE){window.event.cancelBubble=true;window.event.returnValue=false}if(browser.isNS){B.preventDefault()}}function dragStop(A){if(browser.isIE){document.detachEvent("onmousemove",dragGo);document.detachEvent("onmouseup",dragStop)}if(browser.isNS){document.removeEventListener("mousemove",dragGo,true);document.removeEventListener("mouseup",dragStop,true)}}local=false;function setLocal(A){local=A}function localURL(B,C,A){if(local==true){B.href=C}else{B.href=A}}function disableText(A){A.disabled=true;A.style.backgroundColor=inputTextColorDisabled()}function enableText(A){A.disabled=false;A.style.backgroundColor=inputTextColorEnabled()}function inputTextColorEnabled(){for(h in document.styleSheets){var A=new Array();if(document.styleSheets[h].cssRules){A=document.styleSheets[h].cssRules}else{if(document.styleSheets[h].rules){A=document.styleSheets[h].rules}}for(i in A){if(A[i]["selectorText"]=="input.input_text"||A[i]["selectorText"]=="INPUT.input_text"){return A[i].style.backgroundColor}}}}function inputTextColorDisabled(){for(h in document.styleSheets){var A=new Array();if(document.styleSheets[h].cssRules){A=document.styleSheets[h].cssRules}else{if(document.styleSheets[h].rules){A=document.styleSheets[h].rules}}for(i in A){if(A[i]["selectorText"]=="input.input_text_disabled"||A[i]["selectorText"]=="INPUT.input_text_disabled"){return A[i].style.backgroundColor}}}}function showAllRows(C){var B=document.getElementById(C);for(var A=0;AH}else{I=A0){J=E;A=H}}if(J>G){F=D.removeChild(D.rows[J]);D.insertBefore(F,D.rows[G])}}D.style.display=K;return false}function clog(A){}function up_down(A){up_id=document.getElementById("up"+A);down_id=document.getElementById("down"+A);down_id.style.display=down_id.style.display=="none"?"inline":"none";var B=up_id.style.display=="none"?"inline":"none";up_id.style.display=B;if(B=="none"){sort_table("tbody",A,0)}else{sort_table("tbody",A,1)}}function validPhoneNumber(B){var A=/\D/g;B=B.replace(/[()\- ]/g,"");B=B.replace(/^\s*\+/,"");if(B.length<10){return false}else{if(B.match(A)){return false}else{return true}}}function fixTableWidths(A){var B=0;for(i=0;iB){B=$(A[i]).offsetWidth}}}for(i=0;i";$("callforward").value=$("call_forward_ext").value}else{if(document.getElementById("call_forward")&&document.getElementById("call_forward").value=="-keycode-"){call_fwd_exten=1;document.getElementById("call_fwd").innerHTML="";$("callforward").value=$("call_forward_ext").value}else{if($("call_forward")){$("callforward").value=$("call_forward").value}}}}function checkExten(){if(document.getElementById("call_forward_ext").value==""){call_fwd_exten=0;document.getElementById("call_fwd").innerHTML=call_fwd_list;if($("call_forward")){$("callforward").value=$("call_forward").value}}else{$("callforward").value=$("call_forward_ext").value}}var changedCID=0;function matchCID(B){if(changedCID==1){return false}if(B.selectedIndex==0){document.forms.f.caller_id.selectedIndex=0}didValue=B.options[B.selectedIndex].value;for(var A=1;A');FONALITY.panel.wait.render(document.body);FONALITY.panel.wait.show()}function defaultCDRSettings(A){if(!A.showinbound.checked&&!A.showoutbound.checked&&!A.showext2ext.checked&&!A.showacd.checked&&!A.showinternal.checked&&!A.showbarge.checked){A.showinbound.checked=A.showoutbound.checked=true}if(!A.src.checked&&!A.dst.checked&&!A.disposition.checked&&!A.calldate.checked&&!A.duration.checked&&!A.billsec.checked&&!A.clid.checked){A.src.checked=A.dst.checked=A.disposition.checked=A.calldate.checked=A.duration.checked=A.billsec.checked=true}}function setDates(A,B){if(!dateValidation(B)){alert("You have entered an invalid date format.")}}function alterFromCountry(){var C=document.forms[0]["country"];var A=document.forms[0]["Country_opermode_loadzone"];var E=C.options[C.selectedIndex].value;var D;for(var B=0;B-1){B=B.replace(/set_language=\w+/g,"")}if(B.length){B+="&set_language="+D}else{B="?set_language="+D}}var A=window.location+"";if(A.indexOf("?")>-1){A=A.substring(0,A.indexOf("?"))}window.location=A+B}function get_ext_info(E,H,F,D,C){var A="/ajax_get_ext_info.cgi?server_id="+E+"&extension="+H+"&action="+F+"&type="+D;var G=document.getElementById(C+"_loading");var B=document.getElementById(C);G.style.display="inline";B.style.display="none";ajax=new Ajax();ajax.onDone=function(J,K){var I=K.split("\n");if(I[0]==1){alert(I[1])}else{alert("You are not logged in correctly")}G.style.display="none";B.style.display="inline"};ajax.get(A);return false}function get_device_info(F,C,E,D){var A="/ajax_get_device_info.cgi?server_id="+F+"&device_id="+C+"&type="+E;var G=document.getElementById(D+"_loading");var B=document.getElementById(D);G.style.display="inline";B.style.display="none";ajax=new Ajax();ajax.onDone=function(I,J){var H=J.split("\n");if(H[0]==1){alert(H[1])}else{alert("You are not logged in correctly")}G.style.display="none";B.style.display="inline"};ajax.get(A);return false}function get_ftp_info(D,C){var A="/ajax_get_ftp_info.cgi?server_id="+D;var E=document.getElementById(C+"_loading");var B=document.getElementById(C);E.style.display="inline";B.style.display="none";ajax=new Ajax();ajax.onDone=function(G,H){var F=H.split("\n");if(F[0]==1){var I=F[1]+"\n"+F[2]+"\n"+F[3];alert(I)}else{alert("You are not logged in correctly")}E.style.display="none";B.style.display="inline"};ajax.get(A);return false}function check_reset_password_form(){var B=document.getElementById("email").value;var A=document.getElementById("username").value;if(B==""||A==""){alert(t("reset_enter_user_email","Please enter your username and email"));return false}else{return true}}function check_update_password_form(){var B=document.getElementById("new_pass").value;var A=document.getElementById("confirm_pass").value;if(B==""){alert(t("reset_enter_pass","Please enter a new password"));return false}else{if(B!=A){alert(t("reset_pw_dont_match","Passwords do not match"));return false}else{return true}}}function check_lan_access(D,C,B){var A=document.createElement("img");A.src="http://"+D+"/phone/spacer.gif";A.style.display="none";A.onload=C;if(B!=undefined){A.onerror=B}document.body.appendChild(A)}var viewport={getWinWidth:function(){this.width=0;if(window.innerWidth){this.width=window.innerWidth-18}else{if(document.documentElement&&document.documentElement.clientWidth){this.width=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){this.width=document.body.clientWidth}}}},getWinHeight:function(){this.height=0;if(window.innerHeight){this.height=window.innerHeight-18}else{if(document.documentElement&&document.documentElement.clientHeight){this.height=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){this.height=document.body.clientHeight}}}},getScrollX:function(){this.scrollX=0;if(typeof window.pageXOffset=="number"){this.scrollX=window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){this.scrollX=document.documentElement.scrollLeft}else{if(document.body&&document.body.scrollLeft){this.scrollX=document.body.scrollLeft}else{if(window.scrollX){this.scrollX=window.scrollX}}}}},getScrollY:function(){this.scrollY=0;if(typeof window.pageYOffset=="number"){this.scrollY=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){this.scrollY=document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop){this.scrollY=document.body.scrollTop}else{if(window.scrollY){this.scrollY=window.scrollY}}}}},getAll:function(){this.getWinWidth();this.getWinHeight();this.getScrollX();this.getScrollY()}};var dw_event={add:function(D,C,A,B){B=B||false;if(D.addEventListener){D.addEventListener(C,A,B)}else{if(D.attachEvent){D.attachEvent("on"+C,A)}}},remove:function(D,C,A,B){B=B||false;if(D.removeEventListener){D.removeEventListener(C,A,B)}else{if(D.detachEvent){D.detachEvent("on"+C,A)}}},DOMit:function(A){A=A?A:window.event;A.tgt=A.srcElement?A.srcElement:A.target;if(!A.preventDefault){A.preventDefault=function(){return false}}if(!A.stopPropagation){A.stopPropagation=function(){if(window.event){window.event.cancelBubble=true}}}return A}};var RollTip={followMouse:true,overlaySelects:true,offX:12,offY:12,ID:"rolltipDiv",showAni:400,hideAni:200,ovTimer:0,ready:false,timer:null,tip:null,shim:null,supportsOverlay:false,init:function(){var C=navigator.userAgent;var B=C.indexOf("Opera");var A=(B==-1||parseFloat(C.slice(B+6))>7.5)?true:false;if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined"&&A){var D=document.createElement("DIV");D.id=this.ID;document.body.appendChild(D);this.showMult=D.offsetWidth/this.showAni/this.showAni;this.hideMult=D.offsetWidth/this.hideAni/this.hideAni;D.style.clip="rect(0, 0, 0, 0)";D.style.visibility="visible";this.supportsOverlay=this.checkOverlaySupport();this.ready=true}},reveal:function(E,C,D,A,B){if(this.timer){clearTimeout(this.timer);this.timer=0}if(this.overlaySelects&&this.supportsOverlay){if(this.ovTimer){clearTimeout(this.ovTimer);this.ovTimer=0}this.ovTimer=setTimeout("RollTip.toggleOverlay("+1+")",10)}this.tip=document.getElementById(this.ID);this.writeTip("");this.writeTip(E);viewport.getAll();this.w=this.tip.offsetWidth;this.h=this.tip.offsetHeight;this.startTime=(new Date()).getTime();this.positionTip(C);if(this.tip){if(D){this.tip.style.backgroundColor=D}if(A){this.tip.style.width=A}if(B){this.tip.style.textAlign=B}}if(this.followMouse){dw_event.add(document,"mousemove",this.trackMouse,true)}this.timer=setInterval("RollTip.rollOut()",10)},rollOut:function(){var A=(new Date()).getTime()-this.startTime;if(Aviewport.width+viewport.scrollX){A=A-this.tip.offsetWidth-this.offX}else{A=A+this.offX}if(C+this.tip.offsetHeight+this.offY>viewport.height+viewport.scrollY){C=C-this.tip.offsetHeight-this.offY;if(C')}this.shim=document.getElementById("tipShim");if(this.shim){switch(A){case 1:this.shim.style.left=this.tip.style.left;this.shim.style.top=this.tip.style.top;this.shim.style.width=this.tip.offsetWidth+"px";this.shim.style.height=this.tip.offsetHeight+"px";this.shim.style.visibility="visible";break;case 0:this.shim.style.visibility="hidden";this.shim=null;break}}}}};function showRollTip(E,C,D,A,B){if(typeof RollTip=="undefined"||!RollTip.ready){return }RollTip.reveal(E,C,D,A,B);RollTip.conceal();RollTip.reveal(E,C,D,A,B)}function hideRollTip(){if(typeof RollTip=="undefined"||!RollTip.ready){return }RollTip.conceal()}if(typeof FONALITY=="undefined"){FONALITY={}}FONALITY.namespace=function(C){if(!C||!C.length){return null}var D=C.split(".");var B=FONALITY;for(var A=(D[0]=="FONALITY")?1:0;A=0){P=I[Q]}if(!L||!P){return false}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=D[N];if(M){for(O=0,R=M.length;O0)}var Q=[];for(var N=0,O=F.length;N0){for(var M=0,K=I.length;M0){var N=I.length;while(N){var M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M)}L=null;N=N-1}Q.clearCache()}for(O=0,K=G.length;O-1);var H=(B.indexOf("safari")>-1);var D=(window.ActiveXObject);var E=0;var F=FONALITY.util;var A={};var I=function(K){var L=function(N){var M=/(-[a-z])/i.exec(N);return N.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())};while(K.indexOf("-")>-1){K=L(K)}return K};var G=function(M){if(M.indexOf("-")>-1){return M}var N="";for(var L=0,K=M.length;L=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};FONALITY.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};FONALITY.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new FONALITY.util.Region(C,D,A,B)}else{return null}};FONALITY.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new FONALITY.util.Region(C,D,A,B)};FONALITY.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};FONALITY.util.Region.getRegion=function(D){var F=FONALITY.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new FONALITY.util.Region(C,E,A,B)};FONALITY.util.Point=function(A,B){if(A instanceof Array){B=A[1];A=A[0]}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B};FONALITY.util.Point.prototype=new FONALITY.util.Region();FONALITY.util.DragDrop=function(C,A,B){if(C){this.init(C,A,B)}};FONALITY.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,b4StartDrag:function(A,B){},startDrag:function(A,B){},b4Drag:function(A){},onDrag:function(A){},onDragEnter:function(A,B){},b4DragOver:function(A){},onDragOver:function(A,B){},b4DragOut:function(A){},onDragOut:function(A,B){},b4DragDrop:function(A){},onDragDrop:function(A,B){},b4EndDrag:function(A){},endDrag:function(A){},b4MouseDown:function(A){},onMouseDown:function(A){},onMouseUp:function(A){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=FONALITY.util.Dom.get(this.id)}return this._domRef},getDragEl:function(){return FONALITY.util.Dom.get(this.dragElId)},init:function(C,A,B){this.initTarget(C,A,B);FONALITY.util.Event.addListener(this.id,"mousedown",this.handleMouseDown,this,true)},initTarget:function(C,A,B){this.config=B||{};this.DDM=FONALITY.util.DDM;this.groups={};this.id=C;this.addToGroup((A)?A:"default");this.handleElId=C;FONALITY.util.Event.onAvailable(C,this.handleOnAvailable,this,true);this.setDragElId(C);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(C,A,D,B){if(!A&&0!==A){this.padding=[C,C,C,C]}else{if(!D&&0!==D){this.padding=[C,A,C,A]}else{this.padding=[C,A,D,B]}}},setInitPosition:function(D,C){var E=this.getEl();if(!this.DDM.verifyEl(E)){return }var B=D||0;var A=C||0;var F=FONALITY.util.Dom.getXY(E);this.initPageX=F[0]-B;this.initPageY=F[1]-A;this.lastPageX=F[0];this.lastPageY=F[1];this.setStartPosition(F)},setStartPosition:function(B){var A=B||FONALITY.util.Dom.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=A[0];this.startPageY=A[1]},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A)},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A]}this.DDM.removeDDFromGroup(this,A)},setDragElId:function(A){this.dragElId=A},setHandleElId:function(A){this.handleElId=A;this.DDM.regHandle(this.id,A)},setOuterHandleElId:function(A){FONALITY.util.Event.addListener(A,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(A)},unreg:function(){FONALITY.util.Event.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(F,E){var D=FONALITY.util.Event;var B=F.which||F.button;if(this.primaryButtonOnly&&B>1){return }if(this.isLocked()){return }this.DDM.refreshCache(this.groups);var C=new FONALITY.util.Point(D.getPageX(F),D.getPageY(F));if(!this.DDM.isOverTarget(C,this)){}else{var A=D.getTarget(F);if(this.isValidHandleChild(A)&&(this.id==this.handleElId||this.DDM.handleWasClicked(A,this.id))){this.setStartPosition();this.b4MouseDown(F);this.onMouseDown(F);this.DDM.handleMouseDown(F,this);this.DDM.stopEvent(F)}}},addInvalidHandleType:function(A){var B=A.toUpperCase();this.invalidHandleTypes[B]=B},addInvalidHandleId:function(A){this.invalidHandleIds[A]=A},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A)},removeInvalidHandleType:function(A){var B=A.toUpperCase();delete this.invalidHandleTypes[B]},removeInvalidHandleId:function(A){delete this.invalidHandleIds[A]},removeInvalidHandleClass:function(B){for(var C=0,A=this.invalidHandleClasses.length;C=this.minX;B=B-A){if(!C[B]){this.xTicks[this.xTicks.length]=B;C[B]=true}}for(B=this.initPageX;B<=this.maxX;B=B+A){if(!C[B]){this.xTicks[this.xTicks.length]=B;C[B]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(D,A){this.yTicks=[];this.yTickSize=A;var C={};for(var B=this.initPageY;B>=this.minY;B=B-A){if(!C[B]){this.yTicks[this.yTicks.length]=B;C[B]=true}}for(B=this.initPageY;B<=this.maxY;B=B+A){if(!C[B]){this.yTicks[this.yTicks.length]=B;C[B]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(C,B,A){this.leftConstraint=C;this.rightConstraint=B;this.minX=this.initPageX-C;this.maxX=this.initPageX+B;if(A){this.setXTicks(this.initPageX,A)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(A,C,B){this.topConstraint=A;this.bottomConstraint=C;this.minY=this.initPageY-A;this.maxY=this.initPageY+C;if(B){this.setYTicks(this.initPageY,B)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var B=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var A=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(B,A)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(G,D){if(!D){return G}else{if(D[0]>=G){return D[0]}else{for(var B=0,A=D.length;B=G){var F=G-D[B];var E=D[C]-G;return(E>F)?D[B]:D[C]}}return D[D.length-1]}}},toString:function(){return("DragDrop "+this.id)}};if(!FONALITY.util.DragDropMgr){FONALITY.util.DragDropMgr=new function(){this.ids={};this.handleIds={};this.dragCurrent=null;this.dragOvers={};this.deltaX=0;this.deltaY=0;this.preventDefault=true;this.stopPropagation=true;this.initalized=false;this.locked=false;this.init=function(){this.initialized=true};this.POINT=0;this.INTERSECT=1;this.mode=this.POINT;this._execOnAll=function(C,B){for(var D in this.ids){for(var A in this.ids[D]){var E=this.ids[D][A];if(!this.isTypeOfDD(E)){continue}E[C].apply(E,B)}}};this._onLoad=function(){this.init();var A=FONALITY.util.Event;A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)};this._onResize=function(A){this._execOnAll("resetConstraints",[])};this.lock=function(){this.locked=true};this.unlock=function(){this.locked=false};this.isLocked=function(){return this.locked};this.locationCache={};this.useCache=true;this.clickPixelThresh=3;this.clickTimeThresh=1000;this.dragThreshMet=false;this.clickTimeout=null;this.startX=0;this.startY=0;this.regDragDrop=function(B,A){if(!this.initialized){this.init()}if(!this.ids[A]){this.ids[A]={}}this.ids[A][B.id]=B};this.removeDDFromGroup=function(C,A){if(!this.ids[A]){this.ids[A]={}}var B=this.ids[A];if(B&&B[C.id]){delete B[C.id]}};this._remove=function(B){for(var A in B.groups){if(A&&this.ids[A][B.id]){delete this.ids[A][B.id]}}delete this.handleIds[B.id]};this.regHandle=function(B,A){if(!this.handleIds[B]){this.handleIds[B]={}}this.handleIds[B][A]=A};this.isDragDrop=function(A){return(this.getDDById(A))?true:false};this.getRelated=function(E,B){var D=[];for(var C in E.groups){for(j in this.ids[C]){var A=this.ids[C][j];if(!this.isTypeOfDD(A)){continue}if(!B||A.isTarget){D[D.length]=A}}}return D};this.isLegalTarget=function(E,D){var B=this.getRelated(E,true);for(var C=0,A=B.length;Cthis.clickPixelThresh||A>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(C);this.dragCurrent.onDrag(C);this.fireEvents(C,false)}this.stopEvent(C);return true};this.fireEvents=function(J,L){var O=this.dragCurrent;if(!O||O.isLocked()){return }var M=FONALITY.util.Event.getPageX(J);var K=FONALITY.util.Event.getPageY(J);var P=new FONALITY.util.Point(M,K);var A=[];var D=[];var H=[];var F=[];var C=[];for(var E in this.dragOvers){var B=this.dragOvers[E];if(!this.isTypeOfDD(B)){continue}if(!this.isOverTarget(P,B,this.mode)){D.push(B)}A[E]=true;delete this.dragOvers[E]}for(var N in O.groups){if("string"!=typeof N){continue}for(E in this.ids[N]){var G=this.ids[N][E];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=O){if(this.isOverTarget(P,G,this.mode)){if(L){F.push(G)}else{if(!A[G.id]){C.push(G)}else{H.push(G)}this.dragOvers[G.id]=G}}}}}if(this.mode){if(D.length){O.b4DragOut(J,D);O.onDragOut(J,D)}if(C.length){O.onDragEnter(J,C)}if(H.length){O.b4DragOver(J,H);O.onDragOver(J,H)}if(F.length){O.b4DragDrop(J,F);O.onDragDrop(J,F)}}else{var I=0;for(E=0,I=D.length;E2000){}else{setTimeout(A._addListeners,10);if(document&&document.body){A._timeoutCount+=1}}}};this.handleWasClicked=function(A,C){if(this.isHandle(C,A.id)){return true}else{var B=A.parentNode;while(B){if(this.isHandle(C,B.id)){return true}else{B=B.parentNode}}}return false}}();FONALITY.util.DDM=FONALITY.util.DragDropMgr;FONALITY.util.DDM._addListeners()}FONALITY.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};FONALITY.extend(FONALITY.util.DD,FONALITY.util.DragDrop);FONALITY.util.DD.prototype.scroll=true;FONALITY.util.DD.prototype.autoOffset=function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)};FONALITY.util.DD.prototype.setDelta=function(B,A){this.deltaX=B;this.deltaY=A};FONALITY.util.DD.prototype.setDragElPos=function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)};FONALITY.util.DD.prototype.alignElWithMouse=function(B,F,E){var D=this.getTargetCoord(F,E);if(!this.deltaSetXY){var G=[D.x,D.y];FONALITY.util.Dom.setXY(B,G);var C=parseInt(FONALITY.util.Dom.getStyle(B,"left"),10);var A=parseInt(FONALITY.util.Dom.getStyle(B,"top"),10);this.deltaSetXY=[C-D.x,A-D.y]}else{FONALITY.util.Dom.setStyle(B,"left",(D.x+this.deltaSetXY[0])+"px");FONALITY.util.Dom.setStyle(B,"top",(D.y+this.deltaSetXY[1])+"px")}this.cachePosition(D.x,D.y);this.autoScroll(D.x,D.y,B.offsetHeight,B.offsetWidth)};FONALITY.util.DD.prototype.cachePosition=function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=FONALITY.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}};FONALITY.util.DD.prototype.autoScroll=function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-Dthis.maxX){A=this.maxX}}if(this.constrainY){if(Dthis.maxY){D=this.maxY}}A=this.getTick(A,this.xTicks);D=this.getTick(D,this.yTicks);return{x:A,y:D}};FONALITY.util.DD.prototype.applyConfig=function(){FONALITY.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)};FONALITY.util.DD.prototype.b4MouseDown=function(A){this.autoOffset(FONALITY.util.Event.getPageX(A),FONALITY.util.Event.getPageY(A))};FONALITY.util.DD.prototype.b4Drag=function(A){this.setDragElPos(FONALITY.util.Event.getPageX(A),FONALITY.util.Event.getPageY(A))};FONALITY.util.DD.prototype.toString=function(){return("DD "+this.id)};FONALITY.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};FONALITY.extend(FONALITY.util.DDProxy,FONALITY.util.DD);FONALITY.util.DDProxy.dragElId="ygddfdiv";FONALITY.util.DDProxy.prototype.resizeFrame=true;FONALITY.util.DDProxy.prototype.centerFrame=false;FONALITY.util.DDProxy.prototype.createFrame=function(){var B=this;var A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return }var D=this.getDragEl();if(!D){D=document.createElement("div");D.id=this.dragElId;var C=D.style;C.position="absolute";C.visibility="hidden";C.cursor="move";C.border="2px solid #aaa";C.zIndex=999;A.insertBefore(D,A.firstChild)}};FONALITY.util.DDProxy.prototype.initFrame=function(){this.createFrame()};FONALITY.util.DDProxy.prototype.applyConfig=function(){FONALITY.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||FONALITY.util.DDProxy.dragElId)};FONALITY.util.DDProxy.prototype.showFrame=function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);FONALITY.util.Dom.setStyle(A,"visibility","visible")};FONALITY.util.DDProxy.prototype._resizeProxy=function(){if(this.resizeFrame){var H=FONALITY.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}};FONALITY.util.DDProxy.prototype.b4MouseDown=function(B){var A=FONALITY.util.Event.getPageX(B);var C=FONALITY.util.Event.getPageY(B);this.autoOffset(A,C);this.setDragElPos(A,C)};FONALITY.util.DDProxy.prototype.b4StartDrag=function(A,B){this.showFrame(A,B)};FONALITY.util.DDProxy.prototype.b4EndDrag=function(A){FONALITY.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")};FONALITY.util.DDProxy.prototype.endDrag=function(D){var C=FONALITY.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");FONALITY.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")};FONALITY.util.DDProxy.prototype.toString=function(){return("DDProxy "+this.id)};FONALITY.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};FONALITY.extend(FONALITY.util.DDTarget,FONALITY.util.DragDrop);FONALITY.util.DDTarget.prototype.toString=function(){return("DDTarget "+this.id)};FONALITY.util.Anim=function(B,A,C,D){if(B){this.init(B,A,C,D)}};FONALITY.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName;return("Anim "+B)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames)},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0}FONALITY.util.Dom.setStyle(this.getEl(),A,C+B)},getAttribute:function(A){var C=this.getEl();var E=FONALITY.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E)}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(FONALITY.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)]}else{E=0}return E},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined")};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"]}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};FONALITY.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(K[0] instanceof Array)){K=[K]}else{var J=[];for(L=0,N=K.length;L0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K)}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H}else{E.setRuntimeAttribute.call(this,O)}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F};var C=function(F){return(typeof F!=="undefined")}})();(function(){FONALITY.util.Scroll=function(E,D,F,G){if(E){FONALITY.util.Scroll.superclass.constructor.call(this,E,D,F,G)}};FONALITY.extend(FONALITY.util.Scroll,FONALITY.util.ColorAnim);var B=FONALITY.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E)};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)]}else{F=C.doMethod.call(this,D,G,E)}return F};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop]}else{F=C.getAttribute.call(this,D)}return F};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1]}else{C.setAttribute.call(this,D,G,F)}}})();FONALITY.util.Connect={_msxml_progid:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],_http_header:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded",_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){this._use_default_post_header=A},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E}}catch(C){for(var B=0;B=200&&C<300){try{B=this.createResponseObject(E,F.argument);if(F.success){if(!F.scope){F.success(B)}else{F.success.apply(F.scope,[B])}}}catch(D){}}else{try{switch(C){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:B=this.createExceptionObject(E.tId,F.argument,(A?A:false));if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}break;default:B=this.createResponseObject(E,F.argument);if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}}}catch(D){}}this.releaseObject(E);B=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E');if(typeof A=="boolean"){C.src="javascript:false"}else{C.src=A}}else{var C=document.createElement("IFRAME");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},uploadFile:function(F,E,C){var B="yuiIO"+F;var D=document.getElementById(B);this._formNode.action=C;this._formNode.enctype="multipart/form-data";this._formNode.method="POST";this._formNode.target=B;this._formNode.submit();this._formNode=null;this._isFileUpload=false;this._isFormSubmit=false;var A=function(){var G={};G.tId=F;G.responseText=D.contentWindow.document.body?D.contentWindow.document.body.innerHTML:null;G.responseXML=D.contentWindow.document.XMLDocument?D.contentWindow.document.XMLDocument:D.contentWindow.document;G.argument=E.argument;if(E.upload){if(!E.scope){E.upload(G)}else{E.upload.apply(E.scope,[G])}}if(FONALITY.util.Event){FONALITY.util.Event.removeListener(D,"load",A)}else{if(window.ActiveXObject){D.detachEvent("onload",A)}else{D.removeEventListener("load",A,false)}}setTimeout(function(){document.body.removeChild(D)},100)};if(FONALITY.util.Event){FONALITY.util.Event.addListener(D,"load",A)}else{if(window.ActiveXObject){D.attachEvent("onload",A)}else{D.addEventListener("load",A,false)}}},abort:function(B,C,A){if(this.isCallInProgress(B)){B.conn.abort();window.clearInterval(this._poll[B.tId]);delete this._poll[B.tId];if(A){delete this._timeOut[B.tId]}this.handleTransactionResponse(B,C,true);return true}else{return false}},isCallInProgress:function(A){if(A.conn){return A.conn.readyState!=4&&A.conn.readyState!=0}else{return false}},releaseObject:function(A){A.conn=null;A=null}};FONALITY.util.Config=function(A){if(A){this.init(A)}};FONALITY.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(B,A){},getConfig:function(){},getProperty:function(A){},resetProperty:function(A){},setProperty:function(B,C,A){},queueProperty:function(A,B){},refireEvent:function(A){},applyConfig:function(A,B){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(B,C,D,A){},unsubscribeFromConfigEvent:function(A,B,C){},checkBoolean:function(A){if(typeof A=="boolean"){return true}else{return false}},checkNumber:function(A){if(isNaN(A)){return false}else{return true}}};FONALITY.util.Config.prototype.init=function(A){this.owner=A;this.configChangedEvent=new FONALITY.util.CustomEvent("configChanged");this.queueInProgress=false;var C={};var E={};var B=[];var D=function(F,H){F=F.toLowerCase();var G=C[F];if(typeof G!="undefined"&&G.event){G.event.fire(H)}};this.addProperty=function(G,F){G=G.toLowerCase();C[G]=F;F.event=new FONALITY.util.CustomEvent(G);F.key=G;if(F.handler){F.event.subscribe(F.handler,this.owner,true)}this.setProperty(G,F.value,true);if(!F.suppressEvent){this.queueProperty(G,F.value)}};this.getConfig=function(){var F={};for(var H in C){var G=C[H];if(typeof G!="undefined"&&G.event){F[H]=G.value}}return F};this.getProperty=function(F){F=F.toLowerCase();var G=C[F];if(typeof G!="undefined"&&G.event){return G.value}else{return undefined}};this.resetProperty=function(F){F=F.toLowerCase();var G=C[F];if(typeof G!="undefined"&&G.event){this.setProperty(F,E[F].value)}else{return undefined}};this.setProperty=function(G,I,F){G=G.toLowerCase();if(this.queueInProgress&&!F){this.queueProperty(G,I);return true}else{var H=C[G];if(typeof H!="undefined"&&H.event){if(H.validator&&!H.validator(I)){return false}else{H.value=I;if(!F){D(G,I);this.configChangedEvent.fire([G,I])}return true}}else{return false}}};this.queueProperty=function(R,O){R=R.toLowerCase();var Q=C[R];if(typeof Q!="undefined"&&Q.event){if(typeof O!="undefined"&&Q.validator&&!Q.validator(O)){return false}else{if(typeof O!="undefined"){Q.value=O}else{O=Q.value}var K=false;for(var L=0;LO){M=O}}if(LA){L=A}}this.cfg.setProperty("x",M,true);this.cfg.setProperty("y",L,true);this.cfg.setProperty("xy",[M,L],true)};FONALITY.widget.Overlay.prototype.center=function(){var G=document.documentElement.scrollLeft||document.body.scrollLeft;var E=document.documentElement.scrollTop||document.body.scrollTop;var B=FONALITY.util.Dom.getClientWidth();var F=FONALITY.util.Dom.getClientHeight();var D=this.element.offsetWidth;var C=this.element.offsetHeight;var A=(B/2)-(D/2)+G;var H=(F/2)-(C/2)+E;this.element.style.left=parseInt(A,10)+"px";this.element.style.top=parseInt(H,10)+"px";this.syncPosition();this.cfg.refireEvent("iframe")};FONALITY.widget.Overlay.prototype.syncPosition=function(){var A=FONALITY.util.Dom.getXY(this.element);this.cfg.setProperty("x",A[0],true);this.cfg.setProperty("y",A[1],true);this.cfg.setProperty("xy",A,true)};FONALITY.widget.Overlay.prototype.onDomResize=function(B,A){FONALITY.widget.Overlay.superclass.onDomResize.call(this,B,A);this.cfg.refireEvent("iframe")};FONALITY.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;FONALITY.widget.Overlay.superclass.destroy.call(this)};FONALITY.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id};FONALITY.widget.Overlay.windowScrollEvent=new FONALITY.util.CustomEvent("windowScroll");FONALITY.widget.Overlay.windowResizeEvent=new FONALITY.util.CustomEvent("windowResize");FONALITY.widget.Overlay.windowScrollHandler=function(A){FONALITY.widget.Overlay.windowScrollEvent.fire()};FONALITY.widget.Overlay.windowResizeHandler=function(A){FONALITY.widget.Overlay.windowResizeEvent.fire()};FONALITY.widget.Overlay._initialized=null;if(FONALITY.widget.Overlay._initialized===null){FONALITY.util.Event.addListener(window,"scroll",FONALITY.widget.Overlay.windowScrollHandler);FONALITY.util.Event.addListener(window,"resize",FONALITY.widget.Overlay.windowResizeHandler);FONALITY.widget.Overlay._initialized=true}FONALITY.widget.OverlayManager=function(A){this.init(A)};FONALITY.widget.OverlayManager.CSS_FOCUSED="focused";FONALITY.widget.OverlayManager.prototype={constructor:FONALITY.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},getActive:function(){},focus:function(A){},remove:function(A){},blurAll:function(){},init:function(C){this.cfg=new FONALITY.util.Config(this);this.initDefaultConfig();if(C){this.cfg.applyConfig(C,true)}this.cfg.fireQueue();var B=null;this.getActive=function(){return B};this.focus=function(D){var F=this.find(D);if(F){this.blurAll();B=F;FONALITY.util.Dom.addClass(B.element,FONALITY.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var E=FONALITY.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(E)&&this.overlays[0]!=D){B.cfg.setProperty("zIndex",(parseInt(E,10)+2))}this.overlays.sort(this.compareZIndexDesc)}};this.remove=function(E){var F=this.find(E);if(F){var D=FONALITY.util.Dom.getStyle(F.element,"zIndex");F.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);F.cfg.setProperty("zIndex",D,true);F.cfg.setProperty("manager",null);F.focusEvent=null;F.blurEvent=null;F.focus=null;F.blur=null}};this.blurAll=function(){B=null;for(var D=0;D0){return true}}else{return false}}},find:function(A){if(A instanceof FONALITY.widget.Overlay){for(var C=0;CA){return -1}else{if(B';this.body.innerHTML+=A;D=this.element.getElementsByTagName("FORM")[0]}this.firstFormElement=function(){for(var G=0;G=0;G--){var F=D.elements[G];if(F.focus){if(F.type&&F.type!="hidden"){return F}}}return null}();this.form=D;if(this.cfg.getProperty("modal")&&this.form){var C=this;var B=this.firstFormElement||this.firstButton;if(B){this.preventBackTab=new FONALITY.util.KeyListener(B,{shift:true,keys:9},{fn:C.focusLast,scope:C,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true)}var E=this.lastButton||this.lastFormElement;if(E){this.preventTabOut=new FONALITY.util.KeyListener(E,{shift:false,keys:9},{fn:C.focusFirst,scope:C,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true)}}};FONALITY.widget.Dialog.prototype.configButtons=function(D,B,G){var E=B[0];if(E!="none"){this.buttonSpan=null;this.buttonSpan=document.createElement("SPAN");this.buttonSpan.className="button-group";this.buttonSpan.id="supportal_footer_span";for(var A=0;A'};FONALITY.widget.SimpleDialog.prototype.configIcon=function(C,A,E){var B=A[0];if(B&&B!="none"){var D='';this.body.innerHTML=D+this.body.innerHTML}};FONALITY.widget.SimpleDialog.prototype.configText=function(B,A,C){var D=A[0];if(D){this.setBody(D);this.cfg.refireEvent("icon")}};FONALITY.widget.SimpleDialog.prototype.toString=function(){return"SimpleDialog "+this.id};FONALITY.widget.ContainerEffect=function(B,E,D,A,C){if(!C){C=FONALITY.util.Anim}this.overlay=B;this.attrIn=E;this.attrOut=D;this.targetElement=A||B.element;this.animClass=C};FONALITY.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new FONALITY.util.CustomEvent("beforeAnimateIn");this.beforeAnimateOutEvent=new FONALITY.util.CustomEvent("beforeAnimateOut");this.animateInCompleteEvent=new FONALITY.util.CustomEvent("animateInComplete");this.animateOutCompleteEvent=new FONALITY.util.CustomEvent("animateOutComplete");this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)};FONALITY.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate()};FONALITY.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()};FONALITY.widget.ContainerEffect.prototype.handleStartAnimateIn=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.handleStartAnimateOut=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(B,A,C){};FONALITY.widget.ContainerEffect.prototype.toString=function(){var A="ContainerEffect";if(this.overlay){A+=" ["+this.overlay.toString()+"]"}return A};FONALITY.widget.ContainerEffect.FADE=function(A,B){var C=new FONALITY.widget.ContainerEffect(A,{attributes:{opacity:{from:0,to:1}},duration:B,method:FONALITY.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:B,method:FONALITY.util.Easing.easeOut},A.element);C.handleStartAnimateIn=function(E,D,F){FONALITY.util.Dom.addClass(F.overlay.element,"hide-select");if(!F.overlay.underlay){F.overlay.cfg.refireEvent("underlay")}if(F.overlay.underlay){F.initialUnderlayOpacity=FONALITY.util.Dom.getStyle(F.overlay.underlay,"opacity");F.overlay.underlay.style.filter=null}FONALITY.util.Dom.setStyle(F.overlay.element,"visibility","visible");FONALITY.util.Dom.setStyle(F.overlay.element,"opacity",0)};C.handleCompleteAnimateIn=function(E,D,F){FONALITY.util.Dom.removeClass(F.overlay.element,"hide-select");if(F.overlay.element.style.filter){F.overlay.element.style.filter=null}if(F.overlay.underlay){FONALITY.util.Dom.setStyle(F.overlay.underlay,"opacity",F.initialUnderlayOpacity)}F.overlay.cfg.refireEvent("iframe");F.animateInCompleteEvent.fire()};C.handleStartAnimateOut=function(E,D,F){FONALITY.util.Dom.addClass(F.overlay.element,"hide-select");if(F.overlay.underlay){F.overlay.underlay.style.filter=null}};C.handleCompleteAnimateOut=function(E,D,F){FONALITY.util.Dom.removeClass(F.overlay.element,"hide-select");if(F.overlay.element.style.filter){F.overlay.element.style.filter=null}FONALITY.util.Dom.setStyle(F.overlay.element,"visibility","hidden");FONALITY.util.Dom.setStyle(F.overlay.element,"opacity",1);F.overlay.cfg.refireEvent("iframe");F.animateOutCompleteEvent.fire()};C.init();return C};FONALITY.widget.ContainerEffect.SLIDE=function(C,E){var B=C.cfg.getProperty("x")||FONALITY.util.Dom.getX(C.element);var G=C.cfg.getProperty("y")||FONALITY.util.Dom.getY(C.element);var F=FONALITY.util.Dom.getClientWidth();var D=C.element.offsetWidth;var A=new FONALITY.widget.ContainerEffect(C,{attributes:{points:{to:[B,G]}},duration:E,method:FONALITY.util.Easing.easeIn},{attributes:{points:{to:[(F+25),G]}},duration:E,method:FONALITY.util.Easing.easeOut},C.element,FONALITY.util.Motion);A.handleStartAnimateIn=function(I,H,J){J.overlay.element.style.left=(-25-D)+"px";J.overlay.element.style.top=G+"px"};A.handleTweenAnimateIn=function(K,J,L){var M=FONALITY.util.Dom.getXY(L.overlay.element);var I=M[0];var H=M[1];if(FONALITY.util.Dom.getStyle(L.overlay.element,"visibility")=="hidden"&&I)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Function.prototype.bind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){return A.call(B,C||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0;B]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?A.childNodes[0].nodeValue:""},toQueryParams:function(){var A=this.match(/^\??(.*)$/)[1].split("&");return A.inject({},function(D,B){var C=B.split("=");D[C[0]]=C[1];return D})},toArray:function(){return this.split("")},camelize:function(){var D=this.split("-");if(D.length==1){return D[0]}var B=this.indexOf("-")==0?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var C=1,A=D.length;C=(A||D)){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D<=(A||D)){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return CB?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){B(E=C.pluck(D));return E})},inspect:function(){return"#"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(C){if(!C){return[]}if(C.toArray){return C.toArray()}else{var B=[];for(var A=0;A"}};function $H(A){var B=Object.extend({},A||{});Object.extend(B,Enumerable);Object.extend(B,Hash);return B}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;do{A(B);B=B.succ()}while(this.include(B))},include:function(A){if(A=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax2.Request=Class.create();Ajax2.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax2.Request.prototype=Object.extend(new Ajax2.Base(),{initialize:function(B,A){this.transport=Ajax2.getTransport();this.setOptions(A);this.request(B)},request:function(B){var C=this.options.parameters||"";if(C.length>0){C+="&_="}try{this.url=B;if(this.options.method=="get"&&C.length>0){this.url+=(this.url.match(/\?/)?"&":"?")+C}Ajax2.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var A=this.options.postBody?this.options.postBody:C;this.transport.send(this.options.method=="post"?A:null)}catch(D){this.dispatchException(D)}},setRequestHeaders:function(){var B=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){B.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType){B.push("Connection","close")}}if(this.options.requestHeaders){B.push.apply(B,this.options.requestHeaders)}for(var A=0;A"+this.content+"";return $A(A.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(A){A.reverse(false).each((function(B){this.element.insertBefore(B,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var A=0;A=0){B=C.options[A];D=B.value;if(!D&&!("value" in B)){D=B.text}}return[C.name,D]},selectMany:function(C){var D=new Array();for(var B=0;B=this.offset[1]&&C=this.offset[0]&&A=this.offset[1]&&this.ycomp=this.offset[0]&&this.xcomp element does not exist.")}this.element.setAttribute("autocomplete","off");Element.addClassName(this.element,"bcomplete-field");this.visible=false;this.cancelSubmit=false;this.scroll=0;this.selectedIndex=-1;this.matches=new Array();this.ignoreClick=0;this.popup=document.createElement("div");Element.hide(this.popup);this.popup.className="bcomplete-popup";document.body.appendChild(this.popup);this.upButton=document.createElement("div");this.upButton.className="up-button";this.popup.appendChild(this.upButton);this.listItems=new Array();for(var D=0;D(this.matches.length-this.MAX_VISIBLE)){this.scroll=(this.matches.length-this.MAX_VISIBLE)}this.show();Event.stop(A);this.element.focus()},onKeyDown:function(A){if(A.keyCode==13&&this.visible){this.temporarilyDisableSubmission();this.select();Event.stop(A);return false}},showAll:function(){this.matches=this.findMatches("");this.element.focus();this.show()},onKeyPress:function(A){if(!A){var B=this.element.value.indexOf(" --");if(B>=0){this.element.value=this.element.value.substr(0,B)}if(this.matches.length==0){this.matches=this.findMatches(this.element.value)}if(this.selectedIndex=this.matches.length){this.selectedIndex=this.matches.length-1}if(this.scroll<=(this.selectedIndex-this.MAX_VISIBLE)){this.scroll++}this.ignoreClick=1;this.element.focus();this.show();return }else{if(A.keyCode==Event.KEY_TAB){if(this.visible){this.select();Event.stop(A);return false}}else{if(A.keyCode==Event.KEY_DOWN){this.selectedIndex++;if(this.selectedIndex=this.matches.length){this.selectedIndex=this.matches.length-1}if(this.scroll<=(this.selectedIndex-this.MAX_VISIBLE)){this.scroll++}if(this.matches.length==0){this.matches=this.findMatches(this.element.value)}this.show();Event.stop(A);return }else{if(A.keyCode==Event.KEY_UP){this.selectedIndex--;if(this.selectedIndex<=-1&&this.scroll<=0){this.selectedIndex=-1;this.hide();Event.stop(A);return }if(this.selectedIndex<=-1){this.selectedIndex=this.scroll+(this.MAX_VISIBLE-1)}if(this.scroll>this.selectedIndex){this.scroll--}this.show();Event.stop(A);return }else{if(A.keyCode!=13){if(this.timerId){clearTimeout(this.timerId)}this.timerId=setTimeout(this.onTick,this.TIMER_TICK)}}}}}},onTick:function(){this.selectedIndex=-1;this.scroll=0;if(this.element.value!=""){this.matches=this.findMatches(this.element.value);if(this.matches.length>0){this.show()}else{this.hide()}}else{this.hide()}},onSubmit:function(){if(this.cancelSubmit){this.cancelSubmit=false;return false}else{return true}},onItemOn:function(){for(var A=0;A0){Element.removeClassName(this.upButton,"disabled")}else{Element.addClassName(this.upButton,"disabled")}if((this.scroll+this.MAX_VISIBLE)$1")}}this.listItems[C].innerHTML=E;this.listItems[C].number=C+this.scroll;this.listItems[C].value=this.matches[C+this.scroll];if(this.selectedIndex==(this.scroll+C)){Element.addClassName(this.listItems[C],"selected")}else{Element.removeClassName(this.listItems[C],"selected")}Element.show(this.listItems[C])}else{Element.hide(this.listItems[C])}}this.visible=true;Element.show(this.popup);this.setPopupPosition()},setPopupPosition:function(){var A=Position.cumulativeOffset(this.element);var D=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;var B=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&window.innerHeight)?window.innerHeight:document.documentElement.clientHeight;this.popup.style.width=(this.element.offsetWidth-2)+"px";this.popup.style.left=A[0]+"px";var C=A[1]+Element.getHeight(this.element);this.popup.style.top=C+"px"},hide:function(){this.matches=new Array();this.selectedIndex=-1;this.scroll=0;this.visible=false;Element.hide(this.popup)},select:function(){if(this.selectedIndex!=-1){this.element.value=this.matches[this.selectedIndex];setSupportalSymptoms(this.element.value)}this.hide()}};FONALITY.namespace("container");FONALITY.namespace("panel");var supportalOpen=0;var openSupport=document.location.search.indexOf("opensupport=1")==-1?0:1;var complete;function submitCallback(D){var B=document.getElementById("if_supportal_submit").contentWindow.document.body.innerHTML;document.getElementById("if_supportal_submit").contentWindow.document.body.innerHTML;if(B.indexOf("error:")>-1){var C=B.substring(6);var A=C.split("::end::");C=A[0];submitFailure(C)}else{FONALITY.panel.wait.hide();alert("Thank you! Your ticket has been submitted.");supportalOpen=0;if(openSupport){if(document.getElementById("mainpage")){document.getElementById("mainpage").style.visibility="visible"}if(!document.getElementById("supportal_username").disabled){placeFocus2("f","username")}}}}function submitFailure(A){FONALITY.panel.wait.hide();alert("Unable to submit ticket: "+A);showSupportal()}function init(){var D=function(){supportalOpen=0;this.cancel()};var A=function(){if(document.getElementById("supportal_username")&&document.getElementById("supportal_password")){if(!checkInput("supportal_username","You must enter your username.")){return false}if(!checkInput("supportal_password","You must enter your password.")){return false}}if(!checkInput("supportal_name","You must enter your name.","Your Name")){return false}if(!checkInput("supportal_email","You must enter your email address.","Email Address")){return false}if((document.getElementById("supportal_request").value=="support"||document.getElementById("supportal_request").value=="hud_bug")&&!checkInput("supportal_symptom_cat","You must select a category.")){return false}if((document.getElementById("supportal_request").value=="support"||document.getElementById("supportal_request").value=="hud_bug")&&!checkInput("supportal_symptom","You must select a symptom.")){return false}if((document.getElementById("supportal_request").value=="support"||document.getElementById("supportal_request").value=="hud_bug")&&!checkInput("supportal_subject","You must enter a short description of your problem.","Short Description")){return false}if(!checkInput("supportal_text","You must enter a message.")){return false}if(document.getElementById("supportal_text").value=="Enter your question here!"){alert("Please enter an accurate message.");document.getElementById("supportal_text").select();return false}document.getElementById("supportal_symptom_text").value=document.getElementById("supportal_symptom_cat").options[document.getElementById("supportal_symptom_cat").selectedIndex].text;if(document.getElementById("supportal_request").value=="support"||document.getElementById("supportal_request").value=="hud_bug"){document.getElementById("supportal_symptom_text").value=document.getElementById("supportal_symptom_text").value+" -- "+document.getElementById("supportal_symptom").options[document.getElementById("supportal_symptom").selectedIndex].value}FONALITY.panel.wait=new FONALITY.widget.Panel("wait",{width:"240px",fixedcenter:true,close:false,draggable:true,modal:true,effect:{effect:FONALITY.widget.ContainerEffect.FADE,duration:0.5}});FONALITY.panel.wait.setHeader("Sending, please wait...");FONALITY.panel.wait.setBody('');FONALITY.panel.wait.render(document.body);FONALITY.panel.wait.show();document.dlgForm.submit();FONALITY.container.dlg.hide()};if(document.getElementById("dlg")){document.getElementById("dlg").style.position="relative"}FONALITY.container.dlg=new FONALITY.widget.Dialog("dlg",{modal:true,visible:false,width:"632px",fixedcenter:true,constraintoviewport:true,draggable:true});FONALITY.container.dlg.callback.success=submitCallback;FONALITY.container.dlg.callback.failure=submitFailure;var B=new FONALITY.util.KeyListener(document,{keys:27},{fn:D,scope:FONALITY.container.dlg,correctScope:true});FONALITY.container.dlg.cfg.queueProperty("keylisteners",B);FONALITY.container.dlg.cfg.queueProperty("buttons",[{text:"Submit",handler:A}]);var C=function(F,E,G){alert("Manual submission of "+this.id+" detected")};FONALITY.container.dlg.beforeHideEvent.subscribe(function(){supportalOpen=0});FONALITY.container.dlg.manualSubmitEvent.subscribe(C,FONALITY.container.dlg,true);FONALITY.container.dlg.render()}FONALITY.util.Event.addListener(window,"load",init);function showSupportal(A){if(document.all){document.getElementById("supportal_table").style.marginLeft="3px"}else{document.getElementById("supportal_table").style.marginLeft="2px"}supportalOpen=1;document.getElementById("supportal_html").value=getSource();document.getElementById("dlg").style.display="block";if(A){changeSelect("supportal_request",A)}if(server_id){changeSelect("supportal_sid",server_id)}if(document.getElementById("movie")){document.getElementById("movie").style.visibility="hidden"}symptomEnable();FONALITY.container.dlg.show();complete=new BComplete("symptomSearch");complete.setData(full_symptoms);if(server_id){document.getElementById("supportal_text").focus()}else{if(document.getElementById("supportal_username").disabled){document.getElementById("supportal_text").focus()}else{document.getElementById("supportal_username").focus()}}}function checkInput(A,C,B){if(document.getElementById(A)){if(document.getElementById(A).value&&document.getElementById(A).value!="--"&&document.getElementById(A).value!=B){document.getElementById(A).style.color="black";return 1}else{alert(C);document.getElementById(A).focus();if(B){document.getElementById(A).value=B;document.getElementById(A).style.color="red"}return 0}}return 0}function setSupportalSymptoms(C){var A=C.split(" -- ",2);for(var B=0;B=0){I=I.substr(0,D)}G.options[C]=new Option(I,A)}}function symptomEnable(){if(document.getElementById("supportal_request").value=="support"||document.getElementById("supportal_request").value=="hud_bug"){document.getElementById("supportal_subject").disabled=true;document.getElementById("supportal_subject").value="Support Request";document.getElementById("supportal_symptom").disabled=false;document.getElementById("supportal_symptom_cat").disabled=false}else{if(document.getElementById("supportal_subject").value=="Support Request"){document.getElementById("supportal_subject").value=""}document.getElementById("supportal_subject").disabled=false;document.getElementById("supportal_symptom").disabled=true;document.getElementById("supportal_symptom_cat").disabled=true}}function activateSupport(){if(!FONALITY.container.dlg){setTimeout("activateSupport()",100)}else{showSupportal(request_type||"support")}}if(openSupport){activateSupport()}var kAUTOCOMPLETE="[Type or click to select]";var autoCompleteObject=null;var autoCompleteCallback="";var autoCompleteVisible=false;var autoCompleteTimer=null;var autoCompleteLuckyLabel="";var autoCompleteLuckyValue="";var autoCompleteLuckyCallback="";var autoCompleteOriginalValue="";var autoCompleteChosenValue=false;var autoCompleteSuspendScroll=false;var autoCompleteScriptHilited=-1;var autoCompleteNewlyPerfect=false;var autoCompleteAllOptions=new Array();var autoCompleteKeyCode=0;function makeAutoCompleteExts(B,A){return makeAutoComplete(B,A,"exts")}function typeAutoCompleteExts(B,A,D,C){return typeAutoComplete(B,A,D,C,"exts")}function typeAutoComplete(C,B,E,D,A){if(B==0){autoCompleteKeyCode=C.keyCode}else{autoCompleteKeyCode=-1}if(autoCompleteKeyCode==9||autoCompleteKeyCode==13){return autoCompleteInvisible(autoCompleteKeyCode==9?"tab":"return")}if(autoCompleteKeyCode==27){E.blur();return hideAutoComplete()}return makeAutoComplete(E,D,A)}function makeAutoComplete(C,U,K){if(C.value==kAUTOCOMPLETE){C.value=""}var AL=0;if(C.value.match(/^DELETED \(x\d+\)$/)){AL=1}autoCompleteAllOptions=new Array();var H=0;if(autoCompleteKeyCode==38){autoCompleteScriptHilited--;H=1}else{if(autoCompleteKeyCode==36){autoCompleteScriptHilited=0;H=1}else{if(autoCompleteKeyCode==40){autoCompleteScriptHilited++;H=1}else{if(autoCompleteKeyCode==35){autoCompleteScriptHilited=-1;H=1}else{if(autoCompleteKeyCode==-1){H=1}}}}}if(autoCompleteTimer!=null){clearTimeout(autoCompleteTimer);autoCompleteOriginalValue="";autoCompleteLuckyLabel="";autoCompleteLuckyValue="";autoCompleteLuckyCallback="";autoCompleteTimer=null}if((autoCompleteKeyCode==0||autoCompleteKeyCode==9||autoCompleteKeyCode==13)&&autoCompleteOriginalValue.length==0){autoCompleteOriginalValue=C.value}var AD=C;var e=curtop=0;if(C.offsetParent){do{e+=C.offsetLeft;curtop+=C.offsetTop}while(C=C.offsetParent)}C=AD;var a=new Array();for(var AF=0;AF-1){var AA=a[AF].split(/<0){for(var AF=0;AF-1){T.push(a[AF]);n.push(a[AF])}var J=new Array();var L=a[AF].toLowerCase();if(L==AK.toLowerCase()){AE=true;break}var B=0;V.push("Trying to match on: "+a[AF]);for(var q=0;q-1){B++;var X=L.indexOf(AN[q]);V.push("-- Found match at: "+X);if(AN[q].length>0){J.push(X)}}}if(B==AN.length||AL==1){V.push("Full match! starts: "+J);var S=a[AF];for(var q=0;q|:";for(var s=0;s");S=S.replace(/\}\}/g,"");S=S.replace(/(\{\{|\}\})/g,"");T.push(S);n.push(AO[AF])}}}else{T=a;n=AO}if(AE==true){T=a;n=AO}if(autoCompleteScriptHilited<0){autoCompleteScriptHilited=T.length-1}else{if(autoCompleteScriptHilited>=T.length){autoCompleteScriptHilited=0}}var F=false;var O=false;var Q=new Object();if(T.length>0){autoCompleteLuckyLabel=T[0];autoCompleteLuckyValue=n[0];autoCompleteLuckyCallback="";var c=false;var Z="";var I=false;var G="";for(var AF=0;AF");b=b.replace(/<\/strong>/g,"");b=b.replace(/\\"/g,'"');b=b.replace(/\\'/g,"'");AB=AB.replace(/(\{\{|\}\})/g,"");var AJ="transparent";var AM="";autoCompleteAllOptions[AF]=[AB,v];if(AB.indexOf("<-1){var m=AB.split("<'+m[1]+"";Q[AF]=1;if(autoCompleteScriptHilited==AF&&H==1){if(autoCompleteKeyCode==38){while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited>=0){autoCompleteScriptHilited--}F=true}else{if(autoCompleteKeyCode==40){while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited<=(T.length-1)){autoCompleteScriptHilited++}}else{if(autoCompleteKeyCode==36){while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited<=(T.length-1)){autoCompleteScriptHilited++}}else{if(autoCompleteKeyCode==35){if(autoCompleteScriptHilited==-1){autoCompleteScriptHilited=T.length-1}while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited>=0){autoCompleteScriptHilited--}}}}}}continue}O=true;if(K=="exts"){var Y=AB.split("(");var W=Y[0].split(",");var l=W[0];var R=W[1];var AI=Y[1];AI=AI.replace(/[\)\(]/g,"");l=l.replace(/^\s*/g,"");l=l.replace(/\s*$/g,"");R=R.replace(/^\s*/g,"");R=R.replace(/\s*$/g,"");AI=AI.replace(/^\s*/g,"");AI=AI.replace(/\s*$/g,"");b=AI+" "+l+", "+R}if(AE==true){if(autoCompleteNewlyPerfect==false){autoCompleteNewlyPerfect=true;I=true}}else{autoCompleteNewlyPerfect=false}if(H==1&&I==false){if(AF==autoCompleteScriptHilited){AJ="#0099FF";AM="color: #FFFFFF; ";autoCompleteLuckyLabel=AB;autoCompleteLuckyValue=v;c=true}}if(AE==true){if(AB.toLowerCase()==AK){b=""+b+"";if(H==0||I==true){AJ="#0099FF";AM="color: #FFFFFF; ";autoCompleteScriptHilited=AF;autoCompleteLuckyLabel=AB;autoCompleteLuckyValue=v;c=true}}}var f="";if(K!=null){if(K.length>0){if(K.match(/[^A-Za-z0-9]+/)){f="; "+K;Z=f;if(AF==0){autoCompleteLuckyCallback=f}}}}v=autoCompleteStripNasties(v);AB=autoCompleteStripNasties(AB);G+=''+b+"
"}AH.innerHTML=G;if(O==true){if(c==false){if(F==true){while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited>=0){autoCompleteScriptHilited--}if(autoCompleteScriptHilited<0){autoCompleteScriptHilited=0;while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited<=(T.length-1)){autoCompleteScriptHilited++}}autoCompleteOptionHilited(autoCompleteScriptHilited,Z)}else{autoCompleteScriptHilited=0;while(Q[autoCompleteScriptHilited]==1&&autoCompleteScriptHilited<=(T.length-1)){autoCompleteScriptHilited++}autoCompleteOptionHilited(autoCompleteScriptHilited,Z)}}}else{autoCompleteLuckyLabel="";autoCompleteLuckyValue="";autoCompleteLuckyCallback="";AH.innerHTML="No matches"}}else{autoCompleteLuckyLabel="";autoCompleteLuckyValue="";autoCompleteLuckyCallback="";AH.innerHTML="No matches"}var AC=-1;var d=-1;var E=0;var A=0;var P=-1;if(typeof window.innerWidth!="undefined"){AC=window.innerWidth;d=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){AC=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){AC=document.body.clientWidth;d=document.body.clientHeight}}}if(typeof window.pageXOffset=="number"){E=window.pageXOffset;A=window.pageYOffset}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){E=document.documentElement.scrollLeft;A=document.documentElement.scrollTop}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){E=document.body.scrollLeft;A=document.body.scrollTop}else{if(window.scrollX||window.scrollTop){E=window.scrollX;A=window.scrollY}}}}var N=document;P=Math.max(Math.max(N.body.scrollHeight,N.documentElement.scrollHeight),Math.max(N.body.offsetHeight,N.documentElement.offsetHeight),Math.max(N.body.clientHeight,N.documentElement.clientHeight));if(AC>-1&&A>-1){var k=e;var g=parseInt(curtop+20);if(g+parseInt(AH.style.height)+24>d+A){g=parseInt(curtop)-parseInt(AH.style.height)-4}if(k+parseInt(AH.style.width)>AC+E){k=AC+E-parseInt(AH.style.width)-24}AH.style.top=parseInt(g)+"px";AH.style.left=parseInt(k)+"px"}else{AH.style.top=parseInt(curtop+20)+"px";AH.style.left=parseInt(e)+"px"}if(autoCompleteSuspendScroll==true){autoCompleteSuspendScroll=false}else{setTimeout("autoCompleteInitScroll()",0)}AH.style.display="block";autoCompleteVisible=true;autoCompleteKeyCode=0}function autoCompleteInitScroll(){var F=document.getElementById("autocomplete-pop");var E=0;var D=F.getElementsByTagName("div");var A=0;for(var C=0;C/ig,"");C=C.replace(/</ig,"<");C=C.replace(/>/ig,">");autoCompleteObject.value=C;autoCompleteObject.blur();var B=false;var A=autoCompleteObject.parentNode.getElementsByTagName("input");for(var D=0;D0){autoCompleteObject.value=autoCompleteOriginalValue}else{if(autoCompleteChosenValue==false&&autoCompleteOriginalValue.length==0&&valueRightNow.length>0){autoCompleteObject.value=""}}if(autoCompleteObject.className.indexOf("allow_empty")>-1&&valueRightNow==""){autoCompleteChoose("","",true);if(autoCompleteCallback!=""){eval(autoCompleteCallback)}}else{if(valueRightNow==""){autoCompleteObject.value=kAUTOCOMPLETE}}autoCompleteObject=null;autoCompleteCallback="";document.getElementById("autocomplete-pop").style.display="none";autoCompleteVisible=false;autoCompleteOriginalValue="";return false}function hideAutoCompleteAfter(B,A){autoCompleteTimer=setTimeout("hideAutoComplete()",A);return false}function autoCompleteInvisible(keyName){if(autoCompleteVisible==true){if(keyName!=null){if(keyName=="tab"&&autoCompleteObject.className.indexOf("allow_empty")>-1&&autoCompleteObject.value.length==0){return false}}if(autoCompleteLuckyLabel.length>0){autoCompleteChoose(autoCompleteLuckyValue,autoCompleteLuckyLabel);if(autoCompleteLuckyCallback.length>0){eval(autoCompleteLuckyCallback)}}return false}return true}function autoCompleteStripNasties(A){if(A!=""&&A!=undefined){A=A.replace(/\"/g,""");A=A.replace(/\'/g,"\\'");A=A.replace(//g,">")}return A};