var isNav6=false;var isNav4=false;var isIE4=false;function showMenu(_1){_1=splitParentEle(_1);if(getIdProperty(_1,"display")!="block"){setIdProperty(_1,"display","block");}else{setIdProperty(_1,"display","none");}}function SetSelectedTab(_2){document.getElementById(_2).parentNode.className="current";}function splitParentEle(_3){var _4=_3.substr((_3.indexOf("-")-1),1);switch(_4){case ("t"):return "s"+_3.substr((_3.indexOf("-")+1),(_3.length-12));break;case ("r"):setIdProperty("r"+_3.substr((_3.indexOf("-")+1),_3.length),"background","#ffffff");setIdProperty("r"+_3.substr((_3.indexOf("-")+1),_3.length),"border","1px solid #eee");setIdProperty("r"+_3.substr((_3.indexOf("-")+1),_3.length),"padding","5px");return "r"+_3.substr((_3.indexOf("-")+1),_3.length);break;case ("c"):return "c"+_3.substr((_3.indexOf("-")+1),_3.length);break;default:return "s"+_3.substr((_3.indexOf("-")+1),(_3.length-12));break;}}function findBrowser(){if(navigator.appVersion.charAt(0)=="4"){if(navigator.appName.indexOf("Explorer")>=0){isIE4=true;}else{isNav4=true;}}else{if(navigator.appVersion.charAt(0)>"4"){isNav6=true;}}}function getIdProperty(id,_6){if(isNav6){var _7=document.getElementById(id);if(_7!=null){_7=_7.style;if(_7[_6]){return _7[_6];}}_7=getStyleBySelector("#"+id);return (_7!=null)?_7[_6]:null;}else{if(isNav4){return document[id][_6];}else{return document.all[id].style[_6];}}}function getStyleBySelector(_8){if(!isNav6){return null;}var _9=document.styleSheets;var _a;var i,j;for(i=_9.length-1;i>=0;i--){_a=_9[i].cssRules;for(j=0;j<_a.length;j++){if(_a[j].type==CSSRule.STYLE_RULE&&_a[j].selectorText==_8){return _a[j].style;}}}return null;}function setIdProperty(id,_d,_e){if(isNav6){var _f=document.getElementById(id);if(_f!=null){_f=_f.style;_f[_d]=_e;}}else{if(isNav4){document[id][_d]=_e;}else{if(isIE4){document.all[id].style[_d]=_e;}}}}function genericMove(id,_11,_12,_13){var _14=getIdProperty(id,"left");var top=getIdProperty(id,"top");var _16,topMatch;if(isNav4){_16=new Array(0,_14,"");topMatch=new Array(0,top,"");}else{if(isNav6||isIE4){var _17=/([-0-9.]+)(\w+)/;_16=_17.exec(_14);topMatch=_17.exec(top);if(_16==null||topMatch==null){_16=new Array(0,0,"px");topMatch=new Array(0,0,"px");}}}_14=((_13)?parseFloat(_16[1]):0)+_11;top=((_13)?parseFloat(topMatch[1]):0)+_12;setIdProperty(id,"left",_14+_16[2]);setIdProperty(id,"top",top+topMatch[2]);}function moveTo(id,x,y){genericMove(id,x,y,false);}function moveBy(id,x,y){genericMove(id,x,y,true);}function hex(n){var _1f="0123456789abcdef";return (_1f.charAt(n>>4)+_1f.charAt(n&15));}function getBackgroundColour(id){var _21;if(isNav4){_21=document[id].bgColor;}else{if(isNav6){var _22=/rgb.(\d+),(\d+),(\d+)./;var _23;_21=getIdProperty(id,"backgroundColor");if(_21){_23=_22.exec(_21);if(_23){_21="#"+hex(_23[1])+hex(_23[2])+hex(_23[3]);}}return _21;}else{if(isIE4){return document.all[id].backgroundColor;}}}return "";}function getDocument(_24){var doc;if(isNav4){doc=window.document[_24].document;}else{if(isNav6){doc=document;}else{if(isIE4){doc=document;}}}return doc;}function disableMyBox(_26,_27,_28){var _29;var doc;var _2b;if(_28==1){_29="document";}else{if(_28==3){_29="all items";}else{_29="staff contact";}}doc=document.getElementById(_26);_2b=document.getElementById("block-box-item-count");if(_2b.innerHTML!=null){if(_2b.innerHTML==""){_2b.innerHTML=1;}else{_2b.innerHTML=parseInt(_2b.innerHTML)+1;if(_2b.innerHTML!="1"){_29=_29+"(s)";}}}if(document.Form1!=null){if(_27==0){doc.innerHTML="<p style=\"margin: 10px;\">You have just removed <strong><span id=\"block-box-item-count\">"+_2b.innerHTML+"</span> "+_29+"</strong> from 'My Box'<br /><br />Show me a list of all items in 'My Box': &nbsp;<a href=\"javascript:document.Form1.submit()\"><img class=\"my-box-select\" src=\"/images/reload.gif\"></a></p>";}else{if(_27==1){doc.innerHTML="<p style=\"margin: 10px;\">You have just added <strong><span id=\"block-box-item-count\">"+_2b.innerHTML+"</span> new "+_29+"</strong> to 'My Box'<br /><br />Show me a list of all items in 'My Box': &nbsp;<a href=\"javascript:document.Form1.submit()\"><img class=\"my-box-select\" src=\"/images/reload.gif\"></a></p>";}else{if(_27==2){doc.innerHTML="<p style=\"margin: 10px;\">You have just removed <strong>"+_29+"</strong> from 'My Box'<br /><br /><strong>'My Box'</strong> is now completely empty</p><span id=\"block-box-item-count\"></span>";}}}}else{if(_27==0){doc.innerHTML="<p style=\"margin: 10px;\">You have just removed <strong><span id=\"block-box-item-count\">"+_2b.innerHTML+"</span> "+_29+"</strong> from 'My Box'<br /><br />Show me a list of all items in 'My Box': &nbsp;<a href=\"javascript:window.location.reload()\"><img class=\"my-box-select\" src=\"/images/reload.gif\"></a></p>";}else{if(_27==1){doc.innerHTML="<p style=\"margin: 10px;\">You have just added <strong><span id=\"block-box-item-count\">"+_2b.innerHTML+"</span> new "+_29+"</strong> to 'My Box'<br /><br />Show me a list of all items in 'My Box': &nbsp;<a href=\"javascript:window.location.reload()\"><img class=\"my-box-select\" src=\"/images/reload.gif\"></a></p>";}else{if(_27==2){doc.innerHTML="<p style=\"margin: 10px;\">You have just removed <strong>"+_29+"</strong> from 'My Box'<br /><br /><strong>'My Box'</strong> is now completely empty</p><span id=\"block-box-item-count\"></span>";}}}}}function writeMyBoxLink(_2c,_2d,_2e){_2d=_2d.replace("'","\\'");if(window.name!="window1"){document.write("          <img src=\"/images/mybox.gif\" ");document.write("          onClick=\"javascript:window.open('/MyBox.aspx?key=staff&amp;id="+_2c+"&amp;name="+_2d+"','mywindow','width=5,height=5')&#059;javascript:disableMyBox('myBox-content',1,2)\" title=\"add '"+_2d+"' as a contact to 'My Box'\" style='cursor:pointer'  />");if(_2e==1){document.write(" Add to 'My Box'<br />");}}}