function checkASCIIform(B){var A=B.elements.length;for(i=0;i<A;i++){if(B.elements[i].type=="text"){if(/[^\x20-\x7e]/.test(B.elements[i].value)){alert("ERROR: Please use only ASCII.");return false}}}return true}function $(A){return(document.getElementById(A))}function $S(A){return($(A).style)}function disable(A){if($(A).disabled!=true){$(A).disabled=true;$(A).className=$(A).className+"_disabled"}}function enable(B){$(B).disabled=false;var A=$(B).className;A=A.replace(/_disabled$/,"");$(B).className=A}if(!window.console||!console.firebug){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}function getAbsoluteLeft(A){o=document.getElementById(A);if(!o){return 0}oLeft=o.offsetLeft;while(o.offsetParent!=null){oParent=o.offsetParent;oLeft+=oParent.offsetLeft;o=oParent}return oLeft}function getAbsoluteTop(A){o=document.getElementById(A);if(!o){return 0}oTop=o.offsetTop;while(o.offsetParent!=null){oParent=o.offsetParent;oTop+=oParent.offsetTop;o=oParent}return oTop}function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){try{B()}catch(C){}try{A()}catch(C){}}}}function tester(){alert("hii")}function checkBoxes(D,F,A){if(!document.forms[D]){return }var C=document.forms[D].elements[F];if(!C){return }var E=C.length;if(!E){C.checked=A}else{for(var B=0;B<E;B++){C[B].checked=A}}}function countCheckedBoxes(D,F){if(!document.forms[D]){return 0}var C=document.forms[D].elements[F];if(!C){return 0}var E=C.length;var B=0;if(!E){if(C.checked){return 1}else{return 0}}else{for(var A=0;A<E;A++){if(C[A].checked){B++}}return B}}function submitOnce(D,E){if(E){var A=confirm(E);if(!A){return A}}var G=D.form;var F=document.createElement("input");F.setAttribute("type","hidden");F.setAttribute("name",D.name);F.setAttribute("id","created_"+D.name);F.setAttribute("value",D.value);G.appendChild(F);if(document.all||document.getElementById){for(var B=0;B<G.length;B++){var C=G.elements[B];if(C.type.toLowerCase()=="submit"||C.type.toLowerCase()=="reset"){C.disabled=true}}}G.submit();return false}popup=0;function play(A){if(A){window.location=audio_hash[A]}}function view(A){window.location=A}function popUp(URL,width,height,scrollbar,resizable,location_horizontal,location_vertical){day=new Date();id=day.getTime();if(!location_horizontal){location_horizontal=290}if(!location_vertical){location_vertical=32}if(resizable){resizable=1}else{resizable=0}eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars='+scrollbar+',location=0,statusbar=0,menubar=0,resizable='+resizable+',width='+width+',height='+height+',left='+location_horizontal+',top='+location_vertical);")}function ifStartsWithOne(B,A){if(A.value.match(/^1/)){alert(B+" must not start with 1.");event.cancelBubble=true;event.returnValue=false}}function returnNoAnswerEnabled(A){if(A.forward_number.value.length<7&&A.forward_number.disabled==false){A.return_no_answer.disabled=0}else{A.return_no_answer.disabled=1;A.return_no_answer.checked=0}}function checkName(E,C,B,F){var A;var D=1;if(!E){E=window.event}if(E.keyCode){A=E.keyCode}else{if(E.which){A=E.which}}if(!B){if(F){B="alphanumeric, dashes, periods, and the @ and _ symbols"}else{B="alphanumeric, dashes, periods, spaces, and the @ and _ symbols"}}if((A>=48&&A<=57)||(A>=97&&A<=122)||(A>=65&&A<=90)||A==45||A==46||A==8||A==46||A==37||A==9||A==40||A==38||A==95||A==64||A==36||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;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&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&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)}return A}function MM_nbGroup(E,D){var C,A,F,B=MM_nbGroup.arguments;if(E=="init"&&B.length>2){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<B.length-1;C+=2){if((A=MM_findObj(B[C]))!=null){if(!A.MM_up){A.MM_up=A.src}A.src=A.MM_dn=B[C+1];F[F.length]=A}}}}else{if(E=="over"){document.MM_nbOver=F=new Array();for(C=1;C<B.length-1;C+=3){if((A=MM_findObj(B[C]))!=null){if(!A.MM_up){A.MM_up=A.src}A.src=(A.MM_dn&&B[C+2])?B[C+2]:((B[C+1])?B[C+1]:A.MM_up);F[F.length]=A}}}else{if(E=="out"){for(C=0;C<document.MM_nbOver.length;C++){A=document.MM_nbOver[C];A.src=(A.MM_dn)?A.MM_dn:A.MM_up}}else{if(E=="down"){F=document[D];if(F){for(C=0;C<F.length;C++){A=F[C];A.src=A.MM_up;A.MM_dn=0}}document[D]=F=new Array();for(C=2;C<B.length-1;C+=2){if((A=MM_findObj(B[C]))!=null){if(!A.MM_up){A.MM_up=A.src}A.src=A.MM_dn=(B[C+1])?B[C+1]:A.MM_up;F[F.length]=A}}}}}}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}function changeSelect(A,C){if(typeof A=="string"){A=document.getElementById(A)}if(!A){return }for(var B=0;B<A.length;B++){if(A[B].value==C){A[B].selected=true;break}}}function getSource(){return document.getElementsByTagName("html")[0].innerHTML;var B;try{var A=document.body.createTextRange();B=A.htmlText}catch(C){}if(B){return B}else{return document.body.innerHTML}}var new_prompt;prompt_q=new Image(100,25);prompt_q.src="prompt_q.gif";var name_id=0;function make_prompt(F,B,G,E,C){reload_paused=1;var A=new Browser();if(A.isIE!=true||(A.isIE==true&&A.version<7)){if(!E){E=""}var D=prompt(F,E);G(D,C);reload_paused=0;return }E=E||"Prompt";new_prompt=document.body.appendChild(document.createElement("div"));new_prompt.id="prompt_"+name_id;name_id++;new_prompt.callback=G;new_prompt.style.backgroundColor="#EBE9ED";new_prompt.style.width="355px";new_prompt.style.height="130px";new_prompt.style.position="absolute";new_prompt.style.top=(document.body.clientHeight/2+document.body.scrollTop)-(120/2);new_prompt.style.left=(document.body.clientWidth/2+document.body.scrollLeft)-(355/2);new_prompt.style.border="1px solid #C0C0C0";new_prompt.innerHTML='<div style="width:100%;height:15px;padding-top:2px;border-bottom:1px solid #C0C0C0;background-color:#5593DE;font-size:12px;font-family:arial"><div valign="middle" style="cursor: pointer; cursor: move;padding-left:5px;color:white;" onmousedown="dragStart(event, \''+new_prompt.id+"')\"><b>"+E+"</b></div></div><form onsubmit=\"if(new_prompt.callback(this.text.value || null, '"+C+"' || null)){document.body.removeChild(document.getElementById('"+new_prompt.id+'\'))};return false;"><table style="padding-top:5px" width="100%" border=0><tr><td width="29" style="padding-left:10px"><img src="prompt_q.gif" width="29" height="28" border="0" alt=""></td><td style="cursor: default;font-size:12px;font-family:arial">'+F+'</td></tr><tr><td></td><td style="padding-top:10px"><input id=\'prompt_text\' name="text" value="'+B+'" style="width:290px" type="text"></td></td><tr><td colspan=2 style="padding-top:5px"><center><input style="width:50px" type="submit" value="OK"><span style="width:8px">&nbsp;</span><input style="width:50px" type="button" value="Cancel" onclick="document.body.removeChild(document.getElementById(\''+new_prompt.id+"'));new_prompt.callback(false);reload_paused=null;\"></center></td></td></table></form>";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;A<B.rows.length;A++){B.rows[A].style.display="table-row"}}function get_text(A){if(document.all){return A.innerText}else{return A.textContent}}function sort_table(L,C,B){var F;var G,E;var A,J;var H;var I;var D=document.getElementById(L);var K=D.style.display;D.style.display="none";for(G=0;G<D.rows.length;G++){J=G;A=get_text(D.rows[G].cells[C]);for(E=G+1;E<D.rows.length;E++){H=get_text(D.rows[E].cells[C]);if(B){I=A>H}else{I=A<H}if(I>0){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;i<A.length;i++){if($(A[i])){if($(A[i]).offsetWidth>B){B=$(A[i]).offsetWidth}}}for(i=0;i<A.length;i++){if($(A[i])){$(A[i]).width=B}}}function JSErrorLogger(B){var A=this;A.handler=function(I,E,C){var H={date:new Date(),type:"jserror",line:C,msg:I,url:E};var D="";for(var G in H){D+=G+":"+H[G]+" "}var F=new Image();F.src=B+"?"+D};A.JSErrorLogger=function(){window.onerror=A.handler}()}function ucfirst(A){return A.charAt(0).toUpperCase()+A.substr(1,A.length-1)}function attach_video_player(A,C,B,E,D){if(!document["playing_video_"+A]){document["playing_video_"+A]=flashembed(A,{src:"flash/flowplayer/FlowPlayerDark.swf",width:B,height:E},{config:{autoPlay:false,autoBuffering:true,controlBarBackgroundColor:"0x"+D,initialScale:"scale",videoFile:C,loop:false,autoRewind:true}})}}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(A<this.showAni){var B=this.w-Math.round(Math.pow(this.showAni-A,2)*this.showMult);this.clipTo(0,B,this.h,0)}else{this.clipTo(0,this.w,this.h,0);clearInterval(this.timer)}},conceal:function(){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("+0+")",this.hideAni)}this.startTime=(new Date()).getTime();if(this.followMouse){dw_event.remove(document,"mousemove",this.trackMouse,true)}this.timer=setInterval("RollTip.rollUp()",10)},rollUp:function(){var A=(new Date()).getTime()-this.startTime;if(A<this.hideAni){var B=Math.round(Math.pow(this.hideAni-A,2)*this.hideMult);this.clipTo(0,B,this.h,0)}else{this.clipTo(0,0,this.h,0);clearInterval(this.timer);this.tip=null}},writeTip:function(A){if(this.tip&&typeof this.tip.innerHTML!="undefined"){this.tip.innerHTML=A}},clipTo:function(D,A,B,C){if(this.tip){this.tip.style.clip="rect("+D+"px, "+A+"px, "+B+"px, "+C+"px)"}if(this.shim){this.shim.style.clip="rect("+D+"px, "+A+"px, "+B+"px, "+C+"px)"}},positionTip:function(B){var A=B.pageX?B.pageX:B.clientX+viewport.scrollX;var C=B.pageY?B.pageY:B.clientY+viewport.scrollY;if(A+this.tip.offsetWidth+this.offX>viewport.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<viewport.scrollY){C=viewport.height+viewport.scrollY-this.tip.offsetHeight}}else{C=C+this.offY}this.tip.style.left=A+"px";this.tip.style.top=C+"px";if(this.overlaySelects&&this.supportsOverlay&&this.shim){this.shim.style.left=this.tip.style.left;this.shim.style.top=this.tip.style.top}},trackMouse:function(A){A=dw_event.DOMit(A);RollTip.positionTip(A)},checkOverlaySupport:function(){if(typeof document.body!="undefined"&&typeof document.body.insertAdjacentHTML!="undefined"&&!window.opera&&navigator.appVersion.indexOf("MSIE 5.0")==-1&&navigator.userAgent.indexOf("Windows")!=-1){return true}else{return false}},toggleOverlay:function(A){if(this.overlaySelects&&this.supportsOverlay){if(!document.getElementById("tipShim")){document.body.insertAdjacentHTML("beforeEnd",'<iframe id="tipShim" src="javascript:false;" style="position:absolute; left:0; top:0; z-index:500; visibility:hidden" scrolling="no" frameborder="0"></iframe>')}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<D.length;++A){B[D[A]]=B[D[A]]||{};B=B[D[A]]}return B};FONALITY.log=function(C,D,A){var B=FONALITY.widget.Logger;if(B&&B.log){return B.log(C,D,A)}else{return false}};FONALITY.extend=function(A,C){var B=function(){};B.prototype=C.prototype;A.prototype=new B();A.prototype.constructor=A;A.superclass=C.prototype;if(C.prototype.constructor==Object.prototype.constructor){C.prototype.constructor=C}};FONALITY.namespace("util");FONALITY.namespace("widget");FONALITY.namespace("example");FONALITY.util.CustomEvent=function(C,A,B){this.type=C;this.scope=A||window;this.silent=B;this.subscribers=[];if(!this.silent){}};FONALITY.util.CustomEvent.prototype={subscribe:function(B,C,A){this.subscribers.push(new FONALITY.util.Subscriber(B,C,A))},unsubscribe:function(D,F){var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){var A=this.subscribers.length;if(!A&&this.silent){return }var B=[];for(var C=0;C<arguments.length;++C){B.push(arguments[C])}if(!this.silent){}for(C=0;C<A;++C){var E=this.subscribers[C];if(E){if(!this.silent){}var D=(E.override)?E.obj:this.scope;E.fn.call(D,this.type,B,E.obj)}}},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B)}},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};FONALITY.util.Subscriber=function(B,C,A){this.fn=B;this.obj=C||null;this.override=(A)};FONALITY.util.Subscriber.prototype.contains=function(A,B){return(this.fn==A&&this.obj==B)};FONALITY.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }"};if(!FONALITY.util.Event){FONALITY.util.Event=function(){var H=false;var I=[];var F=[];var J=[];var G=[];var D=[];var C=0;var E=[];var B=[];var A=0;return{POLL_RETRYS:200,POLL_INTERVAL:50,EL:0,TYPE:1,FN:2,WFN:3,SCOPE:3,ADJ_SCOPE:4,isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),addDelayedListener:function(N,O,M,K,L){F[F.length]=[N,O,M,K,L];if(H){C=this.POLL_RETRYS;this.startTimeout(0)}},startTimeout:function(L){var M=(L||L===0)?L:this.POLL_INTERVAL;var K=this;var N=function(){K._tryPreloadAttach()};this.timeout=setTimeout(N,M)},onAvailable:function(M,K,N,L){E.push({id:M,fn:K,obj:N,override:L});C=this.POLL_RETRYS;this.startTimeout(0)},addListener:function(M,K,T,V,L){if(!T||!T.call){return false}if(this._isValidCollection(M)){var U=true;for(var Q=0,S=M.length;Q<S;++Q){U=(this.on(M[Q],K,T,V,L)&&U)}return U}else{if(typeof M=="string"){var P=this.getEl(M);if(H&&P){M=P}else{this.addDelayedListener(M,K,T,V,L);return true}}}if(!M){return false}if("unload"==K&&V!==this){J[J.length]=[M,K,T,V,L];return true}var X=(L)?V:M;var N=function(Y){return T.call(X,FONALITY.util.Event.getEvent(Y),V)};var W=[M,K,T,N,X];var R=I.length;I[R]=W;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];D[O]=[];M["on"+K]=function(Y){FONALITY.util.Event.fireLegacyEvent(FONALITY.util.Event.getEvent(Y),O)}}D[O].push(W)}else{if(M.addEventListener){M.addEventListener(K,N,false)}else{if(M.attachEvent){M.attachEvent("on"+K,N)}}}return true},fireLegacyEvent:function(P,L){var Q=true;var K=D[L];for(var M=0,N=K.length;M<N;++M){var R=K[M];if(R&&R[this.WFN]){var S=R[this.ADJ_SCOPE];var O=R[this.WFN].call(S,P);Q=(Q&&O)}}return Q},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1}else{return B[K]}},useLegacyEvent:function(K,L){if(!K.addEventListener&&!K.attachEvent){return true}else{if(this.isSafari){if("click"==L||"dblclick"==L){return true}}}return false},removeListener:function(L,K,S,Q){if(!S||!S.call){return false}var O,R;if(typeof L=="string"){L=this.getEl(L)}else{if(this._isValidCollection(L)){var T=true;for(O=0,R=L.length;O<R;++O){T=(this.removeListener(L[O],K,S)&&T)}return T}}if("unload"==K){for(O=0,R=J.length;O<R;O++){var U=J[O];if(U&&U[0]==L&&U[1]==K&&U[2]==S){J.splice(O,1);return true}}return false}var P=null;if("undefined"==typeof Q){Q=this._getCacheIndex(L,K,S)}if(Q>=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;O<R;++O){U=M[O];if(U&&U[this.EL]==L&&U[this.TYPE]==K&&U[this.FN]==S){M.splice(O,1)}}}}else{if(L.removeEventListener){L.removeEventListener(K,P[this.WFN],false)}else{if(L.detachEvent){L.detachEvent("on"+K,P[this.WFN])}}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K)},resolveTextNode:function(K){if(K&&K.nodeName&&"#TEXT"==K.nodeName.toUpperCase()){return K.parentNode}else{return K}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft()}}return K},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop()}}return L},getXY:function(K){return[this.getPageX(K),this.getPageY(K)]},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement}else{if(L.type=="mouseover"){K=L.fromElement}}}return this.resolveTextNode(K)},getTime:function(L){if(!L.time){var K=new Date().getTime();try{L.time=K}catch(M){return K}}return L.time},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K)},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation()}else{K.cancelBubble=true}},preventDefault:function(K){if(K.preventDefault){K.preventDefault()}else{K.returnValue=false}},getEvent:function(L){var K=L||window.event;if(!K){var M=this.getEvent.caller;while(M){K=M.arguments[0];if(K&&Event==K.constructor){break}M=M.caller}}return K},getCharCode:function(K){return K.charCode||((K.type=="keypress")?K.keyCode:0)},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M}}return -1},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L}return L},_isValidCollection:function(K){return(K&&K.length&&typeof K!="string"&&!K.tagName&&!K.alert&&typeof K[0]!="undefined")},elCache:{},getEl:function(K){return document.getElementById(K)},clearCache:function(){},_load:function(L){H=true;var K=FONALITY.util.Event;K._simpleRemove(window,"load",K._load)},_tryPreloadAttach:function(){if(this.locked){return false}this.locked=true;var L=!H;if(!L){L=(C>0)}var Q=[];for(var N=0,O=F.length;N<O;++N){var P=F[N];if(P){var K=this.getEl(P[this.EL]);if(K){this.on(K,P[this.TYPE],P[this.FN],P[this.SCOPE],P[this.ADJ_SCOPE]);delete F[N]}else{Q.push(P)}}}F=Q;var M=[];for(N=0,O=E.length;N<O;++N){var S=E[N];if(S){K=this.getEl(S.id);if(K){var R=(S.override)?S.obj:K;S.fn.call(R,S.obj);delete E[N]}else{M.push(S)}}}C=(Q.length===0&&M.length===0)?0:C-1;if(L){this.startTimeout()}this.locked=false;return true},purgeElement:function(N,O,Q){var P=this.getListeners(N,Q);if(P){for(var M=0,K=P.length;M<K;++M){var L=P[M];this.removeListener(N,L.type,L.fn)}}if(O&&N&&N.childNodes){for(M=0,K=N.childNodes.length;M<K;++M){this.purgeElement(N.childNodes[M],O,Q)}}},getListeners:function(N,P){var O=[];if(I&&I.length>0){for(var M=0,K=I.length;M<K;++M){var L=I[M];if(L&&L[this.EL]===N&&(!P||P===L[this.TYPE])){O.push({type:L[this.TYPE],fn:L[this.FN],obj:L[this.SCOPE],adjust:L[this.ADJ_SCOPE],index:M})}}}return(O.length)?O:null},_unload:function(R){var Q=FONALITY.util.Event;for(var O=0,K=J.length;O<K;++O){var L=J[O];if(L){var P=(L[Q.ADJ_SCOPE])?L[Q.SCOPE]:window;L[Q.FN].call(P,Q.getEvent(R),L[Q.SCOPE]);delete J[O];L=null}}if(I&&I.length>0){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<K;++O){delete G[O][0];delete G[O]}Q._simpleRemove(window,"unload",Q._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft]}else{if(L){return[L.scrollTop,L.scrollLeft]}else{return[0,0]}}},_simpleAdd:function(M,N,L,K){if(M.addEventListener){M.addEventListener(N,L,(K))}else{if(M.attachEvent){M.attachEvent("on"+N,L)}}},_simpleRemove:function(M,N,L,K){if(M.removeEventListener){M.removeEventListener(N,L,(K))}else{if(M.detachEvent){M.detachEvent("on"+N,L)}}}}}();FONALITY.util.Event.on=FONALITY.util.Event.addListener;if(document&&document.body){FONALITY.util.Event._load()}else{FONALITY.util.Event._simpleAdd(window,"load",FONALITY.util.Event._load)}FONALITY.util.Event._simpleAdd(window,"unload",FONALITY.util.Event._unload);FONALITY.util.Event._tryPreloadAttach()}FONALITY.util.Dom=function(){var B=navigator.userAgent.toLowerCase();var C=(B.indexOf("opera")>-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<K;++L){if(M.charAt(L)==M.charAt(L).toUpperCase()){N=N+"-"+M.charAt(L).toLowerCase()}else{N=N+M.charAt(L)}}return N};var J=function(K){A[K]={camel:I(K),hyphen:G(K)}};return{get:function(M){if(!M){return null}if(typeof M!="string"&&!(M instanceof Array)){return M}if(typeof M=="string"){return document.getElementById(M)}else{var N=[];for(var L=0,K=M.length;L<K;++L){N[N.length]=F.Dom.get(M[L])}return N}return null},getStyle:function(K,M){var L=function(P){var S=null;var O=document.defaultView;if(!A[M]){J(M)}var N=A[M]["camel"];var R=A[M]["hyphen"];if(M=="opacity"&&P.filters){S=1;try{S=P.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100}catch(T){try{S=P.filters.item("alpha").opacity/100}catch(T){}}}else{if(P.style[N]){S=P.style[N]}else{if(D&&P.currentStyle&&P.currentStyle[N]){S=P.currentStyle[N]}else{if(O&&O.getComputedStyle){var Q=O.getComputedStyle(P,"");if(Q&&Q.getPropertyValue(R)){S=Q.getPropertyValue(R)}}}}}return S};return F.Dom.batch(K,L,F.Dom,true)},setStyle:function(L,N,O){if(!A[N]){J(N)}var K=A[N]["camel"];var M=function(P){switch(N){case"opacity":if(D&&typeof P.style.filter=="string"){P.style.filter="alpha(opacity="+O*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1}}else{P.style.opacity=O;P.style["-moz-opacity"]=O;P.style["-khtml-opacity"]=O}break;default:P.style[K]=O}};F.Dom.batch(L,M,F.Dom,true)},getXY:function(K){var L=function(N){if(N.offsetParent===null||this.getStyle(N,"display")=="none"){return false}var M=null;var S=[];var O;if(N.getBoundingClientRect){O=N.getBoundingClientRect();var Q=document;if(!this.inDocument(N)&&parent.document!=document){Q=parent.document;if(!this.isAncestor(Q.documentElement,N)){return false}}var P=Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);var R=Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);return[O.left+R,O.top+P]}else{S=[N.offsetLeft,N.offsetTop];M=N.offsetParent;if(M!=N){while(M){S[0]+=M.offsetLeft;S[1]+=M.offsetTop;M=M.offsetParent}}if(H&&this.getStyle(N,"position")=="absolute"){S[0]-=document.body.offsetLeft;S[1]-=document.body.offsetTop}}if(N.parentNode){M=N.parentNode}else{M=null}while(M&&M.tagName.toUpperCase()!="BODY"&&M.tagName.toUpperCase()!="HTML"){if(F.Dom.getStyle(M,"display")!="inline"){S[0]-=M.scrollLeft;S[1]-=M.scrollTop}if(M.parentNode){M=M.parentNode}else{M=null}}return S};return F.Dom.batch(K,L,F.Dom,true)},getX:function(K){var L=function(M){return F.Dom.getXY(M)[0]};return F.Dom.batch(K,L,F.Dom,true)},getY:function(K){var L=function(M){return F.Dom.getXY(M)[1]};return F.Dom.batch(K,L,F.Dom,true)},setXY:function(K,N,M){var L=function(Q){var P=this.getStyle(Q,"position");if(P=="static"){this.setStyle(Q,"position","relative");P="relative"}var S=this.getXY(Q);if(S===false){return false}var R=[parseInt(this.getStyle(Q,"left"),10),parseInt(this.getStyle(Q,"top"),10)];if(isNaN(R[0])){R[0]=(P=="relative")?0:Q.offsetLeft}if(isNaN(R[1])){R[1]=(P=="relative")?0:Q.offsetTop}if(N[0]!==null){Q.style.left=N[0]-S[0]+R[0]+"px"}if(N[1]!==null){Q.style.top=N[1]-S[1]+R[1]+"px"}var O=this.getXY(Q);if(!M&&(O[0]!=N[0]||O[1]!=N[1])){this.setXY(Q,N,true)}};F.Dom.batch(K,L,F.Dom,true)},setX:function(L,K){F.Dom.setXY(L,[K,null])},setY:function(K,L){F.Dom.setXY(K,[null,L])},getRegion:function(K){var L=function(M){var N=new FONALITY.util.Region.getRegion(M);return N};return F.Dom.batch(K,L,F.Dom,true)},getClientWidth:function(){return F.Dom.getViewportWidth()},getClientHeight:function(){return F.Dom.getViewportHeight()},getElementsByClassName:function(M,K,L){var N=function(O){return F.Dom.hasClass(O,M)};return F.Dom.getElementsBy(N,K,L)},hasClass:function(M,L){var K=new RegExp("(?:^|\\s+)"+L+"(?:\\s+|$)");var N=function(O){return K.test(O.className)};return F.Dom.batch(M,N,F.Dom,true)},addClass:function(L,K){var M=function(N){if(this.hasClass(N,K)){return }N.className=[N.className,K].join(" ")};F.Dom.batch(L,M,F.Dom,true)},removeClass:function(M,L){var K=new RegExp("(?:^|\\s+)"+L+"(?:\\s+|$)","g");var N=function(O){if(!this.hasClass(O,L)){return }var P=O.className;O.className=P.replace(K," ");if(this.hasClass(O,L)){this.removeClass(O,L)}};F.Dom.batch(M,N,F.Dom,true)},replaceClass:function(N,L,K){if(L===K){return false}var M=new RegExp("(?:^|\\s+)"+L+"(?:\\s+|$)","g");var O=function(P){if(!this.hasClass(P,L)){this.addClass(P,K);return }P.className=P.className.replace(M," "+K+" ");if(this.hasClass(P,L)){this.replaceClass(P,L,K)}};F.Dom.batch(N,O,F.Dom,true)},generateId:function(K,M){M=M||"yui-gen";K=K||{};var L=function(N){if(N){N=F.Dom.get(N)}else{N={}}if(!N.id){N.id=M+E++}return N.id};return F.Dom.batch(K,L,F.Dom,true)},isAncestor:function(L,M){L=F.Dom.get(L);if(!L||!M){return false}var K=function(O){if(L.contains&&!H){return L.contains(O)}else{if(L.compareDocumentPosition){return !!(L.compareDocumentPosition(O)&16)}else{var N=O.parentNode;while(N){if(N==L){return true}else{if(!N.tagName||N.tagName.toUpperCase()=="HTML"){return false}}N=N.parentNode}return false}}};return F.Dom.batch(M,K,F.Dom,true)},inDocument:function(K){var L=function(M){return this.isAncestor(document.documentElement,M)};return F.Dom.batch(K,L,F.Dom,true)},getElementsBy:function(Q,L,M){L=L||"*";M=F.Dom.get(M)||document;var N=[];var P=M.getElementsByTagName(L);if(!P.length&&(L=="*"&&M.all)){P=M.all}for(var O=0,K=P.length;O<K;++O){if(Q(P[O])){N[N.length]=P[O]}}return N},batch:function(O,K,N,M){var L=O;O=F.Dom.get(O);var S=(M)?N:window;if(!O||O.tagName||!O.length){if(!O){return false}return K.call(S,O,N)}var Q=[];for(var P=0,R=O.length;P<R;++P){if(!O[P]){L=L[P]}Q[Q.length]=K.call(S,O[P],N)}return Q},getDocumentHeight:function(){var L=-1,Q=-1,P=-1;var M=parseInt(F.Dom.getStyle(document.body,"marginTop"),10);var O=parseInt(F.Dom.getStyle(document.body,"marginBottom"),10);var N=document.compatMode;if((N||D)&&!C){switch(N){case"CSS1Compat":L=((window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:-1);Q=[document.documentElement.clientHeight,self.innerHeight||-1].sort(function(S,R){return(S-R)})[1];P=document.body.offsetHeight+M+O;break;default:L=document.body.scrollHeight;P=document.body.clientHeight}}else{L=document.documentElement.scrollHeight;Q=self.innerHeight;P=document.documentElement.clientHeight}var K=[L,Q,P].sort(function(S,R){return(S-R)});return K[2]},getDocumentWidth:function(){var N=-1,K=-1,M=-1;var P=parseInt(F.Dom.getStyle(document.body,"marginRight"),10);var O=parseInt(F.Dom.getStyle(document.body,"marginLeft"),10);var Q=document.compatMode;if(Q||D){switch(Q){case"CSS1Compat":N=document.documentElement.clientWidth;K=document.body.offsetWidth+O+P;break;default:K=document.body.clientWidth;N=document.body.scrollWidth;break}}else{N=document.documentElement.clientWidth;K=document.body.offsetWidth+O+P}var L=Math.max(N,K);return L},getViewportHeight:function(){var K=-1;var L=document.compatMode;if((L||D)&&!C){switch(L){case"CSS1Compat":K=document.documentElement.clientHeight;break;default:K=document.body.clientHeight}}else{K=self.innerHeight}return K},getViewportWidth:function(){var K=-1;var L=document.compatMode;if(L||D){switch(L){case"CSS1Compat":K=document.documentElement.clientWidth;break;default:K=document.body.clientWidth}}else{K=self.innerWidth}return K}}}();FONALITY.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B};FONALITY.util.Region.prototype.contains=function(A){return(A.left>=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<A;++C){if(this.invalidHandleClasses[C]==B){delete this.invalidHandleClasses[C]}}},isValidHandleChild:function(D){var C=true;var F;try{F=D.nodeName.toUpperCase()}catch(E){F=D.nodeName}C=C&&!this.invalidHandleTypes[F];C=C&&!this.invalidHandleIds[D.id];for(var B=0,A=this.invalidHandleClasses.length;C&&B<A;++B){C=!FONALITY.util.Dom.hasClass(D,this.invalidHandleClasses[B])}return C},setXTicks:function(D,A){this.xTicks=[];this.xTickSize=A;var C={};for(var B=this.initPageX;B>=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<A;++B){var C=B+1;if(D[C]&&D[C]>=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;C<A;++C){if(B[C].id==D.id){return true}}return false};this.isTypeOfDD=function(A){return(A&&A.__ygDragDrop)};this.isHandle=function(B,A){return(this.handleIds[B]&&this.handleIds[B][A])};this.getDDById=function(B){for(var A in this.ids){if(this.ids[A][B]){return this.ids[A][B]}}return null};this.handleMouseDown=function(C,B){this.currentTarget=FONALITY.util.Event.getTarget(C);this.dragCurrent=B;var A=B.getEl();this.startX=FONALITY.util.Event.getPageX(C);this.startY=FONALITY.util.Event.getPageY(C);this.deltaX=this.startX-A.offsetLeft;this.deltaY=this.startY-A.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var D=FONALITY.util.DDM;D.startDrag(D.startX,D.startY)},this.clickTimeThresh)};this.startDrag=function(A,B){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(A,B);this.dragCurrent.startDrag(A,B)}this.dragThreshMet=true};this.handleMouseUp=function(A){if(!this.dragCurrent){return }clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(A,true)}else{}this.stopDrag(A);this.stopEvent(A)};this.stopEvent=function(A){if(this.stopPropagation){FONALITY.util.Event.stopPropagation(A)}if(this.preventDefault){FONALITY.util.Event.preventDefault(A)}};this.stopDrag=function(A){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(A);this.dragCurrent.endDrag(A)}this.dragCurrent.onMouseUp(A)}this.dragCurrent=null;this.dragOvers={}};this.handleMouseMove=function(C){if(!this.dragCurrent){return true}if(FONALITY.util.Event.isIE&&!C.button){this.stopEvent(C);return this.handleMouseUp(C)}if(!this.dragThreshMet){var B=Math.abs(this.startX-FONALITY.util.Event.getPageX(C));var A=Math.abs(this.startY-FONALITY.util.Event.getPageY(C));if(B>this.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;E<I;++E){O.b4DragOut(J,D[E].id);O.onDragOut(J,D[E].id)}for(E=0,I=C.length;E<I;++E){O.onDragEnter(J,C[E].id)}for(E=0,I=H.length;E<I;++E){O.b4DragOver(J,H[E].id);O.onDragOver(J,H[E].id)}for(E=0,I=F.length;E<I;++E){O.b4DragDrop(J,F[E].id);O.onDragDrop(J,F[E].id)}}};this.getBestMatch=function(C){var E=null;var B=C.length;if(B==1){E=C[0]}else{for(var D=0;D<B;++D){var A=C[D];if(A.cursorIsOver){E=A;break}else{if(!E||E.overlap.getArea()<A.overlap.getArea()){E=A}}}}return E};this.refreshCache=function(B){for(var A in B){if("string"!=typeof A){continue}for(var C in this.ids[A]){var D=this.ids[A][C];if(this.isTypeOfDD(D)){var E=this.getLocation(D);if(E){this.locationCache[D.id]=E}else{delete this.locationCache[D.id]}}}}};this.verifyEl=function(B){try{if(B){var A=B.offsetParent;if(A){return true}}}catch(C){}return false};this.getLocation=function(F){if(!this.isTypeOfDD(F)){return null}var D=F.getEl(),I,C,B,K,J,L,A,H,E;try{I=FONALITY.util.Dom.getXY(D)}catch(G){}if(!I){return null}C=I[0];B=C+D.offsetWidth;K=I[1];J=K+D.offsetHeight;L=K-F.padding[0];A=B+F.padding[1];H=J+F.padding[2];E=C-F.padding[3];return new FONALITY.util.Region(L,A,H,E)};this.isOverTarget=function(I,A,C){var E=this.locationCache[A.id];if(!E||!this.useCache){E=this.getLocation(A);this.locationCache[A.id]=E}if(!E){return false}A.cursorIsOver=E.contains(I);var H=this.dragCurrent;if(!H||!H.getTargetCoord||(!C&&!H.constrainX&&!H.constrainY)){return A.cursorIsOver}A.overlap=null;var F=H.getTargetCoord(I.x,I.y);var B=H.getDragEl();var D=new FONALITY.util.Region(F.y,F.x+B.offsetWidth,F.y+B.offsetHeight,F.x);var G=D.intersect(E);if(G){A.overlap=G;return(C)?true:A.cursorIsOver}else{return false}};this._onUnload=function(B,A){this.unregAll()};this.unregAll=function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(i in this.elementCache){delete this.elementCache[i]}this.elementCache={};this.ids={}};this.elementCache={};this.getElWrapper=function(B){var A=this.elementCache[B];if(!A||!A.el){A=this.elementCache[B]=new this.ElementWrapper(FONALITY.util.Dom.get(B))}return A};this.getElement=function(A){return FONALITY.util.Dom.get(A)};this.getCss=function(B){var A=FONALITY.util.Dom.get(B);return(A)?A.style:null};this.ElementWrapper=function(A){this.el=A||null;this.id=this.el&&A.id;this.css=this.el&&A.style};this.getPosX=function(A){return FONALITY.util.Dom.getX(A)};this.getPosY=function(A){return FONALITY.util.Dom.getY(A)};this.swapNode=function(C,A){if(C.swapNode){C.swapNode(A)}else{var D=A.parentNode;var B=A.nextSibling;if(B==C){D.insertBefore(C,A)}else{if(A==C.nextSibling){D.insertBefore(A,C)}else{C.parentNode.replaceChild(A,C);D.insertBefore(C,B)}}}};this.getScroll=function(){var B,A;if(document.documentElement&&document.documentElement.scrollTop){B=document.documentElement.scrollTop;A=document.documentElement.scrollLeft}else{if(document.body){B=document.body.scrollTop;A=document.body.scrollLeft}}return{top:B,left:A}};this.getStyle=function(B,A){return FONALITY.util.Dom.getStyle(B,A)};this.getScrollTop=function(){return this.getScroll().top};this.getScrollLeft=function(){return this.getScroll().left};this.moveToEl=function(A,C){var B=FONALITY.util.Dom.getXY(C);FONALITY.util.Dom.setXY(A,B)};this.getClientHeight=function(){return FONALITY.util.Dom.getClientHeight()};this.getClientWidth=function(){return FONALITY.util.Dom.getClientWidth()};this.numericSort=function(B,A){return(B-A)};this._timeoutCount=0;this._addListeners=function(){var A=FONALITY.util.DDM;if(FONALITY.util.Event&&document){A._onLoad()}else{if(A._timeoutCount>2000){}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&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}};FONALITY.util.DD.prototype.getTargetCoord=function(C,B){var A=C-this.deltaX;var D=B-this.deltaY;if(this.constrainX){if(A<this.minX){A=this.minX}if(A>this.maxX){A=this.maxX}}if(this.constrainY){if(D<this.minY){D=this.minY}if(D>this.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;E<A;++E){C[E]=G[E]+D[B]["by"][E]}}else{C=G+D[B]["by"]}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B)},init:function(C,H,G,A){var B=false;var D=null;var F=0;C=FONALITY.util.Dom.get(C);this.attributes=H||{};this.duration=G||1;this.method=A||FONALITY.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=FONALITY.util.AnimMgr.fps;this.getEl=function(){return C};this.isAnimated=function(){return B};this.getStartTime=function(){return D};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(FONALITY.util.AnimMgr.fps*this.duration):this.duration;FONALITY.util.AnimMgr.registerElement(this)};this.stop=function(){FONALITY.util.AnimMgr.stop(this)};var J=function(){this.onStart.fire();for(var K in this.attributes){this.setRuntimeAttribute(K)}B=true;F=0;D=new Date()};var I=function(){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toString=function(){return("duration: "+M.duration+", currentFrame: "+M.currentFrame)};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit)}F+=1};var E=function(){var K=(new Date()-D)/1000;var L={duration:K,frames:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps)};B=false;F=0;this.onComplete.fire(L)};this._onStart=new FONALITY.util.CustomEvent("_start",this,true);this.onStart=new FONALITY.util.CustomEvent("start",this);this.onTween=new FONALITY.util.CustomEvent("tween",this);this._onTween=new FONALITY.util.CustomEvent("_tween",this,true);this.onComplete=new FONALITY.util.CustomEvent("complete",this);this._onComplete=new FONALITY.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E)}};FONALITY.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=200;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){G._onComplete.fire();F=F||E(G);if(F!=-1){B.splice(F,1)}A-=1;if(A<=0){this.stop()}};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){if(B[G].isAnimated()){this.unRegister(H,G)}}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{FONALITY.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return -1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&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;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){FONALITY.util.ColorAnim=function(E,D,F,G){FONALITY.util.ColorAnim.superclass.constructor.call(this,E,D,F,G)};FONALITY.extend(FONALITY.util.ColorAnim,FONALITY.util.Anim);var B=FONALITY.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E)};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.parseColor=function(D){if(D.length==3){return D}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)]}E=this.patterns.hex3.exec(D);if(E&&E.length==4){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}return null};A.getAttribute=function(D){var F=this.getEl();if(this.patterns.color.test(D)){var G=FONALITY.util.Dom.getStyle(F,D);if(G=="transparent"){var E=F.parentNode;G=B.Dom.getStyle(E,D);while(E&&G=="transparent"){E=E.parentNode;G=B.Dom.getStyle(E,D);if(E.tagName.toUpperCase()=="HTML"){G="ffffff"}}}}else{G=C.getAttribute.call(this,D)}return G};A.doMethod=function(E,I,F){var H;if(this.patterns.color.test(E)){H=[];for(var G=0,D=I.length;G<D;++G){H[G]=C.doMethod.call(this,E,I[G],F[G])}H="rgb("+Math.floor(H[0])+","+Math.floor(H[1])+","+Math.floor(H[2])+")"}else{H=C.doMethod.call(this,E,I,F)}return H};A.setRuntimeAttribute=function(E){C.setRuntimeAttribute.call(this,E);if(this.patterns.color.test(E)){var G=this.attributes;var I=this.parseColor(this.runtimeAttributes[E].start);var F=this.parseColor(this.runtimeAttributes[E].end);if(typeof G[E]["to"]==="undefined"&&typeof G[E]["by"]!=="undefined"){F=this.parseColor(G[E].by);for(var H=0,D=I.length;H<D;++H){F[H]=I[H]+F[H]}}this.runtimeAttributes[E].start=I;this.runtimeAttributes[E].end=F}}})();FONALITY.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return -D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return -D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-FONALITY.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}else{return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A}}}},bounceBoth:function(B,A,D,C){if(B<C/2){return FONALITY.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return FONALITY.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){FONALITY.util.Motion=function(G,F,H,I){if(G){FONALITY.util.Motion.superclass.constructor.call(this,G,F,H,I)}};FONALITY.extend(FONALITY.util.Motion,FONALITY.util.ColorAnim);var D=FONALITY.util;var E=D.Motion.superclass;var B=D.Motion.prototype;B.toString=function(){var F=this.getEl();var G=F.id||F.tagName;return("Motion "+G)};B.patterns.points=/^points$/i;B.setAttribute=function(F,H,G){if(this.patterns.points.test(F)){G=G||"px";E.setAttribute.call(this,"left",H[0],G);E.setAttribute.call(this,"top",H[1],G)}else{E.setAttribute.call(this,F,H,G)}};B.getAttribute=function(F){if(this.patterns.points.test(F)){var G=[E.getAttribute.call(this,"left"),E.getAttribute.call(this,"top")]}else{G=E.getAttribute.call(this,F)}return G};B.doMethod=function(F,J,G){var I=null;if(this.patterns.points.test(F)){var H=this.method(this.currentFrame,0,100,this.totalFrames)/100;I=D.Bezier.getPosition(this.runtimeAttributes[F],H)}else{I=E.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(O){if(this.patterns.points.test(O)){var G=this.getEl();var I=this.attributes;var F;var K=I.points["control"]||[];var H;var L,N;if(K.length>0&&!(K[0] instanceof Array)){K=[K]}else{var J=[];for(L=0,N=K.length;L<N;++L){J[L]=K[L]}K=J}if(D.Dom.getStyle(G,"position")=="static"){D.Dom.setStyle(G,"position","relative")}if(C(I.points["from"])){D.Dom.setXY(G,I.points["from"])}else{D.Dom.setXY(G,D.Dom.getXY(G))}F=this.getAttribute("points");if(C(I.points["to"])){H=A.call(this,I.points["to"],F);var M=D.Dom.getXY(this.getEl());for(L=0,N=K.length;L<N;++L){K[L]=A.call(this,K[L],F)}}else{if(C(I.points["by"])){H=[F[0]+I.points["by"][0],F[1]+I.points["by"][1]];for(L=0,N=K.length;L<N;++L){K[L]=[F[0]+K[L][0],F[1]+K[L][1]]}}}this.runtimeAttributes[O]=[F];if(K.length>0){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<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};break}catch(C){}}}finally{return D}},getConnectionObject:function(){var B;var C=this._transaction_id;try{B=this.createXhrObject(C);if(B){this._transaction_id++}}catch(A){}finally{return B}},asyncRequest:function(E,B,D,A){var C=this.getConnectionObject();if(!C){return null}else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(C.tId,D,B);this.releaseObject(C);return }if(E=="GET"){B+="?"+this._sFormData}else{if(E=="POST"){A=(A?this._sFormData+"&"+A:this._sFormData)}}this._sFormData=""}C.conn.open(E,B,true);if(this._isFormSubmit||(A&&this._use_default_post_header)){this.initHeader("Content-Type",this._default_post_header);if(this._isFormSubmit){this._isFormSubmit=false}}if(this._has_http_headers){this.setHeader(C)}this.handleReadyState(C,D);C.conn.send(A?A:null);return C}},handleReadyState:function(B,C){var A=this;if(C&&C.timeout){this._timeOut[B.tId]=window.setTimeout(function(){A.abort(B,C,true)},C.timeout)}this._poll[B.tId]=window.setInterval(function(){if(B.conn&&B.conn.readyState==4){window.clearInterval(A._poll[B.tId]);delete A._poll[B.tId];if(C&&C.timeout){delete A._timeOut[B.tId]}A.handleTransactionResponse(B,C)}},this._polling_interval)},handleTransactionResponse:function(E,F,A){if(!F){this.releaseObject(E);return }var C,B;try{if(E.conn.status!==undefined&&E.conn.status!=0){C=E.conn.status}else{C=13030}}catch(D){C=13030}if(C>=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<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=A.conn.status;D.statusText=A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(typeof G!==undefined){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,B){if(this._http_header[A]===undefined){this._http_header[A]=B}else{this._http_header[A]=B+","+this._http_header[A]}this._has_http_headers=true},setHeader:function(A){for(var B in this._http_header){if(this._http_header.hasOwnProperty(B)){A.conn.setRequestHeader(B,this._http_header[B])}}delete this._http_header;this._http_header={};this._has_http_headers=false},setForm:function(J,E,B){this._sFormData="";if(typeof J=="string"){var I=(document.getElementById(J)||document.forms[J])}else{if(typeof J=="object"){var I=J}else{return }}if(E){this.createFrame(B?B:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=I;return }var A,H,F,K;var G=false;for(var D=0;D<I.elements.length;D++){A=I.elements[D];K=I.elements[D].disabled;H=I.elements[D].name;F=I.elements[D].value;if(!K&&H){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(H)+"="+encodeURIComponent(A.options[C].attributes.value.specified?A.options[C].value:A.options[C].text)+"&"}else{this._sFormData+=encodeURIComponent(H)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&"}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(H)+"="+encodeURIComponent(F)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(G==false){this._sFormData+=encodeURIComponent(H)+"="+encodeURIComponent(F)+"&";G=true}break;default:this._sFormData+=encodeURIComponent(H)+"="+encodeURIComponent(F)+"&";break}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1)},createFrame:function(A){var B="yuiIO"+this._transaction_id;if(window.ActiveXObject){var C=document.createElement('<IFRAME id="'+B+'" name="'+B+'">');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;L<B.length;L++){var H=B[L];if(H){var I=H[0];var J=H[1];if(I.toLowerCase()==R){B[L]=null;B.push([R,(typeof O!="undefined"?O:J)]);K=true;break}}}if(!K&&typeof O!="undefined"){B.push([R,O])}}if(Q.supercedes){for(var S=0;S<Q.supercedes.length;S++){var P=Q.supercedes[S];for(var G=0;G<B.length;G++){var M=B[G];if(M){var N=M[0];var F=M[1];if(N.toLowerCase()==P.toLowerCase()){B.push([N,F]);B[G]=null;break}}}}}return true}else{return false}};this.refireEvent=function(F){F=F.toLowerCase();var G=C[F];if(typeof G!="undefined"&&G.event&&typeof G.value!="undefined"){if(this.queueInProgress){this.queueProperty(F)}else{D(F,G.value)}}};this.applyConfig=function(F,G){if(G){E=F}for(var H in F){this.queueProperty(H,F[H])}};this.refresh=function(){for(var F in C){this.refireEvent(F)}};this.fireQueue=function(){this.queueInProgress=true;for(var G=0;G<B.length;G++){var J=B[G];if(J){var F=J[0];var I=J[1];var H=C[F];H.value=I;D(F,I)}}this.queueInProgress=false;B=[]};this.subscribeToConfigEvent=function(G,H,J,F){G=G.toLowerCase();var I=C[G];if(typeof I!="undefined"&&I.event){if(!FONALITY.util.Config.alreadySubscribed(I.event,H,J)){I.event.subscribe(H,J,F)}return true}else{return false}};this.unsubscribeFromConfigEvent=function(F,G,I){F=F.toLowerCase();var H=C[F];if(typeof H!="undefined"&&H.event){return H.event.unsubscribe(G,I)}else{return false}};this.toString=function(){var F="Config";if(this.owner){F+=" ["+this.owner.toString()+"]"}return F};this.outputEventQueue=function(){var F="";for(var G=0;G<B.length;G++){var H=B[G];if(H){F+=H[0]+"="+H[1]+", "}}return F}};FONALITY.util.Config.alreadySubscribed=function(B,C,E){for(var D=0;D<B.subscribers.length;D++){var A=B.subscribers[D];if(A&&A.obj==E&&A.fn==C){return true}}return false};FONALITY.widget.Module=function(B,A){if(B){this.init(B,A)}};FONALITY.widget.Module.IMG_ROOT="http://us.i1.yimg.com/us.yimg.com/i/";FONALITY.widget.Module.IMG_ROOT_SSL="https://a248.e.akamai.net/sec.yimg.com/i/";FONALITY.widget.Module.CSS_MODULE="module";FONALITY.widget.Module.CSS_HEADER="hd";FONALITY.widget.Module.CSS_BODY="bd";FONALITY.widget.Module.CSS_FOOTER="ft";FONALITY.widget.Module.RESIZE_MONITOR_SECURE_URL="javascript:false";FONALITY.widget.Module.prototype={constructor:FONALITY.widget.Module,element:null,header:null,body:null,footer:null,id:null,childNodesInDOM:null,imageRoot:FONALITY.widget.Module.IMG_ROOT,beforeInitEvent:null,initEvent:null,appendEvent:null,beforeRenderEvent:null,renderEvent:null,changeHeaderEvent:null,changeBodyEvent:null,changeFooterEvent:null,changeContentEvent:null,destroyEvent:null,beforeShowEvent:null,showEvent:null,beforeHideEvent:null,hideEvent:null,initEvents:function(){this.beforeInitEvent=new FONALITY.util.CustomEvent("beforeInit");this.initEvent=new FONALITY.util.CustomEvent("init");this.appendEvent=new FONALITY.util.CustomEvent("append");this.beforeRenderEvent=new FONALITY.util.CustomEvent("beforeRender");this.renderEvent=new FONALITY.util.CustomEvent("render");this.changeHeaderEvent=new FONALITY.util.CustomEvent("changeHeader");this.changeBodyEvent=new FONALITY.util.CustomEvent("changeBody");this.changeFooterEvent=new FONALITY.util.CustomEvent("changeFooter");this.changeContentEvent=new FONALITY.util.CustomEvent("changeContent");this.destroyEvent=new FONALITY.util.CustomEvent("destroy");this.beforeShowEvent=new FONALITY.util.CustomEvent("beforeShow");this.showEvent=new FONALITY.util.CustomEvent("show");this.beforeHideEvent=new FONALITY.util.CustomEvent("beforeHide");this.hideEvent=new FONALITY.util.CustomEvent("hide")},platform:function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("windows")!=-1||A.indexOf("win32")!=-1){return"windows"}else{if(A.indexOf("macintosh")!=-1){return"mac"}else{return false}}}(),browser:function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera"}else{if(A.indexOf("msie 7")!=-1){return"ie7"}else{if(A.indexOf("msie")!=-1){return"ie"}else{if(A.indexOf("safari")!=-1){return"safari"}else{if(A.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty("visible",{value:true,handler:this.configVisible,validator:this.cfg.checkBoolean});this.cfg.addProperty("effect",{suppressEvent:true,supercedes:["visible"]});this.cfg.addProperty("monitorresize",{value:true,handler:this.configMonitorResize})},init:function(D,C){this.initEvents();this.beforeInitEvent.fire(FONALITY.widget.Module);this.cfg=new FONALITY.util.Config(this);if(this.isSecure){this.imageRoot=FONALITY.widget.Module.IMG_ROOT_SSL}if(typeof D=="string"){var A=D;D=document.getElementById(D);if(!D){D=document.createElement("DIV");D.id=A}}this.element=D;if(D.id){this.id=D.id}var E=this.element.childNodes;if(E){for(var B=0;B<E.length;B++){var F=E[B];switch(F.className){case FONALITY.widget.Module.CSS_HEADER:this.header=F;break;case FONALITY.widget.Module.CSS_BODY:this.body=F;break;case FONALITY.widget.Module.CSS_FOOTER:this.footer=F;break}}}this.initDefaultConfig();FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Module.CSS_MODULE);if(C){this.cfg.applyConfig(C,true)}if(!FONALITY.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(FONALITY.widget.Module)},initResizeMonitor:function(){if(this.browser!="opera"){var E=document.getElementById("_yuiResizeMonitor");if(!E){E=document.createElement("iframe");var A=(this.browser.indexOf("ie")===0);if(this.isSecure&&FONALITY.widget.Module.RESIZE_MONITOR_SECURE_URL&&A){E.src=FONALITY.widget.Module.RESIZE_MONITOR_SECURE_URL}E.id="_yuiResizeMonitor";E.style.visibility="hidden";document.body.appendChild(E);E.style.width="10em";E.style.height="10em";E.style.position="absolute";var C=-1*E.offsetWidth,B=-1*E.offsetHeight;E.style.top=B+"px";E.style.left=C+"px";E.style.borderStyle="none";E.style.borderWidth="0";FONALITY.util.Dom.setStyle(E,"opacity","0");E.style.visibility="visible";if(!A){var D=E.contentWindow.document;D.open();D.close()}}if(E&&E.contentWindow){this.resizeMonitor=E;FONALITY.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",this.onDomResize,this,true)}}},onDomResize:function(D,C){var B=-1*this.resizeMonitor.offsetWidth,A=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=A+"px";this.resizeMonitor.style.left=B+"px"},setHeader:function(A){if(!this.header){this.header=document.createElement("DIV");this.header.className=FONALITY.widget.Module.CSS_HEADER}if(typeof A=="string"){this.header.innerHTML=A}else{this.header.innerHTML="";this.header.appendChild(A)}this.changeHeaderEvent.fire(A);this.changeContentEvent.fire()},appendToHeader:function(A){if(!this.header){this.header=document.createElement("DIV");this.header.className=FONALITY.widget.Module.CSS_HEADER}this.header.appendChild(A);this.changeHeaderEvent.fire(A);this.changeContentEvent.fire()},setBody:function(A){if(!this.body){this.body=document.createElement("DIV");this.body.className=FONALITY.widget.Module.CSS_BODY}if(typeof A=="string"){this.body.innerHTML=A}else{this.body.innerHTML="";this.body.appendChild(A)}this.changeBodyEvent.fire(A);this.changeContentEvent.fire()},appendToBody:function(A){if(!this.body){this.body=document.createElement("DIV");this.body.className=FONALITY.widget.Module.CSS_BODY}this.body.appendChild(A);this.changeBodyEvent.fire(A);this.changeContentEvent.fire()},setFooter:function(A){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=FONALITY.widget.Module.CSS_FOOTER;this.footer.id="supportal_footer_div"}if(typeof A=="string"){this.footer.innerHTML=A}else{this.footer.innerHTML="";this.footer.appendChild(A)}this.changeFooterEvent.fire(A);this.changeContentEvent.fire()},appendToFooter:function(A){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=FONALITY.widget.Module.CSS_FOOTER}this.footer.appendChild(A);this.changeFooterEvent.fire(A);this.changeContentEvent.fire()},render:function(C,A){this.beforeRenderEvent.fire();if(!A){A=this.element}var D=this;var B=function(F){if(typeof F=="string"){F=document.getElementById(F)}if(F){F.appendChild(D.element);D.appendEvent.fire()}};if(C){B(C)}else{if(!FONALITY.util.Dom.inDocument(this.element)){return false}}if(this.header&&!FONALITY.util.Dom.inDocument(this.header)){var E=A.firstChild;if(E){A.insertBefore(this.header,E)}else{A.appendChild(this.header)}}if(this.body&&!FONALITY.util.Dom.inDocument(this.body)){if(this.footer&&FONALITY.util.Dom.isAncestor(this.moduleElement,this.footer)){A.insertBefore(this.body,this.footer)}else{A.appendChild(this.body)}}if(this.footer&&!FONALITY.util.Dom.inDocument(this.footer)){A.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){if(this.element){var A=this.element.parentNode}if(A){A.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(B,A,C){var D=A[0];if(D){this.beforeShowEvent.fire();FONALITY.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();FONALITY.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(C,B,D){var A=B[0];if(A){this.initResizeMonitor()}else{FONALITY.util.Event.removeListener(this.resizeMonitor,"resize",this.onDomResize);this.resizeMonitor=null}}};FONALITY.widget.Module.prototype.toString=function(){return"Module "+this.id};FONALITY.widget.Overlay=function(B,A){FONALITY.widget.Overlay.superclass.constructor.call(this,B,A)};FONALITY.extend(FONALITY.widget.Overlay,FONALITY.widget.Module);FONALITY.widget.Overlay.IFRAME_SRC="promo/m/irs/blank.gif";FONALITY.widget.Overlay.TOP_LEFT="tl";FONALITY.widget.Overlay.TOP_RIGHT="tr";FONALITY.widget.Overlay.BOTTOM_LEFT="bl";FONALITY.widget.Overlay.BOTTOM_RIGHT="br";FONALITY.widget.Overlay.CSS_OVERLAY="overlay";FONALITY.widget.Overlay.prototype.beforeMoveEvent=null;FONALITY.widget.Overlay.prototype.moveEvent=null;FONALITY.widget.Overlay.prototype.init=function(B,A){FONALITY.widget.Overlay.superclass.init.call(this,B);this.beforeInitEvent.fire(FONALITY.widget.Overlay);FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Overlay.CSS_OVERLAY);if(A){this.cfg.applyConfig(A,true)}if(this.platform=="mac"&&this.browser=="gecko"){if(!FONALITY.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!FONALITY.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(FONALITY.widget.Overlay)};FONALITY.widget.Overlay.prototype.initEvents=function(){FONALITY.widget.Overlay.superclass.initEvents.call(this);this.beforeMoveEvent=new FONALITY.util.CustomEvent("beforeMove",this);this.moveEvent=new FONALITY.util.CustomEvent("move",this)};FONALITY.widget.Overlay.prototype.initDefaultConfig=function(){FONALITY.widget.Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty("x",{handler:this.configX,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("y",{handler:this.configY,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("xy",{handler:this.configXY,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("context",{handler:this.configContext,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("fixedcenter",{value:false,handler:this.configFixedCenter,validator:this.cfg.checkBoolean,supercedes:["iframe","visible"]});this.cfg.addProperty("width",{handler:this.configWidth,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("height",{handler:this.configHeight,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("zIndex",{value:null,handler:this.configzIndex});this.cfg.addProperty("constraintoviewport",{value:false,handler:this.configConstrainToViewport,validator:this.cfg.checkBoolean,supercedes:["iframe","x","y","xy"]});this.cfg.addProperty("iframe",{value:(this.browser=="ie"?true:false),handler:this.configIframe,validator:this.cfg.checkBoolean,supercedes:["zIndex"]})};FONALITY.widget.Overlay.prototype.moveTo=function(A,B){this.cfg.setProperty("xy",[A,B])};FONALITY.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){FONALITY.util.Dom.removeClass(this.element,"show-scrollbars");FONALITY.util.Dom.addClass(this.element,"hide-scrollbars")};FONALITY.widget.Overlay.prototype.showMacGeckoScrollbars=function(){FONALITY.util.Dom.removeClass(this.element,"hide-scrollbars");FONALITY.util.Dom.addClass(this.element,"show-scrollbars")};FONALITY.widget.Overlay.prototype.configVisible=function(J,I,E){var B=I[0];var M=FONALITY.util.Dom.getStyle(this.element,"visibility");var L=this.cfg.getProperty("effect");var N=[];if(L){if(L instanceof Array){for(var F=0;F<L.length;F++){var A=L[F];N[N.length]=A.effect(this,A.duration)}}else{N[N.length]=L.effect(this,L.duration)}}var K=(this.platform=="mac"&&this.browser=="gecko");if(B){if(K){this.showMacGeckoScrollbars()}if(L){if(B){if(M!="visible"){this.beforeShowEvent.fire();for(var D=0;D<N.length;D++){var H=N[D];if(D===0&&!FONALITY.util.Config.alreadySubscribed(H.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){H.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}H.animateIn()}}}}else{if(M!="visible"){this.beforeShowEvent.fire();FONALITY.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(K){this.hideMacGeckoScrollbars()}if(L){if(M=="visible"){this.beforeHideEvent.fire();for(var C=0;C<N.length;C++){var G=N[C];if(C===0&&!FONALITY.util.Config.alreadySubscribed(G.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){G.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}G.animateOut()}}}else{if(M=="visible"){this.beforeHideEvent.fire();FONALITY.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire()}}}};FONALITY.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center()}};FONALITY.widget.Overlay.prototype.configFixedCenter=function(B,A,C){var D=A[0];if(D){this.center();if(!FONALITY.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true)}if(!FONALITY.util.Config.alreadySubscribed(FONALITY.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){FONALITY.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!FONALITY.util.Config.alreadySubscribed(FONALITY.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){FONALITY.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{FONALITY.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);FONALITY.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}};FONALITY.widget.Overlay.prototype.configHeight=function(D,B,E){var A=B[0];var C=this.element;FONALITY.util.Dom.setStyle(C,"height",A);this.cfg.refireEvent("iframe")};FONALITY.widget.Overlay.prototype.configWidth=function(D,A,E){var C=A[0];var B=this.element;FONALITY.util.Dom.setStyle(B,"width",C);this.cfg.refireEvent("iframe")};FONALITY.widget.Overlay.prototype.configzIndex=function(C,A,D){var E=A[0];var B=this.element;if(!E){E=FONALITY.util.Dom.getStyle(B,"zIndex");if(!E||isNaN(E)){E=0}}if(this.iframe){if(E<=0){E=1}FONALITY.util.Dom.setStyle(this.iframe,"zIndex",(E-1))}FONALITY.util.Dom.setStyle(B,"zIndex",E);this.cfg.setProperty("zIndex",E,true)};FONALITY.widget.Overlay.prototype.configXY=function(C,B,D){var F=B[0];var A=F[0];var E=F[1];this.cfg.setProperty("x",A);this.cfg.setProperty("y",E);this.beforeMoveEvent.fire([A,E]);A=this.cfg.getProperty("x");E=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([A,E])};FONALITY.widget.Overlay.prototype.configX=function(C,B,D){var A=B[0];var E=this.cfg.getProperty("y");this.cfg.setProperty("x",A,true);this.cfg.setProperty("y",E,true);this.beforeMoveEvent.fire([A,E]);A=this.cfg.getProperty("x");E=this.cfg.getProperty("y");FONALITY.util.Dom.setX(this.element,A,true);this.cfg.setProperty("xy",[A,E],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([A,E])};FONALITY.widget.Overlay.prototype.configY=function(C,B,D){var A=this.cfg.getProperty("x");var E=B[0];this.cfg.setProperty("x",A,true);this.cfg.setProperty("y",E,true);this.beforeMoveEvent.fire([A,E]);A=this.cfg.getProperty("x");E=this.cfg.getProperty("y");FONALITY.util.Dom.setY(this.element,E,true);this.cfg.setProperty("xy",[A,E],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([A,E])};FONALITY.widget.Overlay.prototype.showIframe=function(){if(this.iframe){this.iframe.style.display="block"}};FONALITY.widget.Overlay.prototype.hideIframe=function(){if(this.iframe){this.iframe.style.display="none"}};FONALITY.widget.Overlay.prototype.configIframe=function(F,E,D){var B=E[0];if(B){if(!FONALITY.util.Config.alreadySubscribed(this.showEvent,this.showIframe,this)){this.showEvent.subscribe(this.showIframe,this,true)}if(!FONALITY.util.Config.alreadySubscribed(this.hideEvent,this.hideIframe,this)){this.hideEvent.subscribe(this.hideIframe,this,true)}var H=this.cfg.getProperty("x");var G=this.cfg.getProperty("y");if(!H||!G){this.syncPosition();H=this.cfg.getProperty("x");G=this.cfg.getProperty("y")}if(!isNaN(H)&&!isNaN(G)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=this.imageRoot+FONALITY.widget.Overlay.IFRAME_SRC}var I=this.element.parentNode;if(I){I.appendChild(this.iframe)}else{document.body.appendChild(this.iframe)}FONALITY.util.Dom.setStyle(this.iframe,"position","absolute");FONALITY.util.Dom.setStyle(this.iframe,"border","none");FONALITY.util.Dom.setStyle(this.iframe,"margin","0");FONALITY.util.Dom.setStyle(this.iframe,"padding","0");FONALITY.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){this.showIframe()}else{this.hideIframe()}}var C=FONALITY.util.Dom.getStyle(this.iframe,"display");if(C=="none"){this.iframe.style.display="block"}FONALITY.util.Dom.setXY(this.iframe,[H,G]);var A=this.element.clientWidth;var J=this.element.clientHeight;FONALITY.util.Dom.setStyle(this.iframe,"width",(A+2)+"px");FONALITY.util.Dom.setStyle(this.iframe,"height",(J+2)+"px");if(C=="none"){this.iframe.style.display="none"}}}else{if(this.iframe){this.iframe.style.display="none"}this.showEvent.unsubscribe(this.showIframe,this);this.hideEvent.unsubscribe(this.hideIframe,this)}};FONALITY.widget.Overlay.prototype.configConstrainToViewport=function(B,A,C){var D=A[0];if(D){if(!FONALITY.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}};FONALITY.widget.Overlay.prototype.configContext=function(C,B,E){var G=B[0];if(G){var D=G[0];var F=G[1];var A=G[2];if(D){if(typeof D=="string"){this.cfg.setProperty("context",[document.getElementById(D),F,A],true)}if(F&&A){this.align(F,A)}}}};FONALITY.widget.Overlay.prototype.align=function(B,I){var H=this.cfg.getProperty("context");if(H){var A=H[0];var C=this.element;var F=this;if(!B){B=H[1]}if(!I){I=H[2]}if(C&&A){var D=FONALITY.util.Dom.getRegion(C);var G=FONALITY.util.Dom.getRegion(A);var E=function(J,K){switch(B){case FONALITY.widget.Overlay.TOP_LEFT:F.moveTo(K,J);break;case FONALITY.widget.Overlay.TOP_RIGHT:F.moveTo(K-C.offsetWidth,J);break;case FONALITY.widget.Overlay.BOTTOM_LEFT:F.moveTo(K,J-C.offsetHeight);break;case FONALITY.widget.Overlay.BOTTOM_RIGHT:F.moveTo(K-C.offsetWidth,J-C.offsetHeight);break}};switch(I){case FONALITY.widget.Overlay.TOP_LEFT:E(G.top,G.left);break;case FONALITY.widget.Overlay.TOP_RIGHT:E(G.top,G.right);break;case FONALITY.widget.Overlay.BOTTOM_LEFT:E(G.bottom,G.left);break;case FONALITY.widget.Overlay.BOTTOM_RIGHT:E(G.bottom,G.right);break}}}};FONALITY.widget.Overlay.prototype.enforceConstraints=function(I,H,E){var K=H[0];var M=K[0];var L=K[1];var B=this.element.offsetHeight;var G=this.element.offsetWidth;var J=FONALITY.util.Dom.getViewportWidth();var D=FONALITY.util.Dom.getViewportHeight();var P=document.documentElement.scrollLeft||document.body.scrollLeft;var N=document.documentElement.scrollTop||document.body.scrollTop;var C=N+10;var F=P+10;var A=N+D-B-10;var O=P+J-G-10;if(M<F){M=F}else{if(M>O){M=O}}if(L<C){L=C}else{if(L>A){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;D<this.overlays.length;D++){FONALITY.util.Dom.removeClass(this.overlays[D].element,FONALITY.widget.OverlayManager.CSS_FOCUSED)}};var A=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(A){this.register(A);this.overlays.sort(this.compareZIndexDesc)}},register:function(A){if(A instanceof FONALITY.widget.Overlay){A.cfg.addProperty("manager",{value:this});A.focusEvent=new FONALITY.util.CustomEvent("focus");A.blurEvent=new FONALITY.util.CustomEvent("blur");var F=this;A.focus=function(){F.focus(this);this.focusEvent.fire()};A.blur=function(){F.blurAll();this.blurEvent.fire()};var E=function(I,H){A.focus()};var D=this.cfg.getProperty("focusevent");FONALITY.util.Event.addListener(A.element,D,E,this,true);var G=FONALITY.util.Dom.getStyle(A.element,"zIndex");if(!isNaN(G)){A.cfg.setProperty("zIndex",parseInt(G,10))}else{A.cfg.setProperty("zIndex",0)}this.overlays.push(A);return true}else{if(A instanceof Array){var C=0;for(var B=0;B<A.length;B++){if(this.register(A[B])){C++}}if(C>0){return true}}else{return false}}},find:function(A){if(A instanceof FONALITY.widget.Overlay){for(var C=0;C<this.overlays.length;C++){if(this.overlays[C]==A){return this.overlays[C]}}}else{if(typeof A=="string"){for(var B=0;B<this.overlays.length;B++){if(this.overlays[B].id==A){return this.overlays[B]}}}}return null},compareZIndexDesc:function(D,C){var B=D.cfg.getProperty("zIndex");var A=C.cfg.getProperty("zIndex");if(B>A){return -1}else{if(B<A){return 1}else{return 0}}},showAll:function(){for(var A=0;A<this.overlays.length;A++){this.overlays[A].show()}},hideAll:function(){for(var A=0;A<this.overlays.length;A++){this.overlays[A].hide()}},toString:function(){return"OverlayManager"}};FONALITY.util.KeyListener=function(A,F,B,C){if(!C){C=FONALITY.util.KeyListener.KEYDOWN}var D=new FONALITY.util.CustomEvent("keyPressed");this.enabledEvent=new FONALITY.util.CustomEvent("enabled");this.disabledEvent=new FONALITY.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A)}if(typeof B=="function"){D.subscribe(B)}else{D.subscribe(B.fn,B.scope,B.correctScope)}function E(J,I){var G=J.charCode||J.keyCode;if(!F.shift){F.shift=false}if(!F.alt){F.alt=false}if(!F.ctrl){F.ctrl=false}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){if(G==F.keys[H]){D.fire(G,J);break}}}else{if(G==F.keys){D.fire(G,J)}}}}this.enable=function(){if(!this.enabled){FONALITY.util.Event.addListener(A,C,E);this.enabledEvent.fire(F)}this.enabled=true};this.disable=function(){if(this.enabled){FONALITY.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F)}this.enabled=false};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"")}};FONALITY.util.KeyListener.KEYDOWN="keydown";FONALITY.util.KeyListener.KEYUP="keyup";FONALITY.util.KeyListener.prototype.enabled=null;FONALITY.util.KeyListener.prototype.enable=function(){};FONALITY.util.KeyListener.prototype.disable=function(){};FONALITY.util.KeyListener.prototype.enabledEvent=null;FONALITY.util.KeyListener.prototype.disabledEvent=null;FONALITY.widget.Tooltip=function(B,A){FONALITY.widget.Tooltip.superclass.constructor.call(this,B,A)};FONALITY.extend(FONALITY.widget.Tooltip,FONALITY.widget.Overlay);FONALITY.widget.Tooltip.CSS_TOOLTIP="tt";FONALITY.widget.Tooltip.prototype.init=function(B,A){if(document.readyState&&document.readyState!="complete"){var C=function(){this.init(B,A)};FONALITY.util.Event.addListener(window,"load",C,this,true)}else{FONALITY.widget.Tooltip.superclass.init.call(this,B);this.beforeInitEvent.fire(FONALITY.widget.Tooltip);FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Tooltip.CSS_TOOLTIP);if(A){this.cfg.applyConfig(A,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.render(this.cfg.getProperty("container"));this.initEvent.fire(FONALITY.widget.Tooltip)}};FONALITY.widget.Tooltip.prototype.initDefaultConfig=function(){FONALITY.widget.Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty("preventoverlap",{value:true,validator:this.cfg.checkBoolean,supercedes:["x","y","xy"]});this.cfg.addProperty("showdelay",{value:200,handler:this.configShowDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("autodismissdelay",{value:5000,handler:this.configAutoDismissDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("hidedelay",{value:250,handler:this.configHideDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("text",{handler:this.configText,suppressEvent:true});this.cfg.addProperty("container",{value:document.body,handler:this.configContainer})};FONALITY.widget.Tooltip.prototype.configText=function(B,A,C){var D=A[0];if(D){this.setBody(D)}};FONALITY.widget.Tooltip.prototype.configContainer=function(C,B,D){var A=B[0];if(typeof A=="string"){this.cfg.setProperty("container",document.getElementById(A),true)}};FONALITY.widget.Tooltip.prototype.configContext=function(E,B,F){var C=B[0];if(C){if(!(C instanceof Array)){if(typeof C=="string"){this.cfg.setProperty("context",[document.getElementById(C)],true)}else{this.cfg.setProperty("context",[C],true)}C=this.cfg.getProperty("context")}if(this._context){for(var H=0;H<this._context.length;++H){var D=this._context[H];FONALITY.util.Event.removeListener(D,"mouseover",this.onContextMouseOver);FONALITY.util.Event.removeListener(D,"mousemove",this.onContextMouseMove);FONALITY.util.Event.removeListener(D,"mouseout",this.onContextMouseOut)}}this._context=C;for(var G=0;G<this._context.length;++G){var A=this._context[G];FONALITY.util.Event.addListener(A,"mouseover",this.onContextMouseOver,this);FONALITY.util.Event.addListener(A,"mousemove",this.onContextMouseMove,this);FONALITY.util.Event.addListener(A,"mouseout",this.onContextMouseOut,this)}}};FONALITY.widget.Tooltip.prototype.onContextMouseMove=function(B,A){A.pageX=FONALITY.util.Event.getPageX(B);A.pageY=FONALITY.util.Event.getPageY(B)};FONALITY.widget.Tooltip.prototype.onContextMouseOver=function(C,B){if(B.hideProcId){clearTimeout(B.hideProcId);B.hideProcId=null}var A=this;FONALITY.util.Event.addListener(A,"mousemove",B.onContextMouseMove,B);if(A.title){B._tempTitle=A.title;A.title=""}B.showProcId=B.doShow(C,A)};FONALITY.widget.Tooltip.prototype.onContextMouseOut=function(C,B){var A=this;if(B._tempTitle){A.title=B._tempTitle;B._tempTitle=null}if(B.showProcId){clearTimeout(B.showProcId);B.showProcId=null}if(B.hideProcId){clearTimeout(B.hideProcId);B.hideProcId=null}B.hideProcId=setTimeout(function(){B.hide()},B.cfg.getProperty("hidedelay"))};FONALITY.widget.Tooltip.prototype.doShow=function(C,A){var D=25;if(this.browser=="opera"&&A.tagName=="A"){D+=12}var B=this;return setTimeout(function(){if(B._tempTitle){B.setBody(B._tempTitle)}else{B.cfg.refireEvent("text")}B.moveTo(B.pageX,B.pageY+D);if(B.cfg.getProperty("preventoverlap")){B.preventOverlap(B.pageX,B.pageY)}FONALITY.util.Event.removeListener(A,"mousemove",B.onContextMouseMove);B.show();B.hideProcId=B.doHide()},this.cfg.getProperty("showdelay"))};FONALITY.widget.Tooltip.prototype.doHide=function(){var A=this;return setTimeout(function(){A.hide()},this.cfg.getProperty("autodismissdelay"))};FONALITY.widget.Tooltip.prototype.preventOverlap=function(E,D){var A=this.element.offsetHeight;var B=FONALITY.util.Dom.getRegion(this.element);B.top-=5;B.left-=5;B.right+=5;B.bottom+=5;var C=new FONALITY.util.Point(E,D);if(B.contains(C)){this.cfg.setProperty("y",(D-A-5))}};FONALITY.widget.Tooltip.prototype.toString=function(){return"Tooltip "+this.id};FONALITY.widget.Panel=function(B,A){FONALITY.widget.Panel.superclass.constructor.call(this,B,A)};FONALITY.extend(FONALITY.widget.Panel,FONALITY.widget.Overlay);FONALITY.widget.Panel.CSS_PANEL="panel";FONALITY.widget.Panel.CSS_PANEL2="panel2";FONALITY.widget.Panel.CSS_PANEL_CONTAINER="panel-container";FONALITY.widget.Panel.CSS_PANEL2_CONTAINER="panel2-container";FONALITY.widget.Panel.prototype.showMaskEvent=null;FONALITY.widget.Panel.prototype.hideMaskEvent=null;FONALITY.widget.Panel.prototype.init=function(B,A){FONALITY.widget.Panel.superclass.init.call(this,B);this.beforeInitEvent.fire(FONALITY.widget.Panel);if(B=="wait"){FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Panel.CSS_PANEL2)}else{FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Panel.CSS_PANEL)}this.buildWrapper(B);if(A){this.cfg.applyConfig(A,true)}this.beforeRenderEvent.subscribe(function(){var D=this.cfg.getProperty("draggable");if(D){if(!this.header){this.setHeader("&nbsp;")}}},this,true);var C=this;this.showMaskEvent.subscribe(function(){var D=function(E){if(E.tagName=="A"||E.tagName=="BUTTON"||E.tagName=="SELECT"||E.tagName=="INPUT"||E.tagName=="TEXTAREA"||E.tagName=="FORM"){if(!FONALITY.util.Dom.isAncestor(C.element,E)){FONALITY.util.Event.addListener(E,"focus",E.blur);return true}}else{return false}};this.focusableElements=FONALITY.util.Dom.getElementsBy(D)},this,true);this.hideMaskEvent.subscribe(function(){for(var E=0;E<this.focusableElements.length;E++){var D=this.focusableElements[E];FONALITY.util.Event.removeListener(D,"focus",D.blur)}},this,true);this.initEvent.fire(FONALITY.widget.Panel)};FONALITY.widget.Panel.prototype.initEvents=function(){FONALITY.widget.Panel.superclass.initEvents.call(this);this.showMaskEvent=new FONALITY.util.CustomEvent("showMask");this.hideMaskEvent=new FONALITY.util.CustomEvent("hideMask");this.dragEvent=new FONALITY.util.CustomEvent("drag")};FONALITY.widget.Panel.prototype.initDefaultConfig=function(){FONALITY.widget.Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty("close",{value:true,handler:this.configClose,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("draggable",{value:true,handler:this.configDraggable,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("underlay",{value:"shadow",handler:this.configUnderlay,supercedes:["visible"]});this.cfg.addProperty("modal",{value:false,handler:this.configModal,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("keylisteners",{handler:this.configKeyListeners,suppressEvent:true,supercedes:["visible"]})};FONALITY.widget.Panel.prototype.configClose=function(B,A,D){var E=A[0];var C=function(G,F){F.hide();if(document.getElementById("mainpage")&&document.getElementById("mainpage").style.visibility=="hidden"){document.getElementById("mainpage").style.visibility="visible";placeFocus2("f","username")}};if(E){if(!this.close){this.close=document.createElement("DIV");FONALITY.util.Dom.addClass(this.close,"close");if(this.isSecure){FONALITY.util.Dom.addClass(this.close,"secure")}else{FONALITY.util.Dom.addClass(this.close,"nonsecure")}this.close.innerHTML="&nbsp;";this.innerElement.appendChild(this.close);FONALITY.util.Event.addListener(this.close,"click",C,this)}else{this.close.style.display="block"}}else{if(this.close){this.close.style.display="none"}}};FONALITY.widget.Panel.prototype.configDraggable=function(B,A,C){var D=A[0];if(D){if(this.header){FONALITY.util.Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}}else{if(this.dd){this.dd.unreg()}if(this.header){FONALITY.util.Dom.setStyle(this.header,"cursor","auto")}}};FONALITY.widget.Panel.prototype.configUnderlay=function(B,A,C){var D=A[0];switch(D.toLowerCase()){case"shadow":FONALITY.util.Dom.removeClass(this.element,"matte");FONALITY.util.Dom.addClass(this.element,"shadow");if(!this.underlay){this.underlay=document.createElement("DIV");this.underlay.className="underlay";this.underlay.innerHTML="&nbsp;";this.element.appendChild(this.underlay)}this.sizeUnderlay();break;case"matte":FONALITY.util.Dom.removeClass(this.element,"shadow");FONALITY.util.Dom.addClass(this.element,"matte");break;default:FONALITY.util.Dom.removeClass(this.element,"shadow");FONALITY.util.Dom.removeClass(this.element,"matte");break}};FONALITY.widget.Panel.prototype.configModal=function(B,A,D){var C=A[0];if(C){this.buildMask();if(!FONALITY.util.Config.alreadySubscribed(this.showEvent,this.showMask,this)){this.showEvent.subscribe(this.showMask,this,true)}if(!FONALITY.util.Config.alreadySubscribed(this.hideEvent,this.hideMask,this)){this.hideEvent.subscribe(this.hideMask,this,true)}if(!FONALITY.util.Config.alreadySubscribed(FONALITY.widget.Overlay.windowResizeEvent,this.sizeMask,this)){FONALITY.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true)}if(!FONALITY.util.Config.alreadySubscribed(this.destroyEvent,this.removeMask,this)){this.destroyEvent.subscribe(this.removeMask,this,true)}}else{this.beforeShowEvent.unsubscribe(this.showMask,this);this.hideEvent.unsubscribe(this.hideMask,this);FONALITY.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.destroyEvent.unsubscribe(this.removeMask,this)}};FONALITY.widget.Panel.prototype.removeMask=function(){if(this.mask){if(this.mask.parentNode){this.mask.parentNode.removeChild(this.mask)}this.mask=null}};FONALITY.widget.Panel.prototype.configKeyListeners=function(D,A,F){var C=A[0];if(C){if(C instanceof Array){for(var B=0;B<C.length;B++){var E=C[B];if(!FONALITY.util.Config.alreadySubscribed(this.showEvent,E.enable,E)){this.showEvent.subscribe(E.enable,E,true)}if(!FONALITY.util.Config.alreadySubscribed(this.hideEvent,E.disable,E)){this.hideEvent.subscribe(E.disable,E,true);this.destroyEvent.subscribe(E.disable,E,true)}}}else{if(!FONALITY.util.Config.alreadySubscribed(this.showEvent,C.enable,C)){this.showEvent.subscribe(C.enable,C,true)}if(!FONALITY.util.Config.alreadySubscribed(this.hideEvent,C.disable,C)){this.hideEvent.subscribe(C.disable,C,true);this.destroyEvent.subscribe(C.disable,C,true)}}}};FONALITY.widget.Panel.prototype.buildWrapper=function(C){var G=this.element.parentNode;var A=this.element.cloneNode(true);this.innerElement=A;this.innerElement.style.visibility="inherit";if(C=="wait"){FONALITY.util.Dom.addClass(this.innerElement,FONALITY.widget.Panel.CSS_PANEL2)}else{FONALITY.util.Dom.addClass(this.innerElement,FONALITY.widget.Panel.CSS_PANEL)}var F=document.createElement("DIV");if(C=="wait"){F.className=FONALITY.widget.Panel.CSS_PANEL2_CONTAINER}else{F.className=FONALITY.widget.Panel.CSS_PANEL_CONTAINER}F.id=A.id+"_c";F.appendChild(A);if(G){G.replaceChild(F,this.element)}this.element=F;var D=this.innerElement.childNodes;if(D){for(var B=0;B<D.length;B++){var E=D[B];switch(E.className){case FONALITY.widget.Module.CSS_HEADER:this.header=E;break;case FONALITY.widget.Module.CSS_BODY:this.body=E;break;case FONALITY.widget.Module.CSS_FOOTER:this.footer=E;break}}}this.initDefaultConfig()};FONALITY.widget.Panel.prototype.sizeUnderlay=function(){if(this.underlay&&this.browser!="gecko"&&this.browser!="safari"){this.underlay.style.width=this.innerElement.offsetWidth+"px";this.underlay.style.height=this.innerElement.offsetHeight+"px"}};FONALITY.widget.Panel.prototype.onDomResize=function(C,B){FONALITY.widget.Panel.superclass.onDomResize.call(this,C,B);var A=this;setTimeout(function(){A.sizeUnderlay()},0)};FONALITY.widget.Panel.prototype.registerDragDrop=function(){if(this.header){this.dd=new FONALITY.util.DD(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h"}var A=this;this.dd.startDrag=function(){if(A.browser=="ie"){FONALITY.util.Dom.addClass(A.element,"drag")}if(A.cfg.getProperty("constraintoviewport")){var C=A.element.offsetHeight;var G=A.element.offsetWidth;var H=FONALITY.util.Dom.getViewportWidth();var E=FONALITY.util.Dom.getViewportHeight();var K=window.scrollX||document.documentElement.scrollLeft;var I=window.scrollY||document.documentElement.scrollTop;var D=I+10;var F=K+10;var B=I+E-C-10;var J=K+H-G-10;this.minX=F;this.maxX=J;this.constrainX=true;this.minY=D;this.maxY=B;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}A.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){A.syncPosition();A.cfg.refireEvent("iframe");if(this.platform=="mac"&&this.browser=="gecko"){this.showMacGeckoScrollbars()}A.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(A.browser=="ie"){FONALITY.util.Dom.removeClass(A.element,"drag")}A.dragEvent.fire("endDrag",arguments)};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}};FONALITY.widget.Panel.prototype.buildMask=function(){if(!this.mask){this.mask=document.createElement("DIV");this.mask.id=this.id+"_mask";this.mask.className="mask";this.mask.innerHTML="&nbsp;";var B=function(D,C){FONALITY.util.Event.stopEvent(D)};var A=document.body.firstChild;if(A){document.body.insertBefore(this.mask,document.body.firstChild)}else{document.body.appendChild(this.mask)}}};FONALITY.widget.Panel.prototype.hideMask=function(){if(this.id=="wait"){return }if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();FONALITY.util.Dom.removeClass(document.body,"masked")}};FONALITY.widget.Panel.prototype.showMask=function(){if(this.id=="wait"){return }if(this.cfg.getProperty("modal")&&this.mask){FONALITY.util.Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}};FONALITY.widget.Panel.prototype.sizeMask=function(){if(this.mask){this.mask.style.height=FONALITY.util.Dom.getDocumentHeight()+"px";this.mask.style.width=FONALITY.util.Dom.getDocumentWidth()+"px"}};FONALITY.widget.Panel.prototype.configHeight=function(D,B,E){var A=B[0];var C=this.innerElement;FONALITY.util.Dom.setStyle(C,"height",A);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe")};FONALITY.widget.Panel.prototype.configWidth=function(D,A,E){var C=A[0];var B=this.innerElement;FONALITY.util.Dom.setStyle(B,"width",C);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe")};FONALITY.widget.Panel.prototype.render=function(A){return FONALITY.widget.Panel.superclass.render.call(this,A,this.innerElement)};FONALITY.widget.Panel.prototype.toString=function(){return"Panel "+this.id};FONALITY.widget.Dialog=function(B,A){FONALITY.widget.Dialog.superclass.constructor.call(this,B,A)};FONALITY.extend(FONALITY.widget.Dialog,FONALITY.widget.Panel);FONALITY.widget.Dialog.CSS_DIALOG="dialog";FONALITY.widget.Dialog.prototype.beforeSubmitEvent=null;FONALITY.widget.Dialog.prototype.submitEvent=null;FONALITY.widget.Dialog.prototype.manualSubmitEvent=null;FONALITY.widget.Dialog.prototype.asyncSubmitEvent=null;FONALITY.widget.Dialog.prototype.formSubmitEvent=null;FONALITY.widget.Dialog.prototype.cancelEvent=null;FONALITY.widget.Dialog.prototype.initDefaultConfig=function(){FONALITY.widget.Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.doSubmit=function(){var B=this.cfg.getProperty("postmethod");switch(B){case"async":FONALITY.util.Connect.setForm(this.form);var A=FONALITY.util.Connect.asyncRequest("POST",this.form.action,this.callback);this.asyncSubmitEvent.fire();break;case"form":this.form.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}};this.cfg.addProperty("postmethod",{value:"async",validator:function(A){if(A!="form"&&A!="async"&&A!="none"&&A!="manual"){return false}else{return true}}});this.cfg.addProperty("buttons",{value:"none",handler:this.configButtons})};FONALITY.widget.Dialog.prototype.initEvents=function(){FONALITY.widget.Dialog.superclass.initEvents.call(this);this.beforeSubmitEvent=new FONALITY.util.CustomEvent("beforeSubmit");this.submitEvent=new FONALITY.util.CustomEvent("submit");this.manualSubmitEvent=new FONALITY.util.CustomEvent("manualSubmit");this.asyncSubmitEvent=new FONALITY.util.CustomEvent("asyncSubmit");this.formSubmitEvent=new FONALITY.util.CustomEvent("formSubmit");this.cancelEvent=new FONALITY.util.CustomEvent("cancel")};FONALITY.widget.Dialog.prototype.init=function(B,A){FONALITY.widget.Dialog.superclass.init.call(this,B);this.beforeInitEvent.fire(FONALITY.widget.Dialog);FONALITY.util.Dom.addClass(this.element,FONALITY.widget.Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(A){this.cfg.applyConfig(A,true)}this.renderEvent.subscribe(this.registerForm,this,true);this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.beforeRenderEvent.subscribe(function(){var C=this.cfg.getProperty("buttons");if(C&&C!="none"){if(!this.footer){this.setFooter("")}}},this,true);this.initEvent.fire(FONALITY.widget.Dialog)};FONALITY.widget.Dialog.prototype.registerForm=function(){var D=this.element.getElementsByTagName("FORM")[0];if(!D){var A='<form name="frm_'+this.id+'" action=""></form>';this.body.innerHTML+=A;D=this.element.getElementsByTagName("FORM")[0]}this.firstFormElement=function(){for(var G=0;G<D.elements.length;G++){var F=D.elements[G];if(F.focus){if(F.type&&F.type!="hidden"){return F}}}return null}();this.lastFormElement=function(){for(var G=D.elements.length-1;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<E.length;A++){var C=E[A];var F=document.createElement("BUTTON");F.setAttribute("type","button");if(C.isDefault){F.className="default";this.defaultHtmlButton=F}F.appendChild(document.createTextNode(C.text));FONALITY.util.Event.addListener(F,"click",C.handler,this,true);this.buttonSpan.appendChild(F);C.htmlButton=F;if(A===0){this.firstButton=C.htmlButton}if(A==(E.length-1)){this.lastButton=C.htmlButton}}if(document.getElementById("supportal_body")){document.getElementById("supportal_body").appendChild(this.buttonSpan)}else{this.setFooter(this.buttonSpan)}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay")}else{if(this.buttonSpan){if(this.buttonSpan.parentNode){this.buttonSpan.parentNode.removeChild(this.buttonSpan)}this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}};FONALITY.widget.Dialog.prototype.configOnSuccess=function(B,A,C){};FONALITY.widget.Dialog.prototype.configOnFailure=function(B,A,C){};FONALITY.widget.Dialog.prototype.doSubmit=function(){};FONALITY.widget.Dialog.prototype.focusFirst=function(B,A,D){if(A){var C=A[1];if(C){FONALITY.util.Event.stopEvent(C)}}if(this.firstFormElement){this.firstFormElement.focus()}else{this.focusDefaultButton()}};FONALITY.widget.Dialog.prototype.focusLast=function(B,A,E){if(A){var D=A[1];if(D){FONALITY.util.Event.stopEvent(D)}}var C=this.cfg.getProperty("buttons");if(C&&C instanceof Array){this.focusLastButton()}else{if(this.lastFormElement){this.lastFormElement.focus()}}};FONALITY.widget.Dialog.prototype.focusDefaultButton=function(){if(this.defaultHtmlButton){this.defaultHtmlButton.focus()}};FONALITY.widget.Dialog.prototype.blurButtons=function(){var B=this.cfg.getProperty("buttons");if(B&&B instanceof Array){var A=B[0].htmlButton;if(A){A.blur()}}};FONALITY.widget.Dialog.prototype.focusFirstButton=function(){var B=this.cfg.getProperty("buttons");if(B&&B instanceof Array){var A=B[0].htmlButton;if(A){A.focus()}}};FONALITY.widget.Dialog.prototype.focusLastButton=function(){var B=this.cfg.getProperty("buttons");if(B&&B instanceof Array){var A=B[B.length-1].htmlButton;if(A){A.focus()}}};FONALITY.widget.Dialog.prototype.validate=function(){return true};FONALITY.widget.Dialog.prototype.submit=function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true}else{return false}};FONALITY.widget.Dialog.prototype.cancel=function(){this.cancelEvent.fire();this.hide()};FONALITY.widget.Dialog.prototype.getData=function(){var C=this.form;var G={};if(C){for(var H in this.form){var L=C[H];if(L){if(L.tagName){switch(L.tagName){case"INPUT":switch(L.type){case"checkbox":G[H]=L.checked;break;case"textbox":case"text":case"hidden":G[H]=L.value;break}break;case"TEXTAREA":G[H]=L.value;break;case"SELECT":var F=[];for(var M=0;M<L.options.length;M++){var I=L.options[M];if(I.selected){var J=I.value;if(!J||J===""){J=I.text}F[F.length]=J}}G[H]=F;break}}else{if(L[0]&&L[0].tagName){switch(L[0].tagName){case"INPUT":switch(L[0].type){case"radio":for(var A=0;A<L.length;A++){var D=L[A];if(D.checked){G[D.name]=D.value;break}}break;case"checkbox":var E=[];for(var K=0;K<L.length;K++){var B=L[K];if(B.checked){E[E.length]=B.value}}G[L[0].name]=E;break}}}}}}}return G};FONALITY.widget.Dialog.prototype.toString=function(){return"Dialog "+this.id};FONALITY.widget.SimpleDialog=function(B,A){FONALITY.widget.SimpleDialog.superclass.constructor.call(this,B,A)};FONALITY.extend(FONALITY.widget.SimpleDialog,FONALITY.widget.Dialog);FONALITY.widget.SimpleDialog.ICON_BLOCK="nt/ic/ut/bsc/blck16_1.gif";FONALITY.widget.SimpleDialog.ICON_ALARM="nt/ic/ut/bsc/alrt16_1.gif";FONALITY.widget.SimpleDialog.ICON_HELP="nt/ic/ut/bsc/hlp16_1.gif";FONALITY.widget.SimpleDialog.ICON_INFO="nt/ic/ut/bsc/info16_1.gif";FONALITY.widget.SimpleDialog.ICON_WARN="nt/ic/ut/bsc/warn16_1.gif";FONALITY.widget.SimpleDialog.ICON_TIP="nt/ic/ut/bsc/tip16_1.gif";FONALITY.widget.SimpleDialog.CSS_SIMPLEDIALOG="simple-dialog";FONALITY.widget.SimpleDialog.prototype.initDefaultConfig=function(){FONALITY.widget.SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty("icon",{value:"none",handler:this.configIcon,suppressEvent:true});this.cfg.addProperty("text",{value:"",handler:this.configText,suppressEvent:true,supercedes:["icon"]})};FONALITY.widget.SimpleDialog.prototype.init=function(B,A){FONALITY.widget.SimpleDialog.superclass.init.call(this,B);this.beforeInitEvent.fire(FONALITY.widget.SimpleDialog);FONALITY.util.Dom.addClass(this.element,FONALITY.widget.SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(A){this.cfg.applyConfig(A,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(FONALITY.widget.SimpleDialog)};FONALITY.widget.SimpleDialog.prototype.registerForm=function(){FONALITY.widget.SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'};FONALITY.widget.SimpleDialog.prototype.configIcon=function(C,A,E){var B=A[0];if(B&&B!="none"){var D='<img src="'+this.imageRoot+B+'" class="icon" />';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<B){FONALITY.util.Dom.setStyle(L.overlay.element,"visibility","visible")}L.overlay.cfg.setProperty("xy",[I,H],true);L.overlay.cfg.refireEvent("iframe")};A.handleCompleteAnimateIn=function(I,H,J){J.overlay.cfg.setProperty("xy",[B,G],true);J.startX=B;J.startY=G;J.overlay.cfg.refireEvent("iframe");J.animateInCompleteEvent.fire()};A.handleStartAnimateOut=function(K,J,L){var M=FONALITY.util.Dom.getViewportWidth();var O=FONALITY.util.Dom.getXY(L.overlay.element);var I=O[0];var N=O[1];var H=L.animOut.attributes.points.to;L.animOut.attributes.points.to=[(M+25),N]};A.handleTweenAnimateOut=function(J,I,K){var M=FONALITY.util.Dom.getXY(K.overlay.element);var H=M[0];var L=M[1];K.overlay.cfg.setProperty("xy",[H,L],true);K.overlay.cfg.refireEvent("iframe")};A.handleCompleteAnimateOut=function(J,H,K){FONALITY.util.Dom.setStyle(K.overlay.element,"visibility","hidden");var I=K.overlay.element.offsetWidth;K.overlay.cfg.setProperty("xy",[B,G]);K.animateOutCompleteEvent.fire()};A.init();return A};var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\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<arguments.length;B++){var A=arguments[B];try{C=A();break}catch(D){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/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;C++){var E=D[C];B+=E.charAt(0).toUpperCase()+E.substring(1)}return B},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(D){try{B(D,A++)}catch(E){if(E!=$continue){throw E}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(B){var A=true;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push(B(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.collect(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D>=(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 C<B?-1:C>B?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"#<Enumerable:"+this.toArray().inspect()+">"}};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<C.length;A++){B.push(C[A])}return B}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(A){for(var B=0;B<this.length;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(A){for(key in this){var B=this[key];if(typeof B=="function"){continue}var C=[key,B];C.key=key;C.value=B;A(C)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject($H(this),function(B,C){B[C.key]=C.value;return B})},toQueryString:function(){return this.map(function(A){return A.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"}};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<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax2={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax2.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(E[D]&&typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax2.Responders,Enumerable);Ajax2.Responders.register({onCreate:function(){Ajax2.activeRequestCount++},onComplete:function(){Ajax2.activeRequestCount--}});Ajax2.Base=function(){};Ajax2.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,A||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=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<B.length;A+=2){this.transport.setRequestHeader(B[A],B[A+1])}},onStateChange:function(){var A=this.transport.readyState;if(A!=1){this.respondToReadyState(this.transport.readyState)}},header:function(A){try{return this.transport.getResponseHeader(A)}catch(B){}},evalJSON:function(){try{return eval(this.header("X-JSON"))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(A){var C=Ajax2.Request.Events[A];var E=this.transport,B=this.evalJSON();if(C=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(E,B)}catch(D){this.dispatchException(D)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(E,B);Ajax2.Responders.dispatch("on"+C,this,E,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax2.Responders.dispatch("onException",this,A)}});Ajax2.Updater=Class.create();Object.extend(Object.extend(Ajax2.Updater.prototype,Ajax2.Request.prototype),{initialize:function(A,C,B){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax2.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.responseIsSuccess()?this.containers.success:this.containers.failure;var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B){if(this.options.insertion){new this.options.insertion(B,A)}else{Element.update(B,A)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax2.PeriodicalUpdater=Class.create();Ajax2.PeriodicalUpdater.prototype=Object.extend(new Ajax2.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax2.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(C,A){var B=($(A)||document.body).getElementsByTagName("*");return $A(B).inject([],function(D,E){if(E.className.match(new RegExp("(^|\\s)"+C+"(\\s|$)"))){D.push(E)}return D})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(A){return $(A).style.display!="none"},toggle:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);Element[Element.visible(A)?"hide":"show"](A)}},hide:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display="none"}},show:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display=""}},remove:function(A){A=$(A);A.parentNode.removeChild(A)},update:function(B,A){$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10)},getHeight:function(A){A=$(A);return A.offsetHeight},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).include(B)},addClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).add(B)},removeClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).remove(B)},cleanWhitespace:function(B){B=$(B);for(var A=0;A<B.childNodes.length;A++){var C=B.childNodes[A];if(C.nodeType==3&&!/\S/.test(C.nodeValue)){Element.remove(C)}}},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},scrollTo:function(B){B=$(B);var A=B.x?B.x:B.offsetLeft,C=B.y?B.y:B.offsetTop;window.scrollTo(A,C)},getStyle:function(B,C){B=$(B);var D=B.style[C.camelize()];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A.getPropertyValue(C):null}else{if(B.currentStyle){D=B.currentStyle[C.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(C)){if(Element.getStyle(B,"position")=="static"){D="auto"}}return D=="auto"?null:D},setStyle:function(A,B){A=$(A);for(name in B){A.style[name.camelize()]=B[name]}},getDimensions:function(B){B=$(B);if(Element.getStyle(B,"display")!="none"){return{width:B.offsetWidth,height:B.offsetHeight}}var A=B.style;var E=A.visibility;var C=A.position;A.visibility="hidden";A.position="absolute";A.display="";var F=B.clientWidth;var D=B.clientHeight;A.display="none";A.position=C;A.visibility=E;return{width:F,height:D}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}},makeClipping:function(A){A=$(A);if(A._overflow){return }A._overflow=A.style.overflow;if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}},undoClipping:function(A){A=$(A);if(A._overflow){return }A.style.overflow=A._overflow;A._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(A,B){this.element=$(A);this.content=B.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(C){if(this.element.tagName.toLowerCase()=="tbody"){this.insertContent(this.contentFromAnonymousTable())}else{throw C}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){B.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";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<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var Form={serialize:function(D){var E=Form.getElements($(D));var C=new Array();for(var B=0;B<E.length;B++){var A=Form.Element.serialize(E[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(B){B=$(B);var C=new Array();for(tagName in Form.Element.Serializers){var D=B.getElementsByTagName(tagName);for(var A=0;A<D.length;A++){C.push(D[A])}}return C},getInputs:function(F,C,D){F=$(F);var A=F.getElementsByTagName("input");if(!C&&!D){return A}var G=new Array();for(var E=0;E<A.length;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}G.push(B)}return G},disable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.blur();A.disabled="true"}},enable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.disabled=""}},findFirstElement:function(A){return Form.getElements(A).find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){Field.activate(Form.findFirstElement(A))},reset:function(A){$(A).reset()}};Form.Element={serialize:function(B){B=$(B);var D=B.tagName.toLowerCase();var C=Form.Element.Serializers[D](B);if(C){var A=encodeURIComponent(C[0]);if(A.length==0){return }if(C[1].constructor!=Array){C[1]=[C[1]]}return C[1].map(function(E){return A+"="+encodeURIComponent(E)}).join("&")}},getValue:function(A){A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return B[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(C){var D="",B,A=C.selectedIndex;if(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<C.length;B++){var A=C.options[B];if(A.selected){var E=A.value;if(!E&&!("value" in A)){E=A.text}D.push(E)}}return[C.name,D]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(A,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent;if(B){p=Element.getStyle(B,"position");if(p=="relative"||p=="absolute"){break}}}while(B);return[C,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},clone:function(B,C){B=$(B);C=$(C);C.style.position="absolute";var A=this.cumulativeOffset(B);C.style.top=A[1]+"px";C.style.left=A[0]+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{A-=B.scrollTop||0;C-=B.scrollLeft||0}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var F=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}RegExp.escape=function(B){if(!arguments.callee.sRE){var A=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+A.join("|\\")+")","g")}return B.replace(arguments.callee.sRE,"\\$1")};var BComplete=Class.create();BComplete.prototype={MAX_VISIBLE:8,TIMER_TICK:10,CANCEL_SUBMISSION_TIMEOUT:10,initialize:function(E,B){if(B){this.MAX_VISIBLE=B}this.data=new Array();this.element=$(E);if(!this.element){throw ("BComplete: The specified <input> 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.MAX_VISIBLE;D++){var G=document.createElement("div");this.listItems[D]=G;G.className="item";this.popup.appendChild(G);G.autocomplete=this;G.number=D;G.onclick=this.onItemClick;G.onmouseover=this.onItemOn;G.onmouseout=this.onItemOff}this.downButton=document.createElement("div");this.downButton.className="down-button";this.popup.appendChild(this.downButton);Event.observe(this.element,"keypress",this.onKeyPress.bindAsEventListener(this));Event.observe(this.element,"keydown",this.onKeyDown.bindAsEventListener(this));Event.observe(this.upButton,"click",this.onUpButton.bindAsEventListener(this));Event.observe(this.downButton,"click",this.onDownButton.bindAsEventListener(this));Event.observe(document,"click",this.onWindowClick.bindAsEventListener(this));this.onTick=this.onTick.bind(this);this.onSubmit=this.onSubmit.bind(this);var A=this.element.parentNode;while(A){if(A.tagName.toLowerCase()=="form"){break}A=A.parentNode}var F=this;if(A){var C=A.onsubmit;A.onsubmit=function(){if(C){return(C()&&F.onSubmit())}else{return F.onSubmit()}}}},addItem:function(A){this.data[this.data.length]=A;this.data.sort()},setData:function(A){this.data=A;A.sort()},loadData:function(url){var me=this;var success=function(request){try{var data=eval(request.responseText);if(typeof data=="object"){me.setData(data)}}catch(exception){throw ("BComplete: Invalid data format.")}};var request=new Ajax2.Request(url,{method:"get",onSuccess:success})},findMatches:function(F){var E=new Array();var A=F.split(" ");for(var D=0;D<this.data.length;D++){var C=1;for(var B=0;B<A.length;B++){if(this.data[D].toLowerCase().indexOf(A[B].toLowerCase())==-1){C=0;break}}if(C){E[E.length]=this.data[D]}}return E},temporarilyDisableSubmission:function(){this.cancelSubmit=true;var B=this;var A=function(){B.cancelSubmit=false};setTimeout(A,this.CANCEL_SUBMISSION_TIMEOUT)},onWindowClick:function(C){if(this.ignoreClick){this.ignoreClick=1;return }var A=Event.element(C);var B=A;while(B){if(B==this.element||B==this.popup||B==this.showAllButton){return }B=B.parentNode}this.hide()},onUpButton:function(A){this.selectedIndex=-1;this.scroll--;if(this.scroll<0){this.scroll=0}this.show();Event.stop(A);this.element.focus()},onDownButton:function(A){this.selectedIndex=-1;this.scroll++;if(this.scroll>(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.scroll){this.selectedIndex=this.scroll}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.scroll){this.selectedIndex=this.scroll}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;A<this.autocomplete.MAX_VISIBLE;A++){Element.removeClassName(this.autocomplete.listItems[A],"selected")}Element.addClassName(this,"selected");this.autocomplete.selectedIndex=this.number},onItemOff:function(){Element.removeClassName(this,"selected");this.autocomplete.selectedIndex=-1},onItemClick:function(){this.autocomplete.selectedIndex=this.number;this.autocomplete.select()},show:function(){if(this.matches.length<=0){return }var D=this.element.value;if(this.scroll>0){Element.removeClassName(this.upButton,"disabled")}else{Element.addClassName(this.upButton,"disabled")}if((this.scroll+this.MAX_VISIBLE)<this.matches.length){Element.removeClassName(this.downButton,"disabled")}else{Element.addClassName(this.downButton,"disabled")}for(var C=0;C<this.MAX_VISIBLE;C++){if(this.matches[C+this.scroll]){var E=this.matches[C+this.scroll];var A=D.split(" ");for(var B=0;B<A.length;B++){if(A[B].length&&A[B].toLowerCase()!="b"){E=E.replace(new RegExp("("+RegExp.escape(A[B])+")","i"),"<b>$1</b>")}}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('<img src="images/waiting.gif"/>');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<document.dlgForm.symptom_cat.length;B++){if(document.dlgForm.symptom_cat[B].text==A[0]){document.dlgForm.symptom_cat.selectedIndex=B;symptomPopulate(document.dlgForm);break}}for(var B=0;B<document.dlgForm.symptom.length;B++){if(document.dlgForm.symptom[B].text==A[1]){document.dlgForm.symptom.selectedIndex=B;break}}}function symptomChoose(A){if(A.symptom[A.symptom.selectedIndex].text=="--"){complete.onKeyPress(0)}else{A.symptomSearch.value=A.symptom_cat[A.symptom_cat.selectedIndex].text+" -- "+A.symptom[A.symptom.selectedIndex].text}}function symptomPopulate(H){var E=H.symptom_cat;var B=E.options[E.selectedIndex].value;if(!B){return }var F=symptoms[B];var G=H.symptom;G.options.length=0;for(var C=0;C<F.length;C++){var I=F[C][1];var A=I;var D=I.indexOf(" -P");if(D>=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()};