var Drag={obj:null,init:function(D,H,F,B,E,A,I,G,J,C){D.onmousedown=Drag.start;D.hmode=I?false:true;D.vmode=G?false:true;D.root=H&&H!=null?H:D;if(D.hmode&&isNaN(parseInt(D.root.style.left))){D.root.style.left="0px";}if(D.vmode&&isNaN(parseInt(D.root.style.top))){D.root.style.top="0px";}if(!D.hmode&&isNaN(parseInt(D.root.style.right))){D.root.style.right="0px";}if(!D.vmode&&isNaN(parseInt(D.root.style.bottom))){D.root.style.bottom="0px";}D.minX=typeof F!="undefined"?F:null;D.minY=typeof E!="undefined"?E:null;D.maxX=typeof B!="undefined"?B:null;D.maxY=typeof A!="undefined"?A:null;D.xMapper=J?J:null;D.yMapper=C?C:null;D.root.onDragStart=new Function();D.root.onDragEnd=new Function();D.root.onDrag=new Function();},start:function(B){var C=Drag.obj=this;B=Drag.fixE(B);var D=parseInt(C.vmode?C.root.style.top:C.root.style.bottom);var A=parseInt(C.hmode?C.root.style.left:C.root.style.right);C.root.onDragStart(A,D);C.lastMouseX=B.clientX;C.lastMouseY=B.clientY;if(C.hmode){if(C.minX!=null){C.minMouseX=B.clientX-A+C.minX;}if(C.maxX!=null){C.maxMouseX=C.minMouseX+C.maxX-C.minX;}}else{if(C.minX!=null){C.maxMouseX=-C.minX+B.clientX+A;}if(C.maxX!=null){C.minMouseX=-C.maxX+B.clientX+A;}}if(C.vmode){if(C.minY!=null){C.minMouseY=B.clientY-D+C.minY;}if(C.maxY!=null){C.maxMouseY=C.minMouseY+C.maxY-C.minY;}}else{if(C.minY!=null){C.maxMouseY=-C.minY+B.clientY+D;}if(C.maxY!=null){C.minMouseY=-C.maxY+B.clientY+D;}}document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(E){E=Drag.fixE(E);var F=Drag.obj;var C=E.clientY;var D=E.clientX;var H=parseInt(F.vmode?F.root.style.top:F.root.style.bottom);var B=parseInt(F.hmode?F.root.style.left:F.root.style.right);var A,G;if(F.minX!=null){D=F.hmode?Math.max(D,F.minMouseX):Math.min(D,F.maxMouseX);}if(F.maxX!=null){D=F.hmode?Math.min(D,F.maxMouseX):Math.max(D,F.minMouseX);}if(F.minY!=null){C=F.vmode?Math.max(C,F.minMouseY):Math.min(C,F.maxMouseY);}if(F.maxY!=null){C=F.vmode?Math.min(C,F.maxMouseY):Math.max(C,F.minMouseY);}A=B+((D-F.lastMouseX)*(F.hmode?1:-1));G=H+((C-F.lastMouseY)*(F.vmode?1:-1));if(F.xMapper){A=F.xMapper(H);}else{if(F.yMapper){G=F.yMapper(B);}}Drag.obj.root.style[F.hmode?"left":"right"]=A+"px";Drag.obj.root.style[F.vmode?"top":"bottom"]=G+"px";Drag.obj.lastMouseX=D;Drag.obj.lastMouseY=C;Drag.obj.root.onDrag(A,G);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));Drag.obj=null;},fixE:function(A){if(typeof A=="undefined"){A=window.event;}if(typeof A.layerX=="undefined"){A.layerX=A.offsetX;}if(typeof A.layerY=="undefined"){A.layerY=A.offsetY;}return A;}};String.prototype.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"");};function jt_ShowHideElm(B,A){if(B){B.style.visibility=(A)?"visible":"hidden";}}function jt_ShowNoneElm(C,B,A){if(!A){A="";}if(C){C.style.display=(B)?A:"none";}}function jt_ShowHide(B,A){jt_ShowHideElm(document.getElementById(B),A);}function jt_ShowNone(C,B,A){jt_ShowNoneElm(document.getElementById(C),B,A);}function jt_AddListener(C,B,A){if(C.addEventListener){C.addEventListener(B,A,false);return true;}else{if(C.attachEvent){return C.attachEvent("on"+B,A);}else{return false;}}}function jt_fixE(A){var B=A?A:window.event;return B;}function jt_Point(A,B){this.x=A;this.y=B;}function jt_getOffsetXY(C,E){var D=C.offsetLeft;var B=C.offsetTop;var A=C.offsetParent;if(typeof E=="undefined"){E="!@#$%^&*()";}while((A!=null)&&(A.id!=E)){D+=A.offsetLeft;B+=A.offsetTop;A=A.offsetParent;}return new jt_Point(D,B);}function jt_moveTo(B,A,C){B.style.left=A+"px";B.style.top=C+"px";}function jt_getOffsetX(B){var C=B.offsetLeft;var A=B.offsetParent;while(A!=null){C+=A.offsetLeft;A=A.offsetParent;}return C;}function jt_getOffsetY(C){var B=C.offsetTop;var A=C.offsetParent;while(A!=null){B+=A.offsetTop;A=A.offsetParent;}return B;}function jt_windowOffsetX(){if(window.screenX){return window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;}else{return document.body.scrollLeft+window.screenLeft;}}function jt_windowOffsetY(){if(window.screenY){return window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}else{return document.body.scrollTop+window.screenTop;}}function jt_getChromeY(){return window.screenTop?window.screenTop:(window.outerHeight-window.innerHeight-24);}function jt_setRadio(A,C){for(var B=0;B<A.length;B++){if(A[B].value==C){if(!A[B].disabled){A[B].checked=true;return true;}}}return false;}function jt_getRadio(A){var B="";for(var C=0;C<A.length;C++){if(A[C].checked){B=A[C].value;break;}}return B;}function foSelected(C){var A="";for(var B=0;B<C.options.length;B++){if(C.options[B].selected){if(C.options[B].value){A=C.options[B].value;}else{A=C.options[B].text;}break;}}return A;}function foPosInList(B,D){if(D!=""){for(var A=0;A<B.options.length;A++){var C=B.options[A].value;if(C==""){C=B.options[A].text;}if(C==D){return A;break;}}}return -1;}function foSetSelectVal(A,C){var B=foPosInList(A,C);if(B!=-1){A.options.selectedIndex=B;}}function jt_parseQuery(queryString){var qObj=new Object();var stQuery=(queryString)?queryString:location.search;if(stQuery.indexOf("?")==0){stQuery=stQuery.substring(1);}if(stQuery){var nvPairs=stQuery.split("&");for(var i=0;i<nvPairs.length;i++){var posEq=nvPairs[i].indexOf("=");if(posEq!=-1){eval("qObj."+nvPairs[i].substring(0,posEq)+"='"+nvPairs[i].substring(posEq+1)+"'");}}}return qObj;}function jt_safeHTML(A){if(A.length==0){return"";}A=A.replace(/</gi,"&lt;");A=A.replace(/>/gi,"&gt;");A=A.replace(/\"/gi,"&quot;");A=A.replace(/\'/gi,"&#39;");A=A.replace(/\\/gi,"&#92;");return A;}function jt_unsafeHTML(A){if(A.length==0){return"";}A=A.replace(/&lt;/gi,"<");A=A.replace(/&gt;/gi,">");A=A.replace(/&quot;/gi,'"');A=A.replace(/&#39;/gi,"'");A=A.replace(/&#92;/gi,"\\");return A;}function jt_plural(C,B){var A=(C==1)?"":"s";if(B){A=C+" "+B+A;}return A;}function objToString(C,B){if(!B){B=" ][ ";}var A="";for(var D in C){if((D.charAt(0)=="$")||((typeof C[D])=="function")){continue;}if(A!=""){A+=B;}A+=D+":"+C[D];}return A;}function jt_alignCorner(G,A,E,C,F){C=C?C:0;F=F?F:0;var H=jt_getOffsetXY(A);var B=(E.indexOf("R")!=-1)?G.offsetWidth-A.offsetWidth:0;var D=(E.indexOf("B")!=-1)?G.offsetHeight:0;jt_moveTo(G,H.x-B+C,H.y-D+F);}function jt_boxOverlap(C,B,M){var F=jt_getOffsetXY(C);var E=jt_getOffsetXY(B);var G=F.x;var P=F.y;var S=F.x+C.offsetWidth;var L=F.y+C.offsetHeight;var K=E.x;var R=E.y;var D=E.x+B.offsetWidth;var O=E.y+B.offsetHeight;if(M!="Y"){if(S<K){return -1;}if(D<G){return -1;}}if(M!="X"){if(L<R){return -1;}if(O<P){return -1;}}var N;var A;var I;var Q;if(G<K){N=K;I=S;}else{N=G;I=D;}if(P<R){A=R;Q=L;}else{A=P;Q=O;}var J=I-N;var H=Q-A;if(M=="X"){return J;}else{if(M=="Y"){return H;}else{return J*H;}}}function jt_currStyle(B){var A=B.style;if(window.getComputedStyle){A=window.getComputedStyle(B,null);}else{if(B.currentStyle){A=B.currentStyle;}}return A;}function jt_divOnScrn(A){var C=jt_getOffsetXY(A);var D=C.x;var B=C.y;if(C.x+A.offsetWidth-document.body.scrollLeft>document.body.clientWidth){D=document.body.scrollLeft+document.body.clientWidth-A.offsetWidth;}if(C.x<document.body.scrollLeft){D=document.body.scrollLeft;}if((D!=C.x)||(B!=C.y)){jt_moveTo(A,D,B);}}jt_DialogBox=function(I){if(arguments.length==0){return ;}this.isModal=I;if(I){jt_DialogBox.veilInit();}this.container=document.createElement("div");this.container.className=jt_DialogBox.className;this.container.dialogBox=this;var A=document.createElement("table");A.setAttribute("cellSpacing","0");A.setAttribute("cellPadding","0");A.setAttribute("border","0");var C=document.createElement("tbody");var G=document.createElement("tr");var E=document.createElement("td");var H=document.createElement("table");H.setAttribute("cellSpacing","0");H.setAttribute("cellPadding","0");H.setAttribute("border","0");H.setAttribute("width","100%");var J=document.createElement("tbody");var D=document.createElement("tr");this.titleCell=document.createElement("td");this.titleCell.className="portlet-title-admin";this.titleCell.style.cursor="move";D.appendChild(this.titleCell);cellT=document.createElement("td");cellT.className="portlet-title-admin";cellT.style.padding="0px";cellT.style.textAlign="right";cellT.style.width="16px";jt_DialogBox.initCloseIcon();var B=document.createElement("img");B.src=jt_DialogBox.closeIcon.src;B.setAttribute("border","0");B.dialogBox=this;var F=document.createElement("A");F.setAttribute("href","#");F.appendChild(B);F.onclick=jt_DialogBox.closeBox;cellT.appendChild(F);D.appendChild(cellT);J.appendChild(D);H.appendChild(J);E.appendChild(H);G.appendChild(E);C.appendChild(G);G=document.createElement("tr");E=document.createElement("td");E.className="MainPanel";this.contentArea=document.createElement("div");this.contentArea.className="ContentArea";E.appendChild(this.contentArea);G.appendChild(E);C.appendChild(G);A.appendChild(C);this.container.appendChild(A);document.body.appendChild(this.container);Drag.init(this.titleCell,this.container,0,null,0);};jt_DialogBox.imagePath="../images/";jt_DialogBox.prototype.show=function(){this.container.style.display="block";this.topZ();jt_divOnScrn(this.container);if(this.isModal){jt_DialogBox.veilShow(true);}};jt_DialogBox.prototype.hide=function(A){this.container.style.display="none";if(this.isModal){jt_DialogBox.veilShow(false);}var B=this.listPos();if(B!=-1){jt_DialogBox.openList[B]=jt_DialogBox.openList[jt_DialogBox.openList.length-1];jt_DialogBox.openList.pop();}if(A){if(this.callOK){if(this.returnData){this.callOK(this.returnData);}else{this.callOK();}}}else{if(this.callCancel){this.callCancel();}}};jt_DialogBox.prototype.moveTo=function(A,B){if(A==-1){A=Math.round((document.body.clientWidth-this.container.offsetWidth)/2);}if(B==-1){B=Math.round((document.body.clientHeight-this.container.offsetHeight)/2)+document.documentElement.scrollTop;}this.container.style.left=A+"px";this.container.style.top=B+"px";};jt_DialogBox.prototype.setTitle=function(A){this.titleCell.innerHTML=A;};jt_DialogBox.prototype.setContent=function(A){this.contentArea.innerHTML=A;};jt_DialogBox.prototype.setWidth=function(A){this.contentArea.style.width=A+"px";};jt_DialogBox.prototype.setCallOK=function(A){this.callOK=A;};jt_DialogBox.prototype.setCallCancel=function(A){this.callCancel=A;};jt_DialogBox.prototype.getContentNode=function(){return this.contentArea;};jt_DialogBox.initCloseIcon=function(){if(jt_DialogBox.closeIcon==null){jt_DialogBox.closeIcon=new Image();jt_DialogBox.closeIcon.src=IMAGE_PATH+"/site/content/images/document/archived.gif";}};jt_DialogBox.veilInit=function(){if(jt_DialogBox.veilOverlay==null){jt_DialogBox.veilOverlay=document.createElement("div");jt_DialogBox.veilOverlay.className="jtDialogBoxVeil";jt_DialogBox.veilOverlay.style.zIndex=jt_DialogBox.veilZ;jt_DialogBox.veilOverlay.innerHTML="&nbsp;";document.body.appendChild(jt_DialogBox.veilOverlay);jt_DialogBox.addListener(window,"resize",jt_DialogBox.veilSetWidth);}};jt_DialogBox.veilShow=function(A){jt_DialogBox.veilSetWidth();jt_DialogBox.veilOverlay.style.display=A?"block":"none";};jt_DialogBox.className="jtDialogBox";jt_DialogBox.closeIcon=null;jt_DialogBox.veilOverlay=null;jt_DialogBox.veilZ=10000;jt_DialogBox.openList=new Array();jt_DialogBox.maxDepth=5;jt_DialogBox.closeBox=function(C){if(!C){C=window.event;}var B=C.target?C.target:C.srcElement;var A=0;while((B!=null)&&(A<jt_DialogBox.maxDepth)){if(B.dialogBox){B.dialogBox.hide();return false;}B=B.parentNode;A++;}return false;};jt_DialogBox.prototype.listPos=function(){var B=-1;for(var A=0;A<jt_DialogBox.openList.length;A++){if(jt_DialogBox.openList[A]==this){B=A;break;}}return B;};jt_DialogBox.prototype.topZ=function(){var C=this.listPos();if(C==-1){jt_DialogBox.openList[jt_DialogBox.openList.length]=this;}else{if(C<jt_DialogBox.openList.length-1){for(var A=C;A<jt_DialogBox.openList.length-1;A++){jt_DialogBox.openList[A]=jt_DialogBox.openList[A+1];}jt_DialogBox.openList[jt_DialogBox.openList.length-1]=this;var B=jt_DialogBox.veilZ;for(var A=jt_DialogBox.openList.length-1;A>0;A--){B--;jt_DialogBox.openList[A].style.zIndex=B;}}}this.container.style.zIndex=jt_DialogBox.veilZ+1;};jt_DialogBox.veilSetWidth=function(){var A=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight+document.body.offsetTop);jt_DialogBox.veilOverlay.style.width=document.documentElement.scrollWidth+"px";jt_DialogBox.veilOverlay.style.height=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)+document.documentElement.offsetTop+"px";};jt_DialogBox.addListener=function(C,B,A){if(C.addEventListener){C.addEventListener(B,A,false);return true;}else{if(C.attachEvent){return C.attachEvent("on"+B,A);}else{return false;}}};jt_AppAlert=function(C){if(arguments.length==0){return ;}this.base=jt_DialogBox;this.base(true);var E=document.createElement("table");E.setAttribute("cellSpacing","0");E.setAttribute("cellPadding","0");E.setAttribute("border","0");var B=document.createElement("tbody");var D=document.createElement("tr");var A=document.createElement("td");A.setAttribute("vAlign","top");this.iconImage=document.createElement("img");this.iconImage.style.margin="0px 10px 0px 0px";this.setIcon(C);A.appendChild(this.iconImage);D.appendChild(A);this.contentCell=document.createElement("td");this.contentCell.className="ContentArea";D.appendChild(this.contentCell);B.appendChild(D);E.appendChild(B);this.contentArea.appendChild(E);this.buttonDIV=document.createElement("div");this.buttonDIV.setAttribute("align","center");this.buttonDIV.style.margin="10px 0px 0px 0px";this.contentArea.appendChild(this.buttonDIV);jt_AppAlert.addButton(this,jt_AppAlert.lblOK,1);};jt_AppAlert.prototype=new jt_DialogBox();jt_AppAlert.Warning="icons/warning.gif";jt_AppAlert.Error="icons/error.gif";jt_AppAlert.Info="icons/info.gif";jt_AppAlert.lblOK="OK";jt_AppAlert.lblCancel="Cancel";jt_AppAlert.prototype.setContent=function(A){this.contentCell.innerHTML=A;};jt_AppAlert.prototype.setIcon=function(A){this.iconImage.src=jt_DialogBox.imagePath+A;};jt_AppConfirm=function(A,C,B){if(arguments.length==0){return ;}this.base=jt_AppAlert;this.base(A);this.callOK=C;this.callCancel=B;jt_AppAlert.addButton(this,jt_AppAlert.lblCancel,2);};jt_AppConfirm.prototype=new jt_AppAlert();jt_AppConfirm.prototype.askUser=function(A){this.setContent(A);this.show();};jt_AppPrompt=function(B,D,C,A){if(arguments.length==0){return ;}this.base=jt_AppConfirm;this.base(B,D,C);this.returnData=new Object();this.fInput=document.createElement("input");this.fInput.type="text";if(A){this.fInput.className=A;}this.fInput.appDialog=this;this.fInput.onkeypress=jt_AppPrompt.keyPress;};jt_AppPrompt.prototype=new jt_AppConfirm();jt_AppPrompt.superClass=jt_AppConfirm.prototype;jt_AppPrompt.prototype.askUser=function(B,A){this.setContent(B);this.fInput.value=A;this.contentCell.appendChild(this.fInput);this.show();this.fInput.focus();};jt_AppPrompt.prototype.focus=function(){this.fInput.focus();};jt_AppPrompt.prototype.hide=function(A){if(A){this.returnData.value=this.fInput.value;}jt_AppPrompt.superClass.hide.call(this,A);};jt_AppAlert.addButton=function(B,C,D){var A=document.createElement("button");A.style.fontSize="10pt";A.style.width="60px";A.style.margin="0px 5px";A.innerHTML=C;A.linkNum=D;A.appDialog=B;A.onclick=jt_AppAlert.clickLink;B.buttonDIV.appendChild(A);};jt_AppAlert.clickLink=function(D){if(!D){D=window.event;}var C=D.target?D.target:D.srcElement;var A=C.linkNum;var B=0;while((C!=null)&&(B<jt_DialogBox.maxDepth)){if(C.appDialog){switch(A){case 1:C.appDialog.hide(true);break;case 2:C.appDialog.hide();break;}return false;}C=C.parentNode;B++;}return false;};jt_AppPrompt.keyPress=function(C){if(!C){C=window.event;}var B=C.target?C.target:C.srcElement;var A=C.keyCode?C.keyCode:C.which;if(A==13){B.appDialog.hide(true);}if(A==27){B.appDialog.hide();}};jt_AppAlert.prototype.trace=function(){alert(objToString(this.contentArea));};