var gCanvas_MIN_WIDTH=7;var gCanvas_MAX_WIDTH=805;var gCanvas_MIN_HEIGHT=115;var gCanvas_MAX_HEIGHT=638;var HEARTBEAT_FREQUENCY=180000;var ie=false;function checkSpChars(C){var B="!@#$%^&*()+=-[]\\';,./{}|\":<>?";for(var A=0;A<C.length;A++){if(B.indexOf(C.charAt(A))!=-1){return false}}return true}function checkAsciiChars(A){for(i=0;i<A.length;i++){if(A.charCodeAt(i)>127){return false}}return true}function trimString(A){A=this!=window?this:A;return A.replace(/^\s+/g,"").replace(/\s+$/g,"")}String.prototype.trim=trimString;var msgWindow=null;function openEditor1(C){var D=screen.width;var B=screen.height;var A="toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width="+D+",height="+B;msgWindow=window.open(C,"abcd",A)}function launchEditor(B,A){if(B==0){javascript:openEditor1("catalog_create_mode.htm")}else{javascript:openEditor1("edit_catalog.jsp?id="+A)}}function removePX(A){return A.substring(0,A.length-2)}function removeServerUrl(B){var A=B.split(SERVER_PATH);return A[1]}function preloadImages(C){var E=C.split(",");var A=new Array();for(var B=0;B<E.length;B++){var D=A.length;A[D]=new Image;A[D].src=E[B]}}var interruptCount=0;var INTERRUPT_DEFAULT=0;var INTERRUPT_ERROR=1;var interruptIcons=new Array();interruptIcons[INTERRUPT_DEFAULT]="";interruptIcons[INTERRUPT_ERROR]='<img src="images/error.jpg class="nobackimage"">&nbsp;';var interruptColor=new Array();interruptColor[INTERRUPT_DEFAULT]="#ffffff";interruptColor[INTERRUPT_ERROR]="#ff0000";function setInterrupt(C,B,A){}function pausecomp(C){date=new Date();var B=null;do{var B=new Date()}while(B-date<C);var A=0}function getCanvasBgColor(){if(document.getElementById("canvasBG")==null){return"#ffffff"}else{var A="canvasBG";var B="";if(document.getElementById(A).currentStyle){B=document.getElementById(A).currentStyle["backgroundColor"];if(B=="transparent"){return B}if(B.indexOf("rgb")>-1){B=B.substring(B.indexOf("rgb(")+4,B.indexOf(")"));var C=B.split(",");B="#"+numToHex(parseInt(C[0]))+numToHex(parseInt(C[1]))+numToHex(parseInt(C[2]))}}else{if(window.getComputedStyle){var D=window.getComputedStyle(document.getElementById(A),"");B=D.getPropertyValue("background-color");if(B=="transparent"){return B}B=B.substring(B.indexOf("rgb(")+4,B.indexOf(")"));var C=B.split(",");B="#"+numToHex(parseInt(C[0]))+numToHex(parseInt(C[1]))+numToHex(parseInt(C[2]))}}return B}}function setTimeoutX(B,A){setTimeout(B,A)}var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");function getMonthStr(A){var B=monthname[A];return B}function translateCrlfToBr(A){A=A.replace(/&#13;&#10;/g,"<br>");return A}function translateCrToBr(A){A=A.replace(/\r\n/g,"<br>");return A}function cursor_wait(){document.body.style.cursor="wait"}function cursor_clear(){document.body.style.cursor="default"}function removeImageBackgroundOnLoad(B,A){if(!ie){if(B){if((B.target.className=="loadBg4View")&&(viewer)){B.target.className="nobackimage"}else{if(!viewer){B.target.className="loadBg4View"}}if(edit){B.target.className="loadBg4View"}}else{if(document.getElementById(A)){document.getElementById(A).className="nobackimage"}else{if(A){A.className="nobackimage"}}}}else{if((window.event.srcElement.className=="loadBg4View")&&(viewer)){window.event.srcElement.className="nobackimage"}else{if(!viewer){window.event.srcElement.className="loadBg4View"}}if(edit){window.event.srcElement.parentNode.style.borderColor=getContrastColor(getCanvasBgColor())}}}function removeImageBackground4Create(A){if(document.getElementById(A)!=null&&ie){if(document.getElementById(A).readyState=="complete"){if(viewer){document.getElementById(A).className="nobackimage"}else{document.getElementById(A).className="loadBg4View"}}else{setTimeout(function(){removeImageBackground4Create(A)},1000)}}else{if(document.getElementById(A)!=null){document.getElementById(A).className="loadBg4View"}}}function heartbeat(){var A=new Date();var C=A.getTime();var B="nocache="+C;fetchData("jsp/zimo/heartbeat.jsp?"+B,callHeartBeat)}function callHeartBeat(A){setTimeout(function(){heartbeat()},HEARTBEAT_FREQUENCY)}function getElementsByClassName(B,F,A){var E=(F=="*"&&B.all)?B.all:B.getElementsByTagName(F);var H=new Array();A=A.replace(/-/g,"-");var G=new RegExp(A);var D;for(var C=0;C<E.length;C++){D=E[C];if(G.test(D.className)){H.push(D)}}return(H)}function findPos(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return[B,curtop]}function formatTimeStampToDate(A){var F=new Date();F.setTime(A);var G=F.getHours();if(G<12){a_p="AM"}else{a_p="PM"}if(G==0){G=12}if(G>12){G=G-12}var C=F.getMinutes();C=C+"";if(C.length==1){C="0"+C}var B=F.getDate();var E=getMonthStr(F.getMonth());var D=F.getYear()-100;if(D<10){D="0"+D}return B+"-"+E+" "+D+", "+G+" : "+C+" "+a_p}function openInNewBigWindow(A){var B=window.open(A,"","scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no")}function divFx(C,A){var D=Windows.focusedWindow;if(D!=null){D.close()}if(dd.ie){var B=document.getElementById("inp_title");if(B!=null){document.getElementById("inp_title").focus()}}}var DIVFX_SHOW_CENTER=0;var DIVFX_CLOSE_FADE=1;var DIVFX_SHOW_SLIDE=2;function findPosX(A){var B=0;if(A.offsetParent){while(1){B+=A.offsetLeft;if(!A.offsetParent){break}A=A.offsetParent}}else{if(A.x){B+=A.x}}return B}function findPosY(B){var A=0;if(B.offsetParent){while(1){A+=B.offsetTop;if(!B.offsetParent){break}B=B.offsetParent}}else{if(B.y){A+=B.y}}return A}