//$Id $ 
/**
 * IMPORTANT NOTE: This compressed javascript includes thirdparty javascripts 
 * listed at http://writer.zoho.com/html/thirdparty.html
 * The original javascript sources are available in the above location.
 */
function Public(){}Public.fixForCachingInIe=function(B){if(!is_ie){var A="?";if(B.indexOf("?")>=0){A="&"}B=B+A+"fixCacheForIe="+(new Date()).getTime();return B}else{return B}};Public.allowComment=function(A){var C=document.getElementById("allowcomment");var B=new XMLHttpRequest();B.open("POST",Public.fixForCachingInIe("/wo/allowComments.do"),true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");B.onreadystatechange=function(){if(B.readyState==4){}};var D="Doc_Id="+A+"&alw_com="+C.checked;if(csrfParamName){D+="&"+csrfParamName+"="+csrfToken}B.send(D)};Public.publicComment=function(allowdelete){var allowdelete=allowdelete;var _publiccomment=document.publiccomment;var docid=_publiccomment.docid.value;var count=_publiccomment.commentcount.value;var comment=_publiccomment.comment.value;var author_name=_publiccomment.mail.value;var _captcha_tr=$("captcha_tr");if(!author_name||author_name.trim().length==0){alert(Writer.geti18n("NameOrEmailIdCannotBeEmpty"));_publiccomment.mail.value="";_publiccomment.mail.focus();return false}if(!comment||comment.trim().length==0){alert(Writer.geti18n("CommentCannotBeEmpty"));_publiccomment.comment.value="";_publiccomment.comment.focus();return false}var xmlhttp=Utils.getXMLHttpRequest();xmlhttp.open("POST",Public.fixForCachingInIe("/wo/pubComments.sas"),true);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");var params="&doc_id="+docid;params+="&comment="+encodeURIComponent(comment);params+="&authorname="+encodeURIComponent(author_name);if(_captcha_tr&&hipurl){params+="&"+hipurl+"="+_publiccomment.captcha_value.value;hipurl=undefined}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var res=xmlhttp.responseText;res=res.trim();res=eval("("+res+")");if(typeof res.allow_com!=="undefined"&&!res.allow_com){alert(Writer.geti18n("Comments Disabled By Document Owner"));window.location.reload()}else{if(res.errorCode==="HIP_REQUIRED"){hipurl=res.parameterName;if(_captcha_tr){document.images.captcha_img.src="/showcaptcha?digest="+hipurl}else{var tbody=_publiccomment.getElementsByTagName("tbody")[0];var row1=tbody.insertRow(2);row1.id="captcha_tr";var cell1=row1.insertCell(0);cell1.style.paddingTop="10px";var span=document.createElement("span");span.className="pubFormLabel";span.appendChild(document.createTextNode(Writer.geti18n("CAPTCHA_IMAGE")));cell1.appendChild(span);cell1.appendChild(document.createElement("br"));if(is_ie){var img=document.createElement("<img name='captcha_img'>")}else{var img=document.createElement("img");img.name="captcha_img"}img.src="/showcaptcha?digest="+hipurl;cell1.appendChild(img);cell1.appendChild(document.createTextNode(Writer.geti18n("TypeTheTextAppearsInTheImage")));if(is_ie){var _input=document.createElement("<input name='captcha_value'>")}else{var _input=document.createElement("input");_input.name="captcha_value"}_input.className="userfield";_input.type="text";_input.style.width="70px";cell1.appendChild(_input)}_publiccomment.captcha_value.focus()}else{if(_captcha_tr){_captcha_tr.parentNode.removeChild(_captcha_tr)}if(allowdelete&&res.status){var tmp='"'+res.commentid+'"';var str="<div id="+tmp+" style='margin-bottom:30px;'>";str+="<span class='commtrName' style='border-bottom: 1px dotted #CCC; display:block;margin-bottom:10px;'>";str+=res.authorname+",&nbsp;"+res.time;str+="&nbsp;&nbsp;<span class='pubTopLink' style='cursor:pointer;' onclick='Public.delpubComment("+tmp+");return false;'>"+Writer.geti18n("DELETE")+"</span><br></span>";str+="<span class='commtdis'>"+res.comment+"</span><br></div>"}else{if(res.status){var str="<div id="+res.commentid+" style='margin-bottom:30px;'>";str+="<span class='commtrName' style='border-bottom: 1px dotted #CCC; display:block;margin-bottom:10px;'>";str+=res.authorname+",&nbsp;"+res.time+"</span>";str+="<span class='commtdis'>"+res.comment+"</span><br></div>"}else{var str="<div style='margin-bottom:30px;'>";str+="<span class='commtrName' style='border-bottom: 1px dotted #CCC; display:block;margin-bottom:10px;'>";str+=author_name+" Said:</span>";str+="<span class='commtdis'>"+comment+"</span><br></div>"}}var el=document.getElementById("coms");if(el){el.innerHTML+=str}var commentCount=document.getElementById("commentcount1");var t3=parseInt(count)+1;commentCount.innerHTML=t3;_publiccomment.commentcount.value=t3;_publiccomment.mail.value="";_publiccomment.comment.value="";_publiccomment.mail.focus()}}}};xmlhttp.send(params);return false};Public.addComment=function(){(document.getElementById("comment")).style.display="inline";document.publiccomment.name.focus()};Public.addComClose=function(){(document.getElementById("comment")).style.display="none"};Public.viewComment=function(){(document.getElementById("viewcoms")).style.display=""};Public.viewComClose=function(){(document.getElementById("viewcoms")).style.display="none"};Public.delpubComment=function(A){var B=Utils.getXMLHttpRequest();B.open("POST",Public.fixForCachingInIe("/wo/DelPubCom.do"),true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");B.onreadystatechange=function(){if(B.readyState==4){var D=B.responseText;D=D.trim();if(D=="true"){var G=$(A);G.parentNode.removeChild(G);var C=document.publiccomment.commentcount;var F=C.value;var E=parseInt(F)-1;document.getElementById("commentcount1").innerHTML=E;C.value=E}else{if(D=="false"){alert("Unable to delete the comment.\n\nPlease Try Later.")}}}};B.send("&COMMENT_ID="+A)};Public.Download=function(C,H){var M=(is_ie)?window.event:C;if(!M){return }var I=(is_ie)?M.srcElement:M.target;var A=Utils.getPos(I);var N=A.offsetLeft;var L=A.offsetTop+I.offsetHeight;Public._addEvent(document,"mousedown",Public.documentClick);Public._addEvent($("public_iframe").contentWindow.document,"mousedown",Public.documentClick);var B=document.getElementById("slidediv");var K=B.style;if(Rebrand){var D=[["doc","DOC"],["docx","DOCX"],["sxw","SXW"],["pdf","PDF"],["odt","ODT"],["rtf","RTF"],["txt","TXT"],["html","HTML"]]}else{var D=[["doc","Word Document"],["docx","DOCX"],["sxw","SXW"],["pdf","PDF"],["odt","ODT"],["rtf","Rich Text Format"],["txt","Text File"],["html","HTML"]]}var G=D.length;for(var F=0;F<G;F++){function P(Q){return function(){B.innerHTML="";K.display="none";PublicEmail.exportCurrentDocument(Q,H);return false}}var E=document.createTextNode(D[F][1]);var O=Utils.createElement("a","href=# class=tagmenulinks",E);O.onclick=P(D[F][0]);B.appendChild(O)}B.className="tagmenu";K.right="";K.left=N+"px";K.top=L+4+"px";K.position="absolute";K.display="block"};Public._addEvent=function(A,C,B){if(is_ie){A.attachEvent("on"+C,B)}else{A.addEventListener(C,B,true)}};Public._removeEvent=function(A,C,B){if(is_ie){A.detachEvent("on"+C,B)}else{A.removeEventListener(C,B,true)}};Public.documentClick=function(B){B||(B=window.event);var A=is_ie?B.srcElement:B.target;var C=document.getElementById("slidediv");for(;A!=null&&A!=C;A=A.parentNode){}if(A==null){C.innerHTML="";C.style.display="none";Public._removeEvent(document,"mousedown",Public.documentClick);Public._removeEvent($("public_iframe").contentWindow.document,"mousedown",Public.documentClick)}};Public.setHeight=function(){var D=document.getElementById("public_iframe");var C=D.contentWindow.document;var B=C.body.scrollHeight;var A=C.documentElement.clientHeight;if(is_ie){(B)&&(B!=0)&&(D.style.height=B)}else{(A)&&(A!=0)&&(D.style.height=A)}D.style.overflowX="auto"};Public.forTOC=function(){var B=document.getElementById("public_iframe").contentWindow.document;var C=B.getElementById("zwTOCLink");if(C){C.innerHTML="[Hide]";C.href="#";C.onclick=function(){var D=B.getElementById("zwTOCLink");var F=B.getElementById("zwTOCDiv").style;var E=F.display;if(E=="block"){F.display="none";D.innerHTML="[Show]"}else{F.display="block";D.innerHTML="[Hide]"}Public.setHeight();return false}}var A=B.getElementById("zwTOCDiv");if(A){A.style.display="block"}};function newDialog(B,E,F,D,G,C,A){if(typeof F=="undefined"){F=window}newDialog._newgeckoOpenModal(B,E,F,D,G,C,A)}newDialog._return=null;newDialog._modal=null;newDialog._arguments=null;newDialog._newgeckoOpenModal=function(B,E,F,D,G,C,A){newDialog._arguments=F;getContent(B,D,G,C,A);newDialog._return=function(H){if(H&&E){E(H)}newDialog._modal=null}};function getContent(B,G,D,H,C){var I=Utils.getXMLHttpRequest();var F,E;F=H||"-500";E=C||"-500";if(D=="HelperDiv1"&&!H){F=700;E=120}var A=$("HelperDiv1");if(A){closeDialog("HelperDiv1")}if(I){I.open("GET",B,true);I.onreadystatechange=function(){if(I.readyState==4){var K=I.responseText;showDialog(K,"closeOnEscKey=yes,modal=yes,position=absolute,left="+F+",top="+E+"",D);if(G){G()}var M=$(D);if(!H||H==null){var L=((Utils.findClientDim().width)/2)-((M.offsetWidth)/2);if(L<50){L=100}M.style.left=L}if(!C||C==null){var L=(Utils.windowHeight()-M.offsetHeight)/3;if(L<10){L=20}M.style.top=L}}};I.send(null)}}function Utils(){}var agt=navigator.userAgent.toLowerCase();var is_firefox=(agt.indexOf("firefox")!=-1);var is_firefox_3=(agt.indexOf("firefox/3")!=-1);var is_ie=(agt.indexOf("ie")!=-1);var is_ie6=false;if(is_ie&&typeof (J)!="undefined"&&J.browser.version!="7.0"){is_ie6=true}var is_mac=(agt.indexOf("mac")!=-1);var is_chrome=(agt.indexOf("chrome")!=-1)&&(agt.indexOf("chromeframe")==-1);var is_chromeframe=(agt.indexOf("chromeframe")!=-1);var is_safari=(agt.indexOf("safari")!=-1)&&(agt.indexOf("chrome")==-1);var is_seamonkey=(agt.indexOf("seamonkey")!=-1);var is_opera=(agt.indexOf("opera")!=-1);var is_webtv=(agt.indexOf("webtv")!=-1);var is_gecko=(navigator.product=="Gecko");var is_nn4=false;var is_nn6=false;if(document.layers){is_nn4=true}else{if(document.layers||(!document.all&&document.getElementById)){is_nn6=true}}if(navigator.userAgent.toUpperCase().indexOf("OPERA")>=0){is_nn6=true}var platform=navigator.platform.toLowerCase();var os_windows=(platform.indexOf("win")!=-1);var os_linux=(platform.indexOf("linux")!=-1);var os_mac=(platform.indexOf("mac")!=-1);Utils.findDocDim=function(){if(is_ie){return{width:document.documentElement.offsetWidth+document.body.scrollLeft,height:document.documentElement.offsetHeight+document.body.scrollTop}}else{if(is_nn4||is_nn6){return{width:window.innerWidth+document.body.scrollLeft,height:window.innerHeight+document.body.scrollTop}}}};Utils.popUpListener=function(A){if(is_ie){srcElement=window.event.srcElement}else{if(is_nn4||is_nn6){srcElement=A.target;scrX=A.screenX;scrY=A.screenY;pgeX=A.pageX;pgeY=A.pageY}}};var scrX=0,scrY=0,pgeX=0,pgeY=0,srcElement;if(is_ie){document.attachEvent("onclick",Utils.popUpListener)}else{if(is_nn4||is_nn6){document.addEventListener("click",Utils.popUpListener,true)}}String.prototype.trim=function(){var A=this;A=A.replace(/^\s*(.*)/,"$1");A=A.replace(/(.*?)\s*$/,"$1");return A};if(!Array.prototype.map){Array.prototype.map=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var E=new Array(A);var D=arguments[1];for(var C=0;C<A;C++){if(C in this){E[C]=B.call(D,this[C],C,this)}}return E}}Utils.bullet_str=function(H,D){if(H==0){return 0}var E="",B=0,F=new Array("IIII","V","XXXX","L","CCCC","D","MMMM");if(D==4||D==5){for(var C=0;C<F.length;C++){var A=F[C].length+1,G=H%A;E=F[C].substr(0,G)+E;H=(H-G)/A}E=E.replace(/DCCCC/g,"CM").replace(/CCCC/g,"CD").replace(/LXXXX/g,"XC");E=E.replace(/XXXX/g,"XL").replace(/VIIII/g,"IX").replace(/IIII/g,"IV")}else{if(D==2||D==3){do{B=H%26;if(B==0){B=26;H-=1}E=String.fromCharCode(B+64)+E}while((H=parseInt(H/26))!=0)}else{if(D==1){E=""+H}}}return(D==2||D==4)?E.toLowerCase():E};Utils.reloadAndCloseWindow=function(A){if(self.parent.window.opener!=null){self.parent.window.opener.addRequestParams(self.parent.window.opener.ROOT_VIEW_ID,A);self.parent.window.opener.refreshCurrentView()}self.parent.window.close()};function $(B,A){if(!A){A=document}return A.getElementById(B)}Utils.toggleButtonValue=function(frmName,buttonName,value1,value2,action1,action2){var frmList=eval("document."+frmName);var len=frmList.length;for(i=0;i<len;i++){var frmItem=frmList.item(i);var butElement=eval("frmItem."+buttonName);var butValue=butElement.value;if(butValue==value1){butElement.value=value2;butElement.onclick=action2}else{butElement.value=value1;butElement.onclick=action1}}};Utils.hideOrShowButtons=function(frmName,buttonArr){for(i in buttonArr){var buttonName=buttonArr[i];var frmList=eval("document."+frmName);var len=frmList.length;for(j=0;j<len;j++){var frmItem=frmList.item(j);var butElement=eval("frmItem."+buttonName);if(butElement.style.display=="none"){butElement.style.display="inline"}else{butElement.style.display="none"}}}};Utils.getElementsByClassName=function(E,A,C){var D=E.getElementsByTagName(A);var F=new Array();for(var B=0;B<D.length;B++){if(Utils.hasClass(D[B],C)){F[F.length]=D[B]}}return F};Utils.getElementList=function(frmName,eleName){var eleArr=[];var frmList=eval("document."+frmName);var len=frmList.length;for(j=0;j<len;j++){var frmItem=frmList.item(j);var spanElements=frmItem.getElementsByTagName("span");var spanElement=spanElements[0];if(spanElement.id==eleName){eleArr[j]=spanElement}}return eleArr};Utils.getFormElementList=function(frmName,eleName){var eleArr=[];var frmList=eval("document."+frmName);var len=frmList.length;for(j=0;j<len;j++){var frmItem=frmList.item(j);eleArr[j]=eval("frmItem."+eleName)}return eleArr};Utils.removeCarriageReturns=function(E,B){if(!B){B="\n"}var C=E.indexOf(B);var A="";var D=0;while(C!=-1){A+=E.substring(D,C);D=C+B.length;A+=" ";C=E.indexOf(B,D)}A+=E.substring(D,E.length);return A};Utils.escapeAmpersands=function(E,D){if(!D){D="&"}var B=E.indexOf(D);var A="";var C=0;while(B!=-1){A+=E.substring(C,B);C=B+D.length;A+="$AMPSERAND$";B=E.indexOf(D,C)}A+=E.substring(C,E.length);return A};Utils.getCookieValue=function(C){var A=C.length;var B=(document.cookie).indexOf(C);if(B==-1){return null}var D=B+A;var E=(document.cookie).indexOf(";",D);return(document.cookie).substring(D+1,E)};Utils.showOrHideBox=function(D,A){var E=$(A);var F=E.getElementsByTagName("div");var H=D.getElementsByTagName("img");for(var C=0;C<F.length;C++){var G=F[C];if(G.style.display!="none"){var B=H[0];B.src="/wo/images/toggledown.jpg";G.style.display="none"}else{var B=H[0];B.src="/wo/images/toggleup.jpg";G.style.display="inline"}}};Utils.hasClass=function(A,B){if(!A.className){return false}return(A.className.search("(^|\\s)"+B+"(\\s|$)")!=-1)};Utils.showLoadingPercentage=function(D,C){if(!D){D="0%"}var I=Utils.findDocDimension();var E=(I.width/2)-document.body.scrollLeft;var H=(I.height/2)-100;var B=$("lp_Container");if(!B){return }var F="<img src="+staticURL+"/images/default/process.gif> "+D;var G=$("lp_percentage");G.innerHTML=D;B.style.position="absolute";B.style.display="block";(E)&&(B.style.left=E+"px");(H)&&(B.style.top=H+"px");var A=$("lp_Bg");A.style.width=(C)?C:"8px"};Utils.hideLoadingPercentage=function(){Utils.hideDiv("lp_Container")};Utils.showLoadingMsg=function(E){if(!E){E=Writer.geti18n("LOADING")}var D=Utils.findDocDimension();var C=(D.width/2)-document.body.scrollLeft;var B=(D.height/2)-100;var F=$("w_load");if(!F){return }var A="<img src="+staticURL+"/images/default/process.gif> "+E;F.innerHTML=A||"";F.style.position="absolute";(C)&&(F.style.left=C+"px");(B)&&(F.style.top=B+"px");F.style.display="block"};Utils.hideLoadingMsg=function(){Utils.hideDiv("w_load")};Utils.showMsgDisplay=function(C,B,A){var D=$("w_msg");D.innerHTML=C;if(B){D.className=B}else{D.className="loadingGreen"}D.style.display="inline";if(A){setTimeout(function(){Utils.hideMsgDisplay()},A)}};Utils.hideMsgDisplay=function(){var A=$("w_msg");A.innerHTML="";A.style.display="none"};Utils.showMsg=function(){Utils.openDiv("processIcon","inline")};Utils.hideMsg=function(){Utils.hideDiv("processIcon")};Utils.showWaitMsgDiv=function(A){Utils.hideDiv("waitmsg1");var B=$("waitmsg");if(B){if(!A){A=Writer.geti18n("Processing")+"..."}B.innerHTML=A;B.style.display="block"}};Utils.showSuccessMsg=function(A){Utils.hideDiv("waitmsg");var B=$("waitmsg1");if(B){B.innerHTML=A;B.style.display="block"}};Utils.openDiv=function(A,B){var A=$(A);if(A){A.style.display=B||"block"}};Utils.hideDiv=function(){var B=Utils.hideDiv.arguments;var A=B.length;for(var C=0;C<A;C++){var D=$(B[C]);if(D){D.style.display="none"}}};Utils.hideWaitMsgDiv=Utils.hideDiv;Utils.closeDiv=function(A){};Utils.createElement=function(M,F,K){var C=document.createElement(M);if(F){var L=F.split(" ");var I=L.length;for(var G=0;G<I;G++){var B=L[G];var D=B.split("=");var A=D[0];var H=D[1];if(H){H=H.replace("_sep_"," ")}if(A&&H){C.setAttribute(A,H);if(A=="class"){C.className=H}}else{if(A){C.setAttribute(A,"")}}}}if(K){var E=null;if(typeof K=="string"){E=document.createTextNode(K)}else{E=K}C.appendChild(E)}return C};Utils.createElementFromDoc=function(I,M,F,K){var C=I.createElement(M);if(F){var L=F.split(" ");for(var G in L){if(!L.hasOwnProperty(G)){continue}var B=L[G];var D=B.split("=");var A=D[0];var H=D[1];if(A&&H){C.setAttribute(A,H);if(A=="class"){C.className=H}}else{C.setAttribute(A,"")}}}if(K){var E=null;if(typeof K=="string"){E=I.createTextNode(K)}else{E=K}C.appendChild(E)}return C};Utils.clearDiv=function(C,A){var B=$(C);if(B){B.innerHTML="";if(A){B.style.display="none"}}};Utils.previewDoc=function(L){var G=$("body");if(G&&G.firstChild){G.removeChild(G.firstChild)}var E=Utils.createElement("tbody");G.appendChild(E);var F=Utils.createElement("tr");E.appendChild(F);var C=Utils.createElement("td","id=menuactions");F.appendChild(C);var H=["Edit","Share","Publish","Email","Export","History","Print"];MenuActions.loadMenuActions(H);var D=Utils.createElement("tr");E.appendChild(D);var B=Utils.createElement("td");B.style.borderTop="1px solid #8BAFC9";D.appendChild(B);var I=Utils.createElement("iframe","id=previewiframe class=previewframe frameborder=0");B.appendChild(I);var K=I.contentWindow.document;K.open();K.write(L);K.close();var A=((Writer.leftPanelON)?Writer.getNormalEditorFrameHeight():Writer.getMaximizedEditorFrameHeight())+56;I.style.height=A+"px"};Utils.loadInIframe=function(B){if(Writer.currentDocInfo.DOCUMENT_NAME){Utils.changeTitle(Writer.currentDocInfo.DOCUMENT_NAME)}if(typeof B=="undefined"){return }var C=$("readonly-iframe");if(!C){return }try{function D(F){var G=C.contentWindow.document;G.open();G.write(F);G.close()}D(B)}catch(A){try{if(is_ie){C.onreadystatechange=function(){if(C.readyState=="complete"){C.onreadystatechange=null;D(B)}}}else{C.onload=function(){C.onload=undefined;D(B)}}C.src="/html/blank.html"}catch(E){}}};Utils.loadInBody=function(R,B){var M=$("body");var G=$("bodyC");var E=Writer.currentDocInfo;var C,Q;if($("readonly-iframe")){C=$("readonly-iframe");Q=$("wo_innerbody")}else{if(E&&E.CATEGORY=="SEARCH"){M.removeChild(M.firstChild);var K=Utils.createElement("tbody");var D=document.createElement("tr");Q=document.createElement("td");C=document.createElement("iframe");Q.id="wo_innerbody";C.id="readonly-iframe";D.appendChild(Q);K.appendChild(D);M.appendChild(K);Q.appendChild(C);var L=document.createElement("tr");var O=document.createElement("td");L.appendChild(O);K.appendChild(L);M.appendChild(K)}else{M.removeChild(M.firstChild);var K=Utils.createElement("tbody");var I=Utils.createElement("tr");K.appendChild(I);M.appendChild(K);if(E&&E.CATEGORY!="TRASHED"){var H=Utils.createElement("td");H.setAttribute("id","menuactions");H.setAttribute("class","toolBar1Bg");I.appendChild(H)}var N=[Writer.js_obj.EDIT,Writer.js_obj.SHARE,Writer.js_obj.PUBLISH,Writer.js_obj.EMAIL,Writer.js_obj.EXPORT,"Print"];if(E.CATEGORY=="TRASHED"){MenuActions.loadMenuActions([],[])}else{if(E.CATEGORY=="TEMPLATE"){}else{MenuActions.loadMenuActions(N)}}var D=document.createElement("tr");Q=document.createElement("td");C=document.createElement("iframe");Q.id="wo_innerbody";C.id="readonly-iframe";D.appendChild(Q);K.appendChild(D);M.appendChild(K);Q.appendChild(C);var L=document.createElement("tr");var O=document.createElement("td");L.appendChild(O);K.appendChild(L);M.appendChild(K)}}var A=((Writer.leftPanelON)?Writer.getNormalEditorFrameHeight():Writer.getMaximizedEditorFrameHeight())+56;var P=A;if(E&&E.CATEGORY=="SEARCH"){P=A+50}M.style.paddingLeft=2;M.style.paddingRight=3;function F(){try{var T=$("readonly-iframe").contentWindow.document;T.open();T.write(R);T.close();if(!B&&T.getElementById("stylesheetforeditor")){T.getElementById("stylesheetforeditor").parentNode.removeChild(T.getElementById("stylesheetforeditor"))}}catch(S){Writer.log("ex:"+S)}}setTimeout(F,100);C.style.width="100%";if(Writer.docInfoFooterHide){P=P+32}if(E&&E.CATEGORY=="TRASHED"){M.style.paddingLeft=0;M.style.paddingRight=0;M.style.paddingTop=0;M.style.paddingBottom=0;C.style.height=P+45+"px";C.style.paddingTop=0}else{M.style.paddingLeft=2;M.style.paddingRight=3;C.style.height=P+"px"}C.style.border="1px solid #ccc";if(E.CATEGORY=="OWNED"||E.CATEGORY=="PUBLIC DOCUMENTS"){if($("shareinfobutton")){$("shareinfobutton").style.display="block"}}else{if($("shareinfobutton")){$("shareinfobutton").style.display="none"}}};Utils.getPos=function(B){var C={offsetLeft:B.offsetLeft,offsetTop:B.offsetTop};if(B.offsetParent){var A=Utils.getPos(B.offsetParent);C.offsetLeft+=A.offsetLeft;C.offsetTop+=A.offsetTop;C.offsetRight+=A.offsetRight}return C};Utils.validateDoc=function validate(A){if(!A||A.length==0||A.trim().length==0){alert(Writer.geti18n("IMP_ERR7"));return false}if(A.indexOf("'")>=0||A.indexOf('"')>=0||A.indexOf("\\")>=0||A.indexOf("\n")>=0||A.indexOf("&#10;")>=0||A.indexOf("?")>=0||A.indexOf("<")>=0||A.indexOf(">")>=0||A.indexOf("#")>=0){alert("\\,',\",?,<,>,# "+Writer.geti18n("IMP_ERR3"));return false}return true};Utils.showBlogMsg=function(B,A){if(A){Utils.showMsgDisplay(B,A,3000)}else{Utils.showMsgDisplay(B,"loadingGreen","3000")}};Utils.changeClass=function(A,B){for(i=0;i<A.length;i++){var D=A[i];var C=$(D);if(C){C.className=B}}};Utils.showMsgInId=function(B,D){var C=$(D);if(C){C.innerHTML="";C.className="redmsg";var A=document.createTextNode(B);C.appendChild(A)}};Utils.showLockMsg=function(C,A,E){var B=$("lockdiv");if(B){var D=$("lockdivname");if(D&&C){D.innerHTML=C}MenuActions._addEvent(document,"mousedown",MenuActions.lockClick);B.style.left="";B.style.right="";this.tot=document.body.offsetWidth;if(((this.tot)*0.6)<A){this.xval=document.body.offsetWidth-A+150;B.style.left=this.xval+"px"}else{B.style.left=A+"px"}B.style.width="300px";B.style.top=E+4+"px";B.style.position="absolute";PublicEmail.openSlider("lockdiv",true)}};Utils.hideLockMsg=function(){var A=$("lockdiv");if(A){A.style.display="none"}};Utils.validateTags=function(B){var A=/[:|\\|<|>|*|\||\/|'|%|#|&|?]/;if(A.test(B)){return false}return true};Utils.impDocConventionCheck=function(A,H,G){var B=$("importStatusMsg");if(!A){if((!A||A.length==0)&&!G){B.innerHTML="All the fields are empty ";B.style.display="inline";return false}if(A.indexOf("'")>=0||A.indexOf('"')>=0||A.indexOf("\\")>=0){alert("Special characters are not allowed in document name");return false}}var F;if(A&&A.length>0){if(H.indexOf(".")!=-1){F=H.substring(H.lastIndexOf(".")+1,H.length);B.style.display="none"}else{B.innerHTML="Importing file name should have an extension";B.style.display="inline";return false}var E=["odt","sxw","doc","rtf","png","jpg","gif","txt","html","htm"];var D=false;for(i=0;i<E.length;i++){if(E[i]==F.toLowerCase()){D=true;break}}if(!D){B.innerHTML="Importing of ."+F+" file is currently not supported";B.style.display="inline";return false}}var C=$("importprocess");if(C){C.style.display="inline"}};Utils.showDocName=function(A){var B;if(A.lastIndexOf("/")!=-1){B=A.substring(A.lastIndexOf("/")+1,A.length)}else{B=A.substring(A.lastIndexOf("\\")+1,A.length)}if(B.indexOf(".")!=-1){B=B.substring(0,B.indexOf("."))}document.importDoc.docname.value=B;if(!A||A.length==0){}};Utils.selectTextBox=function(B){var A=$(B);if(A){A.focus();A.select()}};Utils.getElementsByAttribute=function(H,I,K,D){var E=(I=="*"&&H.all)?H.all:H.getElementsByTagName(I);var C=new Array();var G=(typeof D!="undefined")?new RegExp("(^|\\s)"+D+"(\\s|$)"):null;var A;var F;for(var B=0;B<E.length;B++){A=E[B];F=A.getAttribute(K);if(typeof F=="string"&&F.length>0){if(typeof D=="undefined"||(G&&G.test(F))){C.push(A)}}}return C};if(typeof Array.prototype.push!="function"){Array.prototype.push=ArrayPush;function ArrayPush(A){this[this.length]=A}}var chatcnt=0;Utils.showChatInfo=function(B,C){if(chatcnt!=0){var D=$("chatmsg").cloneNode(true);D.id="chatmsg_"+chatcnt;var A=Utils.getElementsByAttribute(D,"span","id","_msg")[0];A.id="_msg_"+chatcnt;A.innerHTML=B;moreInfo_chatcnt=Utils.getElementsByAttribute(D,"span","id","_moreInfo")[0];moreInfo_chatcnt.id="_moreInfo_"+chatcnt;zwclosechatmsg_chatcnt=Utils.getElementsByAttribute(D,"td","id","zwclosechatmsg")[0];zwclosechatmsg_chatcnt.id="zwclosechatmsg_"+chatcnt;zwclosechatmsg_chatcnt.onclick=function(){var E=this.id;E=E.substring(E.indexOf("_")+1,E.length);Writer.closeSlider("chatmsg_"+E)};shwid=D;msg=A;moreInfo=moreInfo_chatcnt;document.body.appendChild(D)}else{shwid=$("chatmsg");msg=$("_msg");msg.innerHTML=B;moreInfo=$("_moreInfo")}moreInfo.innerHTML=C;if(HTMLArea.is_ie){shwid.style.left=document.body.offsetWidth-250;if(!C){if(chatcnt!=0){height=50*(chatcnt+1)+14;shwid.style.top=document.body.offsetHeight-height}else{shwid.style.top=document.body.offsetHeight-72}}else{if(chatcnt!=0){height1=150*(chatcnt+1)+14;shwid.style.top=document.body.offsetHeight-height1}else{shwid.style.top=document.body.offsetHeight-164}}}else{shwid.style.left=document.body.offsetWidth-250;if(!C){if(chatcnt!=0){height2=58*(chatcnt+1)+14;shwid.style.top=document.body.offsetHeight-height2}else{shwid.style.top=document.body.offsetHeight-72}}else{if(chatcnt!=0){height3=140*(chatcnt+1)+14;shwid.style.top=document.body.offsetHeight-height3}else{shwid.style.top=document.body.offsetHeight-154}}}shwid.style.width="248px";shwid.style.zIndex="10000000";if(chatcnt!=0){PublicEmail.openSlider("chatmsg_"+chatcnt,true);Utils.closeChatInfo=setTimeout(function(E){Writer.closeSlider(D.getAttribute("id"))},6000)}else{PublicEmail.openSlider("chatmsg",true);Utils.closeChatInfo=setTimeout(function(){Writer.closeSlider("chatmsg")},6000)}chatcnt++};Utils.findDocDimension=function(){if(is_ie){return{width:document.body.offsetWidth+document.body.scrollLeft,height:document.body.offsetHeight+document.body.scrollTop}}else{if(is_nn4||is_nn6){return{width:window.innerWidth+document.body.scrollLeft,height:window.innerHeight+document.body.scrollTop}}}};Utils.showCenterMsg=function(C,E,A,F,D){var B=$(C);if(!B){return }B.innerHTML=E;if(A&&F){B.style.position="absolute";B.style.left=A+"px";B.style.top=F+"px"}if(D){B.style.width=D}B.style.display="block"};Utils.insertMessage=function(C,B){var A=$(C);if(A){Utils.clearDiv(C);Utils.openDiv(C,"inline");A.innerHTML=B}};Utils.showHelp=function(D,A){var G=(is_ie)?window.event:D;var E=(is_ie)?G.srcElement:G.target;var B=Utils.getPos(E);var H=B.offsetLeft+5;var F=B.offsetTop+E.offsetHeight+3;id=$("zohohelp");var K=$("zohohelp1");var C=$(A);if(C){K.innerHTML=C.innerHTML}id.style.left=H+"px";id.style.top=F+"px";id.style.display="block";if(Writer.editor){var I=Writer.editor._editor._doc;MenuActions._addEvent(I,"mousedown",MenuActions.documentClickHelpClear)}MenuActions._addEvent(document,"mousedown",MenuActions.documentClickHelpClear)};Utils.fadeIn=function(B){if(!B){return }var A=30;B.style.display="block";B.zalpha=0;B.style.opacity=B.zalpha/10;B.style.filter="alpha(opacity="+(B.zalpha*10)+")";B.fadeInIntvl=window.setInterval(function(){Utils.fadeInStart(B)},A)};Utils.fadeOut=function(B){if(!B){return }var A=30;B.zalpha=9;B.style.opacity=B.zalpha/10;B.style.filter="alpha(opacity="+(B.zalpha*10)+")";B.fadeOutIntvl=window.setInterval(function(){Utils.fadeOutStart(B)},A)};Utils.fadeInStart=function(B){if(!B){return }if(!B.fadeInIntvl){return }var A=(!B.zalpha)?0:B.zalpha;if(A<10){B.style.opacity=A/10;B.style.filter="alpha(opacity="+(A*10)+")";A++;B.zalpha=A}else{B.style.opacity=0.99;B.style.filter="alpha(opacity=100)";B.zalpha=undefined;window.clearInterval(B.fadeInIntvl)}};Utils.fadeOutStart=function(B){if(!B||!B.fadeOutIntvl){return }var A=(!B.zalpha)?0:B.zalpha;if(A>0){B.style.opacity=(A/10);B.style.filter="alpha(opacity="+(A*10)+")";A--;B.zalpha=A}else{A=0;B.style.opacity=0.01;B.style.filter="alpha(opacity=0)";B.style.display="none";B.zlpha=undefined;window.clearInterval(B.fadeOutIntvl);if(Utils.onFadeOut){Utils.onFadeOut();Utils.onFadeOut=undefined}}};function pausecomp(B){date=(new Date()).getTime();var A=null;do{A=(new Date()).getTime()}while(A-date<B)}function postAjax(C,B,A){C.open("POST",B,true);C.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");C.setRequestHeader("Content-length",A.length);C.send(A)}function getXmlhttp(){if(window.XMLHttpRequest){var B=new XMLHttpRequest()}else{try{var B=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){try{var B=new ActiveXObject("Microsoft.XMLDOM")}catch(C){var B=new ActiveXObject("Msxml2.XMLHTTP")}}}return B}function encodeHtml(A){A=A.replace("<","&lt;");A=A.replace(">","&gt;");return A}Utils.findPosX=function(B){var C=0;if(document.getElementById||document.all){try{while(B.offsetParent){C+=B.offsetLeft;B=B.offsetParent}}catch(A){return C}}else{if(document.layers){C+=B.x}}return C};Utils.findPosY=function(C){var A=0;if(document.getElementById||document.all){try{while(C.offsetParent){A+=C.offsetTop;C=C.offsetParent}}catch(B){return A}}else{if(document.layers){A+=C.y}}return A};Utils.trimSpaces=function(A){return A.replace(/(\s+)/g,"")};Utils.isEmail=function(C){C=C.trim();var A=C.length;if(A==0){alert(Writer.geti18n("Please Enter Email ID"));return false}var B=/^[a-zA-Z0-9]([\w\-\.\+]*)@([\w\-\.]*)(\.[a-zA-Z]{2,4}(\.[a-zA-Z]{2}){0,2})$/i;if(B.test(C)){return true}else{alert(Writer.geti18n("Please Enter Valid Email ID for ")+'"'+C+'"');return false}};Utils.getTimeStamp=function(){var A=new Date();return(A.getDate()+","+(A.getMonth()+1)+","+A.getFullYear())};function selectShareTab(A){var E=new Array("share_within_individuals","share_within_groups","shared_details","manage_groups");$(A+"_tab").className="hdrPopTabSel2";$(A).style.display="block";for(var G=0;G<E.length;G++){if(E[G]!=A){$(E[G]+"_tab").className="hdrPopTabUnsel2";$(E[G]).style.display="none"}}if(A=="share_within_individuals"){$("shareEmailContentFlag").checked=false;setSpecifyContent();$("shareList").focus()}else{if(A=="share_within_groups"){Groups.init();setTimeout(function(){Sharing.loadGroupShare()},500)}else{if(A=="shared_details"){Sharing.createHTML("sharedinfo")}else{if(A=="manage_groups"){var D=$("manage_groups");var F=Writer.iamServer+"/ui/groups/groups.jsp?service=true&service_language="+MenuActions.userLocale;var H='<iframe style="border:0px;height:90%;width:100%;border-bottom:1px solid #999;margin-bottom:3px" scrolling="auto" src="'+F+'">';D.innerHTML=H;var C=document.createElement("p");C.style.margin="0px;";C.style.padding="0px;";C.align="center";D.appendChild(C);Writer.log(" button loaded");var B=document.createElement("input");B.type="button";B.className="divclosebutton";B.value=Writer.geti18n("CLOSE");B.onclick=function(){Sharing.closeDiv()};C.appendChild(B)}}}}}Utils.insertMeta=function(D,C){var B=Writer.editor._editor._iframe.contentWindow.document;var A=B.createElement("meta");A.setAttribute("id",D);A.setAttribute("content",C);B.getElementsByTagName("head")[0].appendChild(A)};Utils.getMetaElement=function(E){var D=Writer.editor._editor._iframe.contentWindow.document;var C=D.getElementsByTagName("meta");for(var B=0;B<C.length;B++){var A=C[B].getAttribute("id");if(A!=null&&A.toLowerCase()==E){return C[B]}}};Utils.getOuterHtml=function(C,B){if(!B){B=Writer.editor._editor._iframe.contentWindow.document}var A=B.createElement("span");A.appendChild(C.cloneNode(true));return A.innerHTML};Utils.isImage=function(A){if(A&&(/(\.(gif|jpg|jpeg|bmp|png))$/i.test(A.value))){return true}else{return false}};Utils.selectTheme=function(C,B){if(C){var A=C+"Id";if(C=="none"&&B=="box"){A="boxId";$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}else{if(C=="cols"&&B=="box"){A="closedcolumnsId";$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}else{if(C=="cols"&&B=="vsides"){A="colsId";$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}else{if(C=="rows"&&B=="box"){A="closedrowsId";$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}else{if(C=="all"&&B=="void"){A="rowsncolsId";$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}else{$(A).style.backgroundColor="#FEEF90";$(A).style.border="1px solid #FDBF3A"}}}}}}};Utils.changeTableClass=function(B,D){if(B){for(var A=0;A<B.length;A++){var C=B[A];$(C).style.backgroundColor="";$(C).style.border=""}}$(D).style.backgroundColor="#FEEF90";$(D).style.border="1px solid #FDBF3A"};Utils.showbgprop=function(C,B,A){var D=document.getElementById(B);if(D.style.display=="block"){D.style.display="none"}else{D.style.display="block"}};function getCursorPos(B){if(is_ie){var A=window.event.clientX+document.documentElement.scrollLeft;var C=window.event.clientY+document.documentElement.scrollTop}else{if(is_nn6){var A=B.pageX;var C=B.pageY}}return{x:A,y:C}}Utils.hideDivArray=function(B){var A=B.length;for(var C=0;C<A;C++){var F=$(B[C]);var E=B[C];var D=$(E.replace("s","l"));if(F){F.style.display="none";if(D){D.className="settabUnselected"}}}};function unescapeSpecialChar(A){var B=arguments[1];if(B!="no"){if(arguments[0].indexOf(".")!=-1){A=A.replace(/\\\./g,".")}if(arguments[0].indexOf("*")!=-1){A=A.replace(/\\\*/g,"*")}if(arguments[0].indexOf("_")!=-1){A=A.replace(/\\\_/g,"_")}if(arguments[0].indexOf("-")!=-1){A=A.replace(/\\\-/g,"-")}}A=unescape(decodeURIComponent(A));return A}function escapeSpecialChar(B){var A=arguments[1];B=encodeURIComponent(escape(B));if(A!="no"){if(arguments[0].indexOf(".")!=-1){B=B.replace(/\./g,"\\.")}if(arguments[0].indexOf("*")!=-1){B=B.replace(/\*/g,"\\*")}if(arguments[0].indexOf("_")!=-1){B=B.replace(/\_/g,"\\_")}if(arguments[0].indexOf("-")!=-1){B=B.replace(/\-/g,"\\-")}}return B}Utils.get_cookie=function(D){var B=D+"=";var F=B.length;var A=document.cookie.length;var E=0;while(E<A){var C=E+F;if(document.cookie.substring(E,C)==B){return Utils.get_cookie_val(C)}E=document.cookie.indexOf(" ",E)+1;if(E==0){break}}return null};Utils.get_cookie_val=function(B){var A=document.cookie.indexOf(";",B);if(A==-1){A=document.cookie.length}return unescape(document.cookie.substring(B,A))};Utils.set_cookie=function(C,E){var A=Utils.set_cookie.arguments;var H=Utils.set_cookie.arguments.length;var B=(H>2)?A[2]:null;var G=(H>3)?A[3]:null;var D=(H>4)?A[4]:null;var F=(H>5)?A[5]:false;document.cookie=C+"="+escape(E)+((B==null)?"":("; expires="+B.toGMTString()))+((G==null)?"":("; path="+G))+((D==null)?"":("; domain="+D))+((F==true)?"; secure":"")};Utils.del_cookie=function(A){var C=new Date();C.setTime(C.getTime()-1);var B=Utils.get_cookie(A);document.cookie=A+"="+B+"; expires="+C.toGMTString()};Utils.getXMLHttpRequest=function(){var A=false;try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(C){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){A=false}}if(!A&&typeof XMLHttpRequest!="undefined"){A=new XMLHttpRequest()}return A};Utils.createIframe=function(){if(is_ie&&typeof (J)!="undefined"&&J.browser.version!="7.0"){if($("ie_select")){return }var B=document.createElement("IFRAME");B.id="ie_select";B.frameBorder="no";B.scrolling="no";var A=B.style;A.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";A.position="absolute";A.left="-10000px";A.top="-10000px";A.zIndex="999";document.body.appendChild(B)}};Utils.setIframe=function(G,F,E,A){var D=$("ie_select");if(D){try{var B=D.style;B.left=G+"px";B.top=F+"px";B.width=E+"px";B.height=A+"px"}catch(C){}}};Utils.revertSplChrs=function(A){A=replace(A,"&","&amp;");A=replace(A,"<","&lt;");A=replace(A,">","&gt;");A=replace(A,"'","&apos;");return A};Utils.isColRowSpan=function(H,F){var G=H.length;for(var D=0;D<G;D++){var E=H[D];var C=E.cells.length;for(var B=0;B<C;B++){var A=E.cells[B];if(F=="col"&&A.colSpan>=2){return false}if(F=="row"&&A.rowSpan>=2){return false}if(F=="colrow"&&(A.rowSpan>=2||A.colSpan>=2)){return false}}}return true};Utils.findEditorDim=function(C,B){if(!C){C=window}if(!B){B=document}if(is_ie){var D=B.body.clientWidth;var A=B.body.clientHeight}else{if(is_nn4||is_nn6){var D=C.innerWidth;var A=C.innerHeight}}return{width:D,height:A}};Utils.findClientDim=function(){if(is_ie){var B=document.body.clientWidth;var A=document.body.clientHeight}else{if(is_nn4||is_nn6){var B=window.innerWidth;var A=window.innerHeight}}return{width:B,height:A}};Utils.setCookie=function(C,E,A,G,D,F){var B=C+"="+escape(E)+((A)?"; expires="+A.toGMTString():"")+((G)?"; path="+G:"")+((D)?"; domain="+D:"")+((F)?"; secure":"");document.cookie=B};Utils.Get_Cookie=function(A){var F=document.cookie.split(";");var B="";var D="";var E="";var C=false;for(i=0;i<F.length;i++){B=F[i].split("=");D=B[0].replace(/^\s+|\s+$/g,"");if(D==A){C=true;if(B.length>1){E=unescape(B[1].replace(/^\s+|\s+$/g,""))}return E;break}B=null;D=""}if(!C){return null}};Utils.setStyleAttribute=function(D,A,C){if(D==null){return }var E=D.getAttribute("style"),K,B="";if(E&&E!=null){var K=(typeof E=="object")?E.cssText.split(";"):E.split(";");for(var F in K){if(!K.hasOwnProperty(F)||K&&K[F].trim()==""){continue}var H=K[F].split(":");var I=H[0].trim(),G=H[1].trim();if(A.trim()==I.toLowerCase()){continue}B+=(I+":"+G+";")}}B+=(A+":"+C+";");if(HTMLArea.is_ie){D.style.cssText=B}else{D.setAttribute("style",B)}};Utils.removeStyleAttribute=function(C,A){if(C==null){return }var D=C.getAttribute("style"),I,B="";if(D&&D!=null){var I=(typeof D=="object")?D.cssText.split(";"):D.split(";");for(var E in I){if(!I.hasOwnProperty(E)||I[E]==""){continue}var G=I[E].split(":");var H=G[0].trim(),F=G[1].trim();if(A.trim()==H.toLowerCase()){continue}B+=(H+":"+F+";")}}if(HTMLArea.is_ie){C.style.cssText=B}else{C.setAttribute("style",B)}};Utils.getStyleAttribute=function(G,D){if(G==null){return }var C=G.getAttribute("style"),F,H="";if(C&&C!=null){var F=(typeof C=="object")?C.cssText.split(";"):C.split(";");for(var E in F){if(!F.hasOwnProperty(E)||F[E]==""){continue}var B=F[E].split(":");var A=B[0].trim();if(D.trim()==A.toLowerCase()){avalue=B[1].trim();return avalue}}}};Utils.setStyleAttributes=function(E,A){var C=A.split(";");for(var D in C){if(C.hasOwnProperty(D)){var B=C[D].split(":");if(B[0]=="undefined"||B[0]==""||B[0]==" "){continue}Utils.setStyleAttribute(E,B[0],B[1])}}};Utils.windowHeight=function(){var A;if(window.innerHeight){A=window.innerHeight}else{if(document.body.clientHeight){A=document.body.clientHeight}}return A};Utils.windowWidth=function(){var A;if(window.innerWidth){A=window.innerWidth}else{if(document.body.clientWidth){A=document.body.clientWidth}}return A};Utils.changeTitle=function(B){if(Writer.remoteDocEditor){var A=B.substring(0,B.lastIndexOf("."));if(A=="Untitled"){document.title=Writer.geti18n(A)+" - "+Writer.geti18n("ZOHOWRITERTITLE")}else{document.title=Writer.remoteFileName+" - "+Writer.geti18n("ZOHOWRITERTITLE")}}else{document.title=B+" - "+Writer.geti18n("ZOHOWRITERTITLE")}};Utils.getNodeName=function(A){if(A&&A.nodeType==Node.ELEMENT_NODE){return A.nodeName.toLowerCase()}return"text"};Utils.findPositionWithScrolling=function(B){if(typeof (B.offsetParent)!="undefined"){var A=B;var D=0;var C=0;for(;B;B=B.offsetParent){D+=B.offsetLeft;C+=B.offsetTop;if(B!=A&&B!=document.body&&B!=document.documentElement){D-=B.scrollLeft;C-=B.scrollTop}}return[D,C]}else{return[B.x,B.y]}};Utils.generateRandom=function(C){var B=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","-");var A=new Array(C);for(var D=0;D<A.length;D++){A[D]=B[Math.floor(Math.random()*66)]}A=A.toString().replace(/,/g,"");return A};Utils.id=1;Utils.createUUID=function(A){if(Writer.loading){return"zw-"+Utils.id++}return"zw-"+Utils.createUniqueId()};Utils.createUniqueId=function(){if(Writer.zuid){var A=parseInt(Writer.zuid).toString(16);A=A.replace("(","");A=A.replace(")","");if(A.indexOf(".")!=-1){var B=A.substr(0,A.indexOf("."));var D=A.substring(A.indexOf(".")+1);var F=parseInt(D.substring(D.toLowerCase().indexOf("e+")+2));D=D.substring(0,D.toLowerCase().indexOf("e+"));while(D.length<F){D+="0"}A=B+D}}else{var A=new Date().getMilliseconds().toString(16)}var E=new Date();E=E.getTime().toString(16);var C=this.generateRandom(6);return E+C+A};Utils.isValidEmail=function(C){var A=C.length;if(A==0){return false}var B=/^[a-zA-Z0-9]([\w\-\.\+]*)@([\w\-\.]*)(\.[a-zA-Z]{2,4}(\.[a-zA-Z]{2}){0,2})$/i;if(B.test(C)){return true}else{return false}};Utils.getIndexOf=function(A,B){for(var C=0,D=A.length;C<D;C++){if(A[C]==B){return C}}return -1};Utils.getIframeContent=function(F){var C=$(F);if(!C){return }var E=C.contentWindow.document;if(!E){return }var A=null;var B=E.getElementsByTagName("head");if(B&&B.length>0){A=B[0].innerHTML}var D="<html><head>"+A+"</head><body>"+E.body.innerHTML+"</body></html>";return D};Utils.isCursorInsideHdrFtr=function(){var B=Writer.editor._editor;var E=B._doc;var D=E.getElementById("hdiv");var A=E.getElementById("fdiv");var C=rangeutil.getParentElement();return(D&&this.isContains(D,C))||(A&&this.isContains(A,C))};Utils.isContains=function(B,A){while(A){if(B==A){return true}A=A.parentNode}return false};Utils.insertNodeAfter=function(C,B){var A=B.parentNode;if(A.lastchild==B){A.appendChild(C)}else{A.insertBefore(C,B.nextSibling)}};Utils.timeInGMT=function(){return(new Date()).getTime()+((new Date()).getTimezoneOffset()*60*1000)};Utils.daysAgo=function(B){var A=Utils.timeInGMT();var D=A-B;D=D/1000;var C=Math.round(D);if(C>60&&C<120){return Writer.geti18n("lessminuteago")}else{if(C<60){return Writer.geti18n("fewsecondsago")}else{D=D/60;C=Math.round(D);if(C>=2&&C<60){return C+" "+Writer.geti18n("minutesago")}else{D=D/60;C=Math.round(D);if(C==1){return"1 "+Writer.geti18n("hourago")}else{if(C>1&&C<=23){return C+" "+Writer.geti18n("hoursago")}else{D=D/24;C=Math.round(D);if(C==1){return"1 "+Writer.geti18n("dayago")}else{return C+" "+Writer.geti18n("daysago")}}}}}}};Utils.parseCont=function(A,B,C){A=Writer.editor._editor.parseObj.parse(A,false);if(C==0){B.innerHTML=""}B.innerHTML+=A};Utils.itr=150;Utils.inc=0;Utils.time_fnc=[];Utils.parseLimited=[];Utils.parseLimitedNodes=function(H,B,A){var E=Writer.editor._editor._iframe.contentWindow.document;var D=E.body;var G=E.createElement("div");for(var C=H-1;C<B;C++){var F=D.childNodes[C];if(!F){break}G.appendChild(F.cloneNode(true));Utils.inc++}if(H-1==0){Utils.time_fnc.push(setTimeout(function(){Utils.parseCont(G.innerHTML,D,0)},1))}else{Utils.time_fnc.push(setTimeout(function(){Utils.parseCont(G.innerHTML,D)},1))}if(Utils.inc==A){setTimeout(Writer.load,1)}};Utils.unescapeHTML=function(A){var B=document.createElement("DIV");B.innerHTML=A;if(B.innerText){return B.innerText}return B.textContent};Utils.escapeHTML=function(A){A=A.replace(/&/g,"&amp;");A=A.replace(/>/g,"&gt;");A=A.replace(/</g,"&lt;");A=A.replace(/'/g,"&#39;");A=A.replace(/"/g,"&quot;");return A};Utils.getViewportScrollX=function(B,A){var C=0;if(B.documentElement&&B.documentElement.scrollLeft){C=B.documentElement.scrollLeft}else{if(B.body&&B.body.scrollLeft){C=B.body.scrollLeft}else{if(A.pageXOffset){C=A.pageXOffset}else{if(A.scrollX){C=A.scrollX}}}}return C};Utils.getViewportScrollY=function(C,B){var A=0;if(C.documentElement&&C.documentElement.scrollTop){A=C.documentElement.scrollTop}else{if(C.body&&C.body.scrollTop){A=C.body.scrollTop}else{if(B.pageYOffset){A=B.pageYOffset}else{if(B.scrollY){A=B.scrollY}}}}return A};Utils.getScrollTopForElement=function(B){var A=0;for(;B;B=B.offsetParent){A+=B.scrollTop}return A};Utils.getScrollLeftForElement=function(B){var A=0;for(;B;B=B.offsetParent){A+=B.offsetLeft}return A};Utils.setIdForElement=function(D,F){if(Utils.getNodeName(D)=="body"){return }if(!D.id||F){D.id=Utils.createUUID(D.tagName)}var A=D.childNodes.length;for(var B=0;B<A;B++){var E=D.childNodes[B];if(E.nodeType!=3){if(!E.id||F&&HTMLArea.idReplaceCheck(E.id)){E.id=Utils.createUUID(E.tagName)}}}var C=D.parentNode;while(C&&!HTMLArea.isBlockElement(C)&&F){if(!C.id){C.id=Utils.createUUID(C.tagName)}else{if(HTMLArea.idReplaceCheck(C.id)){C.id=Utils.createUUID(C.tagName)}}C=C.parentNode}if(C&&Utils.getNodeName(C)=="li"&&F){C.id=Utils.createUUID(C.tagName);C=C.parentNode}};Utils.removeChild=function(A){while(A.hasChildNodes()){A.removeChild(A.childNodes[0])}};Utils.setAllAttributes=function(C,D){for(var B=0;B<C.attributes.length;B++){var A=C.attributes[B];if(!A.specified){continue}if(A.nodeName=="style"){D.style.cssText+=C.style.cssText;continue}if(A.nodeName=="id"){continue}D.setAttribute(A.nodeName,A.nodeValue)}if(!D.id){D.id=Utils.createUUID()}};Utils.isBlockElement=function(B){var A=" body form textarea fieldset ul ol dl li div p h1 h2 h3 h4 h5 h6 quote pre table thead noframesnoscript tbody code tfoot tr td th iframe address dt hr menu isindex dd center dir blockquote style";if(B&&B.tagName){return(A.indexOf(" "+B.tagName.toLowerCase()+" ")!=-1)}else{return false}};Utils.getText=function(B){var C="";for(var A=0;A<B.childNodes.length;A++){if(B.childNodes[A].nodeType==3){C+=B.childNodes[A].nodeValue}else{if(B.childNodes[A].hasChildNodes()){C+=Utils.getText(B.childNodes[A])}}}return C};Utils.removeTextNode=function(B){for(var A=0;A<B.childNodes.length;A++){if(B.childNodes[A].nodeType==3){B.removeChild(B.childNodes[A])}else{if(B.childNodes[A].hasChildNodes()){Utils.removeTextNode(B.childNodes[A])}}}};Utils.getStyleValue=function(C,F){var K=C.split(";");var D=new RegExp(F);var I="";for(var B=0;B<K.length;B++){var H=K[B].toLowerCase();var E=H.indexOf(":");var A=H.substring(E+1,H.length);if(D.test(H)){I=A;break}}var G=new RegExp('"');if(G.test(I)){I=I.substring(1,I.length-1)}return I};Utils.removeCursor=function(A){var B=null;while(B=A.getElementById("pos_Cursor")){B.parentNode.removeChild(B)}};Utils.splitNodeAtCursor=function(H,A,C){var F=rangeutil.getParentElement(A);var I=H.createElement("span");I.id="pos_Cursor";if(!A){A=rangeutil.createSelectionRange()}rangeutil.insertAtRange(A,Utils.getOuterHtml(I));I=H.getElementById("pos_Cursor");var E=I.cloneNode(false);var B=I;var D=(C==F)?true:false;while(F.nodeName.toLowerCase()!="body"){var G=F.cloneNode(false);G.appendChild(E);while(B.nextSibling){G.appendChild(B.nextSibling)}if(D){break}B=F;F=F.parentNode;E=G;if(F==C){D=true}}Utils.removeCursor(H);return G};Utils.isEmpty=function(C){if(!C){return true}var A=C.childNodes;if(A.length!=0){for(var B=0;B<A.length;B++){if(!Utils.isEmpty(A[B])){return false}}}else{return !(C.nodeType==3&&C.nodeValue.length!=0||Migration.isSpecialLeafNode(C)||Migration.allowedEmptySpans(C))}return true};Utils.findPrevious=function(B,D,C){do{var A=D.previousSibling;if(!A){D=D.parentNode}else{Utils.correctNode(B,A);D=A;while(D.childNodes.length!=0){D=D.lastChild}}Utils.correctNode(B,D)}while(!Utils.nodeNameEquals(D,C));return D};Utils.findNext=function(C,B,D){do{var A=B.nextSibling;if(!A){B=B.parentNode}else{B=A;while(B.childNodes.length!=0){B=B.firstChild}}Utils.correctNode(C,B)}while(!Utils.nodeNameEquals(B,D));return B};Utils.containsNestedSpans=function(E){if(!E){return false}var A=E.getElementsByTagName("span");var C=A.length;for(var B=0;B<A.length;B++){var D=A[B];if(D.id=="sel_start"||D.id=="sel_end"){C--}}return C>0};Utils.nodeNameEquals=function(D,B){if(!D||!B){return false}var C=B.split("|");for(var A=0;A<C.length;A++){if(D.nodeName.toLowerCase()==C[A]){return true}}return false};Utils.createNode=function(B,A){var C=B.createElement(A);C.id=Utils.createUUID();return C};Utils.surroundWith=function(B,C,A){C.parentNode.insertBefore(A,C);A.appendChild(C)};Utils.correctNode=function(D,E){if(!E){return E}if(E.nodeType==3&&!Utils.nodeNameEquals(E.parentNode,"span")){var A=Utils.createNode(D,"span");E.parentNode.insertBefore(A,E);A.appendChild(E);E=A}while(Utils.nodeNameEquals(E.parentNode,"span")){E=E.parentNode}if(Utils.nodeNameEquals(E,"span")){var B=E;if(Utils.containsNestedSpans(E)){B=Utils.migrateSpan(D,E)}if(Utils.nodeNameEquals(E.parentNode,"body|td|th")){var C=Utils.createNode(D,"p");E.parentNode.insertBefore(C,E);C.appendChild(E);B=C}return B}return E};Utils.migrateSpan=function(D,B){if(!B){return B}var F=B.firstChild;while(F&&!Utils.nodeNameEquals(F,"span")){F=F.nextSibling}if(Utils.nodeNameEquals(F,"span")){var A=F;var C=B;while(A){A=A.nextSibling;Utils.setAllAttributes(B,F);B.parentNode.insertBefore(F,C.nextSibling);if(Utils.containsNestedSpans(F)){Utils.migrateSpan(D,F)}C=F;F=A;if(F&&F.nodeType==3){var E=B.cloneNode(false);E.id=Utils.createUUID();Utils.surroundWith(D,F,E);A=F.parentNode;F=A}}}return B};Utils.openPopupDialog=function(D,A,C){var B=document.getElementById(D);if(B){B.style.display="block"}A=A+"?curr_lang="+_editor_lang+"&editor_settings=Normal";newDialog(A,null,null,C,"HelperDiv")};Utils.createParagraph=function(B){var A=B.createElement("p");A.id=Utils.createUUID();return A};function PublicEmail(){}PublicEmail.init=function(event){if(!event){return }var loadjsp="/i18n/publicemail.jsp";var load=function(){(is_ie)&&(document.getElementById("FreezeLayer").style.height=document.documentElement.clientHeight+"px");var log=document.getElementById("pubemail_log");var time=null;var fromemail=document.getElementById("pub_fromemail");var hipurl=undefined;function message(clss,msg,delay){log.className=clss;log.innerHTML=msg;if(delay){if(time){clearTimeout(time)}time=setTimeout(function(){log.className="";log.innerHTML="&nbsp;"},delay)}}fromemail.focus();var email_send_button=document.getElementById("pub_emailsend");function submit(){log.innerHTML="&nbsp";email_send_button.disabled=true;var toemail=document.getElementById("pub_toemail");if(!Utils.isEmail(fromemail.value)){fromemail.focus();email_send_button.disabled=false;return false}if(!Utils.isEmail(toemail.value)){toemail.focus();email_send_button.disabled=false;return false}message("popupinfo",Writer.geti18n("Sending Email Please Wait"));var xmlhttp=Utils.getXMLHttpRequest();xmlhttp.open("POST","/MailDoc.im?action=sendmail",true);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");var format=$("pub_fmt_sel").value.split("-");var params="&wo_emailId="+encodeURIComponent(toemail.value);params+="&emailType="+(format[1]||"attachment");params+="&emailFormat="+format[0];params+="&DOCUMENT_ID="+document.saveForm.hiddocId.value;params+="&DOCUMENT_NAME="+document.saveForm.hiddocName.value;params+="&fromid="+encodeURIComponent(fromemail.value);var _pub_captcha_inp=$("pub_captcha_inp");if(_pub_captcha_inp&&hipurl){params+="&"+hipurl+"="+_pub_captcha_inp.value;hipurl=undefined}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var msg=xmlhttp.responseText;msg=msg.trim();msg=eval("("+msg+")");var _pub_captcha_tr1=$("pub_captcha_tr1");var _pub_captcha_tr2=$("pub_captcha_tr2");if(msg.errorCode==="HIP_REQUIRED"){hipurl=msg.parameterName;if($("pub_captcha")){message("popuperror",Writer.geti18n("Please ReEnter The Image Text"));$("pub_captcha").src="/showcaptcha?digest="+hipurl}else{var tbody=$("_DIALOG_CONTENT").getElementsByTagName("tbody")[0];var row1=tbody.insertRow(4);row1.id="pub_captcha_tr1";var row2=tbody.insertRow(5);row2.id="pub_captcha_tr2";var cell1=row1.insertCell(0);cell1.className="emailintxt";cell1.align="right";var bold=document.createElement("b");bold.appendChild(document.createTextNode(Writer.geti18n("Image Text")));cell1.appendChild(bold);var cell2=row1.insertCell(1);cell2.className="field";cell2.appendChild(document.createTextNode(Writer.geti18n("Enter the code as seen in the picture below")));var cell3=row2.insertCell(0);var cell4=row2.insertCell(1);var tbl=document.createElement("Table");var _row1=tbl.insertRow(0);var _cell1=_row1.insertCell(0);var tmp1=document.createElement("img");tmp1.id="pub_captcha";tmp1.src="/showcaptcha?digest="+hipurl;_cell1.appendChild(tmp1);var _cell2=_row1.insertCell(1);var tmp2=document.createElement("input");tmp2.id="pub_captcha_inp";tmp2.type="text";_cell2.appendChild(tmp2);cell4.appendChild(tbl);message("popuperror",Writer.geti18n("Please Enter The Image Text"))}$("pub_captcha_inp").focus();email_send_button.disabled=false}else{if(msg.status=="document not present"){(_pub_captcha_tr1)&&(_pub_captcha_tr1.parentNode.removeChild(_pub_captcha_tr1));(_pub_captcha_tr2)&&(_pub_captcha_tr2.parentNode.removeChild(_pub_captcha_tr2));message("popuperror",Writer.geti18n("The document is Not present"),10000)}else{if(msg.status==true){(_pub_captcha_tr1)&&(_pub_captcha_tr1.parentNode.removeChild(_pub_captcha_tr1));(_pub_captcha_tr2)&&(_pub_captcha_tr2.parentNode.removeChild(_pub_captcha_tr2));message("popupinfo",Writer.geti18n("Email Sent successfully"),10000);email_send_button.disabled=false;toemail.value="";toemail.focus()}else{(_pub_captcha_tr1)&&(_pub_captcha_tr1.parentNode.removeChild(_pub_captcha_tr1));(_pub_captcha_tr2)&&(_pub_captcha_tr2.parentNode.removeChild(_pub_captcha_tr2));message("popuperror",Writer.geti18n("Email not Send successfully Please Try Later"),10000);email_send_button.disabled=false}}}}};xmlhttp.send(params)}document.pub_email.onsubmit=function(){submit();return false}};var topy=null;(is_ie)&&(topy=50);newDialog(loadjsp,null,null,load,"HelperDiv",null,topy)};PublicEmail.openSlider=function(B,A){var C=$(B);if(C&&C.style.display=="none"){if(!A){C.style.top="26%";C.style.left="10%";C.style.position="absolute"}advStartSlider(C,true,false,"none");if(!A){setTimeout(function(){C.style.overflow="auto"},400)}}};PublicEmail.exportCurrentDocument=function(G,D,C){if(D){var A=document.saveForm;A.hidHtml.value=Utils.getIframeContent("public_iframe");A.format.value=G;var E=PublicEmail.exportServerURL+"/PublicExport.im?tstamp="+Utils.getTimeStamp();if(G=="pdf"){E=PublicEmail.previewServerURL+"/PublicExport.im?tstamp="+Utils.getTimeStamp()}A.action=E;A.method="Post";A.enctype="multipart/form-data";A.target="_self";A.CONTENTTYPE="text/html; charset=UTF-8";A.submit()}else{if(Writer.publicEditor){var A=document.saveForm;A.hidHtml.value=Writer.editor._editor.getInnerHTML();A.format.value=G;if(Writer.isRemoteEditor||Writer.remoteDocEditor){if(Writer.currentDocInfo){A.hiddocId.value=Writer.currentDocInfo.DOCUMENT_ID;A.internalsave.value=Writer.remoteinternalsave;var B=Writer.remoteFileName;B=B.substring(0,B.lastIndexOf("."));A.hiddocName.value=B;A.users.value=Writer.seglockusers}}var E=PublicEmail.exportServerURL+"/PublicExport.im?tstamp="+Utils.getTimeStamp();if(G=="pdf"){E=PublicEmail.previewServerURL+"/PublicExport.im?tstamp="+Utils.getTimeStamp()}A.action=E;A.method="Post";A.enctype="multipart/form-data";if(G=="html"){A.target="_blank"}else{A.target="targetIframe"}A.CONTENTTYPE="text/html; charset=UTF-8";A.submit()}else{Writer.aftersave=function(){var H=(C)?Sidebar.getDocInfo(C):"";var I=(C)?H[0]:Writer.currentDocInfo;var K=document.exportForm;K.DOCUMENT_ID.value=I.DOCUMENT_ID;K.DOCUMENT_NAME.value=I.DOCUMENT_NAME;K.format.value=G;if(I.CATEGORY=="SHARED"||Writer.sharedEditmode){K.DOCUMENT_CONTENT.value=Writer.editor._editor.getInnerHTML();K.CLIENT_CONT_EXPORT.value="true";K.USERS.value=Writer.seglockusers}K.target="_self";K.action=PublicEmail.exportServerURL+"/ZExport.do?tstamp="+Utils.getTimeStamp();if(G=="pdf"){K.action=PublicEmail.previewServerURL+"/ZExport.do?tstamp="+Utils.getTimeStamp()}K.submit()};try{Writer.syncRequest=true;if(Writer.sharedEditMode){Writer.aftersave()}else{Save.save()}Writer.syncRequest=false}catch(F){Writer.syncRequest=false}}}};var oDialog,doc,closeOnEscKey=true,iframeIEHack;var dialogProperties=new Array("position","top","left","height","width","srcElement","modal","draggable","title","closeButton","closeOnEscKey","transitionType","transitionInterval","closeOnBodyClick");function showDialog(K,D,L,O,A){if(typeof (D)=="undefined"){var D="position=absmiddle"}D=D.split(",");var C;for(var H=0;H<dialogProperties.length;H++){C=false;for(var G=0;G<D.length;G++){if(D[G].indexOf(dialogProperties[H])>=0){C=true;break}}self["dialog_"+dialogProperties[H]]=(C)?D[G].substr(D[G].indexOf("=")+1,D[G].length).trim():"undefined"}if(document.getElementById(L)==null){oDialog=document.createElement("DIV");oDialog.id=L;document.body.appendChild(oDialog)}else{oDialog=document.getElementById(L)}var K='<div id="_DIALOG_CONTENT">'+K+"</div>";var I='<table class="DialogBox" border="0" cellspacing="0" cellpadding="0"><tr><td class="boxTL">&nbsp;</td>';if(dialog_draggable!="undefined"&&dialog_draggable=="no"){I+='<td class="boxHeader">'}else{I+='<td class="boxHeader drag" onMouseDown="captureDialog(event)">'}if(dialog_title!="undefined"){if(dialog_title.charAt(0)=="'"&&dialog_title.charAt(dialog_title.length-1)=="'"){dialog_title=dialog_title.substr(1,dialog_title.length-2)}if(dialog_title.trim().length==0){dialog_title="&nbsp;"}}else{dialog_title="&nbsp;"}I+=dialog_title+'</td><td class="boxCtrlButtonPane">';if(dialog_closeButton!="undefined"&&dialog_closeButton=="no"){I+="&nbsp;</td>"}else{I+='<input type="button" class="closeButton" onClick="closeDialog()"></td>'}I+='<td class="boxTR">&nbsp;</td></tr><tr><td colspan="4" class="boxContent">'+K+"</td></tr>";I+='<tr><td class="boxBL"></td><td class="boxBC" colspan="2"></td><td class="boxBR"></td></tr></table>';oDialog.style.display="";var F=true;if(dialog_closeButton!="undefined"){if(dialog_title=="&nbsp;"&&dialog_closeButton=="no"){F=false}}oDialog.innerHTML="<table cellpadding='0' cellspacing='0'><tr><td height='100%' style='display:block'>"+K+"</td></tr></table>";_Dcont=document.getElementById("_DIALOG_CONTENT");if(_Dcont.innerHTML==""){_Dcont.appendChild(O);O.style.display="block"}oDialog.style.position="absolute";oDialog.style.left="-1000px";oDialog.style.top="-1000px";oDialog.style.zIndex="100";if(dialog_width!="undefined"){if(is_ie){oDialog.childNodes[0].style.width=parseInt(dialog_width)+"px"}else{if(is_nn4||is_nn6){oDialog.childNodes.item(0).style.width=parseInt(dialog_width)+"px"}}}if(dialog_height!="undefined"){if(is_ie){oDialog.childNodes[0].style.height=parseInt(dialog_height)+"px"}else{if(is_nn4||is_nn6){oDialog.childNodes.item(0).style.height=parseInt(dialog_height)+"px"}}}oDialogContent=document.getElementById("_DIALOG_CONTENT");var E=0,M=0;if(is_opera){if(dialog_width!="undefined"){oDialogContent.style.width=parseInt(dialog_width)+"px"}else{oDialogContent.style.width=oDialogContent.offsetWidth+"px";oDialog.style.width=oDialogContent.offsetWidth+"px"}}if(is_nn4||is_nn6){if(dialog_width!="undefined"){oDialogContent.style.width=parseInt(dialog_width)+"px"}else{oDialogContent.style.width=(oDialogContent.offsetWidth+20)+"px"}}if(dialog_height!="undefined"){if(is_ie&&(parseInt(dialog_height)<oDialogContent.offsetHeight)){E=-15}oDialogContent.style.height=parseInt(dialog_height)+"px"}oDialogContent.style.overflow="auto";var B=oDialog.offsetWidth;var N=oDialog.offsetHeight;doc=Utils.findDocDim();if(dialog_closeOnEscKey!="undefined"&&dialog_closeOnEscKey=="no"){closeOnEscKey=false}else{closeOnEscKey=true}if(!is_opera){if(dialog_modal!="undefined"&&dialog_modal=="yes"){freezeBackground()}else{if(document.getElementById("FreezeLayer")!=null){document.body.removeChild(document.getElementById("FreezeLayer"))}}}if(dialog_srcElement!="undefined"){srcElement=getObj(dialog_srcElement)}else{if(srcElement=="undefined"){srcElement=document.body}}if(dialog_left!="undefined"){E+=parseInt(dialog_left)}if(dialog_top!="undefined"){M+=parseInt(dialog_top)}if(dialog_position!="undefined"&&dialog_position=="relative"){E+=Utils.findPosX(srcElement)+((srcElement.offsetWidth)?srcElement.offsetWidth:0)-B;M+=Utils.findPosY(srcElement)+((srcElement.offsetHeight)?srcElement.offsetHeight:0)+2}else{if(dialog_position!="undefined"&&dialog_position=="absolute"){E+=document.body.scrollLeft;M+=document.body.scrollTop}else{E=(doc.width/2)-(B/2)+document.body.scrollLeft;M=(doc.height/2)-(N/2)+document.body.scrollTop}}if(dialog_transitionType!="undefined"){if(dialog_transitionInterval=="undefined"){dialog_transitionInterval=10}Effect.init({type:dialog_transitionType,speed:dialog_transitionInterval,layerId:L,layerTop:M,layerLeft:E});Effect.display()}else{oDialog.style.left=E+"px";oDialog.style.top=M+"px"}scrollEnd=(N-(doc.height-(M-document.body.scrollTop)))+scrollConst;if(scrollEnd>0){cnt=0;scrollInterval=setInterval("scrollPage()",7)}if(dialog_closeOnBodyClick=="yes"){if(is_ie){window.event.cancelBubble=true}else{if(is_nn6){A.stopPropagation()}}document.onclick=closeDialog}return false}function freezeBackground(){if(typeof Toolbar!=="undefined"){Toolbar.closeNavMenu()}var A=document.getElementById("FreezeLayer");if(A){A.style.display="";return }var D=document.createElement("DIV");document.body.appendChild(D);D.id="FreezeLayer";D.className="freezeLayer";if(is_ie&&typeof (J)!="undefined"&&J.browser.version!="7.0"){var C=document.createElement("iframe");C.src="/images/spacer.gif";C.frameBorder="no";C.scrolling="no";var B=C.style;B.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";B.position="absolute";B.backgroundColor="transparent";B.left="0px";B.top="0px";B.width="100%";B.height="100%";D.appendChild(C)}}var diffLeft=0,diffTop=0;function captureDialog(B,A){if(!oDialog){oDialog=$(A)}oDialog.style.cursor="move";if(is_ie){diffLeft=window.event.clientX+document.body.scrollLeft-parseInt(Utils.findPosX(oDialog));diffTop=window.event.clientY+document.body.scrollTop-parseInt(Utils.findPosY(oDialog))}else{if(is_nn4||is_nn6){diffLeft=B.pageX-parseInt(Utils.findPosX(oDialog));diffTop=B.pageY-parseInt(Utils.findPosY(oDialog))}}document.onmousemove=moveDialog;document.onmouseup=releaseDialog}function moveDialog(A){if(is_ie){if(document.getElementById("FreezeLayer")!=null||is_opera){oDialog.style.left=(window.event.clientX+document.body.scrollLeft-diffLeft)+"px";oDialog.style.top=(window.event.clientY+document.body.scrollTop-diffTop)+"px"}else{oDialog.style.left=(window.event.clientX+document.body.scrollLeft-diffLeft)+"px";oDialog.style.top=(window.event.clientY+document.body.scrollTop-diffTop)+"px"}}else{if(is_nn4||is_nn6){oDialog.style.left=(A.pageX-diffLeft)+"px";oDialog.style.top=(A.pageY-diffTop)+"px"}}}function releaseDialog(){oDialog.style.cursor="default";document.onmousemove=null;document.onmouseup=null}function closeDialog(A){if(document.getElementById(A)){divid=document.getElementById(A)}else{A="HelperDiv1";divid=document.getElementById(A)}if(A=="HelperDiv"){if(document.getElementById("HelperDiv1")){hd=document.getElementById("HelperDiv1");document.body.removeChild(hd)}}document.body.removeChild(divid);removeFreezeBackground();if(typeof aftercloseDialog=="function"){aftercloseDialog();aftercloseDialog=undefined}}function removeFreezeBackground(){var A=document.getElementById("FreezeLayer");if(A){A.style.display="none"}}document.onkeydown=function(A){divid=document.getElementById("HelperDiv1");if(!divid||divid.className=="hide"){divid=document.getElementById("HelperDiv")}if(is_ie){var B=window.event.keyCode}else{if(is_nn4||is_nn6){var B=A.which}}if(B==27&&closeOnEscKey==true){Utils.hideDiv("slidediv");if(divid&&divid.id){closeDialog(divid.id)}}};var scrollEnd=0,cnt=0;function scrollPage(){if(cnt<=scrollEnd){document.body.scrollTop+=10;cnt+=10}else{scrollEnd=cnt=0;if(!scrollInterval){scrollInterval=10}clearInterval(scrollInterval)}}var scrollConst=0;if(is_nn4||is_nn6){scrollConst=125}var scrX=0,scrY=0,pgeX=0,pgeY=0,srcElement;if(is_ie){document.attachEvent("onclick",popUpListener)}else{if(is_nn4||is_nn6){document.addEventListener("click",popUpListener,true)}}function popUpListener(A){if(is_ie){srcElement=window.event.srcElement}else{if(is_nn4||is_nn6){srcElement=A.target;scrX=A.screenX;scrY=A.screenY;pgeX=A.pageX;pgeY=A.pageY}}}function getObj(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=getObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)}return A};
