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 activeButton=null;var req;if(browser.isIE){document.onmousedown=pageMousedown}else{document.addEventListener("mousedown",pageMousedown,true)}function pageMousedown(b){var a;if(activeButton==null){return}if(browser.isIE){a=window.event.srcElement}else{a=(b.target.tagName?b.target:b.target.parentNode)}if(a==activeButton){return}if(getContainerWith(a,"DIV","menu")==null){resetButton(activeButton);activeButton=null}}function buttonClick(b){var a=getObjectById("button_"+b);a.blur();if(a.menu==null){a.menu=getObjectById(b);if(a.menu.isInitialized==null){menuInit(a.menu)}}if(activeButton!=null){resetButton(activeButton)}if(a!=activeButton){depressButton(a);activeButton=a}else{activeButton=null}}function buttonMouseover(b,c){var a;if(browser.isIE){a=window.event.srcElement}else{a=b.currentTarget}if(activeButton!=null&&activeButton!=a){buttonClick(c)}}function depressButton(b){var a,c;b.className+=" menuButtonActive";a=getPageOffsetLeft(b);c=getPageOffsetTop(b)+b.offsetHeight-5;if(browser.isIE){a+=b.offsetParent.clientLeft;c+=b.offsetParent.clientTop}b.menu.style.left=a+"px";b.menu.style.top=c+"px";b.menu.style.visibility="visible"}function resetButton(a){removeClassName(a,"menuButtonActive");if(a.menu!=null){closeSubMenu(a.menu);a.menu.style.visibility="hidden"}}function menuMouseover(a){var b;if(browser.isIE){b=getContainerWith(window.event.srcElement,"DIV","menu")}else{b=a.currentTarget}if(b.activeItem!=null){closeSubMenu(b)}}function menuItemMouseover(c,h){var b,f,a,g;if(browser.isIE){b=getContainerWith(window.event.srcElement,"A","menuItem")}else{b=c.currentTarget}f=getContainerWith(b,"DIV","menu");if(f.activeItem!=null){closeSubMenu(f)}f.activeItem=b;b.className+=" menuItemHighlight";if(b.subMenu==null){b.subMenu=document.getElementById(h);if(b.subMenu.isInitialized==null){menuInit(b.subMenu)}}a=getPageOffsetLeft(b)+b.offsetWidth;g=getPageOffsetTop(b);var e,d;if(browser.isNS){e=window.scrollX+window.innerWidth;d=window.scrollY+window.innerHeight}if(browser.isIE){e=(document.documentElement.scrollLeft!=0?document.documentElement.scrollLeft:document.body.scrollLeft)+(document.documentElement.clientWidth!=0?document.documentElement.clientWidth:document.body.clientWidth);d=(document.documentElement.scrollTop!=0?document.documentElement.scrollTop:document.body.scrollTop)+(document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.body.clientHeight)}e-=b.subMenu.offsetWidth;d-=b.subMenu.offsetHeight;if(a>e){a=Math.max(0,a-b.offsetWidth-b.subMenu.offsetWidth+(f.offsetWidth-b.offsetWidth))}g=Math.max(0,Math.min(g,d));b.subMenu.style.left=a+"px";b.subMenu.style.top=g+"px";b.subMenu.style.visibility="visible";if(browser.isIE){window.event.cancelBubble=true}else{c.stopPropagation()}}function closeSubMenu(a){if(a==null||a.activeItem==null){return}if(a.activeItem.subMenu!=null){closeSubMenu(a.activeItem.subMenu);a.activeItem.subMenu.style.visibility="hidden";a.activeItem.subMenu=null}removeClassName(a.activeItem,"menuItemHighlight");a.activeItem=null}function menuInit(c){var f,b;var l,k;var g;var h,a;var e,d;if(browser.isIE){c.style.lineHeight="2.5ex";b=c.getElementsByTagName("SPAN");for(e=0;e<b.length;e++){if(hasClassName(b[e],"menuItemArrow")){b[e].style.fontFamily="Webdings";b[e].firstChild.nodeValue="4"}}}f=c.getElementsByTagName("A");if(f.length>0){g=f[0].offsetWidth}else{return}for(e=0;e<f.length;e++){b=f[e].getElementsByTagName("SPAN");l=null;k=null;for(d=0;d<b.length;d++){if(hasClassName(b[d],"menuItemText")){l=b[d]}if(hasClassName(b[d],"menuItemArrow")){k=b[d]}}if(l!=null&&k!=null){l.style.paddingRight=(g-(l.offsetWidth+k.offsetWidth))+"px"}}if(browser.isIE){h=f[0].offsetWidth;f[0].style.width=h+"px";a=f[0].offsetWidth-h;h-=a;f[0].style.width=h+"px"}c.isInitialized=true}function getContainerWith(c,a,b){while(c!=null){if(c.tagName!=null&&c.tagName==a&&hasClassName(c,b)){return c}c=c.parentNode}return c}function hasClassName(c,a){var b,d;d=c.className.split(" ");for(b=0;b<d.length;b++){if(d[b]==a){return true}}return false}function removeClassName(e,b){var c,f,d;if(e.className==null){return}d=new Array();f=e.className.split(" ");for(c=0;c<f.length;c++){if(f[c]!=b){var a=new Array(f[c]);d.concat(a)}}e.className=d.join(" ")}function getPageOffsetLeft(b){var a;a=b.offsetLeft;if(b.offsetParent!=null){a+=getPageOffsetLeft(b.offsetParent)}return a}function getPageOffsetTop(a){var b;b=a.offsetTop;if(a.offsetParent!=null){b+=getPageOffsetTop(a.offsetParent)}return b}function checkBrowser(){this.ver=navigator.appVersion;this.dom=document.getElementById?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1&&this.dom)?1:0;this.ie55=((this.ver.indexOf("MSIE 5.5")>-1||this.ie6)&&this.dom)?1:0;this.ie5=((this.ver.indexOf("MSIE 5")>-1||this.ie5||this.ie6)&&this.dom)?1:0;this.ie4=(document.all&&!this.dom)?1:0;this.ns5=(this.dom&&parseInt(this.ver)>=5)?1:0;this.ns4=(document.layers&&!this.dom)?1:0;this.ie4plus=(this.ie6||this.ie5||this.ie4);this.ie5plus=(this.ie6||this.ie5);this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns5);return this}bw=new checkBrowser();function getObjectById(a){var b;if(bw.dom){return document.getElementById(a)}else{if(bw.ie4){return document.all(a)}else{alert("Error: Your browser version is not supported. Please upgrade...")}}return null}function getNodeValues(d,f){var a="<"+f+">";var e=d.indexOf(a);var b=d.indexOf("</"+f+">");if(e<b){var c=d.substring(e+a.length,b);return c.split(";;")}else{return new Array(0)}}function getNodeValue(c,e){var a="<"+e+">";var d=c.indexOf(a);var b=c.indexOf("</"+e+">");if(d<b){return c.substring(d+a.length,b)}else{return null}}function getActionMenu(d,c,l,j,k,h,i){document.body.style.cursor="wait";try{var a="POST";var f="key="+l+"&type="+c+"&def="+j+"&parent="+k+"&domid="+i+"&params=/op/edit/pid/"+h;var b=d+"/ajaxaction/GetMenuItems";if(a=="GET"){b+="?"+f;f=null}if(window.XMLHttpRequest){req=new XMLHttpRequest()}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("Error: Your Browser does not support XMLHTTPRequests, please upgrade...");return}}req.open(a,b,true);req.onreadystatechange=function(){buildActionMenu()};if(a=="POST"){req.setRequestHeader("Content-type","application/x-www-form-urlencoded")}req.send(f)}catch(g){alert("Exception sending the Request: "+g)}}function buildActionMenu(){var c=req.readyState;if(req.readyState==4){if(req.status==200){try{var f=req.responseText;var i=getNodeValue(f,"domid");var d=getNodeValues(f,"method");var g=getNodeValues(f,"launcher");var b=getNodeValues(f,"image");var a=getNodeValue(f,"fieldset");updateFieldSet(i,a);addActions(i,d,g,b);buttonClick(i)}catch(h){alert("Exception building Action Menu: "+h)}}else{alert("There was a problem processing the request. Status: "+req.status+", msg: "+req.statusText)}document.body.style.cursor="default"}}function updateFieldSet(e,d){if(d==null){return}var b="fieldset_"+e;var a=getObjectById(b);var c;if(d=="complete"){c="completeLocked"}else{if(d=="partial"){c="partialLocked"}else{return}}a.className=c}function changeURL(b){var a=getObjectById("button_"+b);a.href="javascript:buttonClick('"+b+"');"}function addActions(h,b,c,a){var f=getObjectById(h);var e="\n";var d;for(d=0;d<b.length-1;d++){if(b[d]=="copies"){var g=c[d].split(",");p=false;if(g.length>1){p=g[1]}e+='<a class="menuItem" href="'+g[3]+'" title="id:'+g[0]+'"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+g[2]+"</i></a>"}else{e+=printLauncher(c[d])+printImage(a[d])+printMethod(b[d])}}f.innerHTML=e}function printLauncher(a){return'   <a class="menuItem" href="javascript:'+a+'">\n'}function printImage(a){return'      <img src="'+a+'" alt="" border="0" />&nbsp;'}function printMethod(a){return a+"\n   </a>\n"}function clipboard(d,c,i,a){document.body.style.cursor="wait";try{var h="POST";var f="key="+c+"&cop="+i;var b=jahiaMainServletPath+"/op/edit/engineName/clipboard/pid/"+a;if(h=="GET"){b+="?"+f;f=null}if(window.XMLHttpRequest){req=new XMLHttpRequest()}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("Error: Your Browser does not support XMLHTTPRequests, please upgrade...");return}}req.open(h,b,true);if(i=="paste"){req.onreadystatechange=function(){if(req.readyState==4){document.body.style.cursor="default";window.location.reload()}}}else{req.onreadystatechange=function(){if(req.readyState==4){window.location.reload()}}}if(h=="POST"){req.setRequestHeader("Content-type","application/x-www-form-urlencoded")}req.send(f)}catch(g){alert("Exception sending the Request: "+g)}}function getWorkflowState(d,c,a){try{var h="POST";var f="key="+c+"&params=/op/edit/pid/"+a;var b=d+"/ajaxaction/GetWorkflowState";if(h=="GET"){b+="?"+f;f=null}if(window.XMLHttpRequest){req=new XMLHttpRequest()}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("Error: Your Browser does not support XMLHTTPRequests, please upgrade...");return}}req.open(h,b,true);req.onreadystatechange=function(){changeIcone()};if(h=="POST"){req.setRequestHeader("Content-type","application/x-www-form-urlencoded")}req.send(f)}catch(g){alert("Exception sending the Request: "+g)}}function changeIcone(){var a=req.readyState;if(req.readyState==4){if(req.status==200){try{var b=req.responseText;var c=getNodeValue(b,"key");var f=getNodeValue(b,"stateIcone");var d=getObjectById("img_"+c);d.src=f}catch(g){alert("Exception changing Icone: "+g)}}else{alert("There was a problem processing the request. Status: "+req.status+", msg: "+req.statusText)}}}function openMail(){};