var uniquepageid=window.location.href.replace("http://"+window.location.hostname,"").replace(/^\//,"");function animatedcollapse3(c,f,e,g){this.divId=c;this.divObj=document.getElementById(c);this.divObj.style.overflow="hidden";this.timelength=f;this.initstate=(typeof g!="undefined"&&g=="block")?"block":"contract";this.isExpanded=animatedcollapse3.getCookie(uniquepageid+"-"+c);this.contentheight=parseInt(this.divObj.style.height);var d=this;if(isNaN(this.contentheight)){animatedcollapse3.dotask(window,function(){d._getheight(e)},"load");if(!e&&this.initstate=="contract"||e&&this.isExpanded!="yes"&&this.isExpanded!=""){this.divObj.style.visibility="hidden"}}else{if(!e&&this.initstate=="contract"||e&&this.isExpanded!="yes"&&this.isExpanded!=""){this.divObj.style.height=0}}if(e){animatedcollapse3.dotask(window,function(){animatedcollapse3.setCookie(uniquepageid+"-"+d.divId,d.isExpanded)},"unload")}}animatedcollapse3.prototype._getheight=function(c){this.contentheight=this.divObj.offsetHeight;if(!c&&this.initstate=="contract"||c&&this.isExpanded!="yes"){this.divObj.style.height=0;this.divObj.style.visibility="visible"}else{this.divObj.style.height=this.contentheight+"px"}};animatedcollapse3.prototype._slideengine=function(f){var d=new Date().getTime()-this.startTime;var e=this;if(d<this.timelength){var c=(f=="down")?animatedcollapse3.curveincrement(d/this.timelength):1-animatedcollapse3.curveincrement(d/this.timelength);this.divObj.style.height=c*this.contentheight+"px";this.runtimer=setTimeout(function(){e._slideengine(f)},10)}else{this.divObj.style.height=(f=="down")?this.contentheight+"px":0;this.isExpanded=(f=="down")?"yes":"no";this.runtimer=null}};animatedcollapse3.prototype.slidedown=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null){if(isNaN(this.contentheight)){alert("Please wait until document has fully loaded then click again")}else{if(parseInt(this.divObj.style.height)==0){this.startTime=new Date().getTime();this._slideengine("down")}}}};animatedcollapse3.prototype.slideup=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null){if(isNaN(this.contentheight)){alert("Please wait until document has fully loaded then click again")}else{if(parseInt(this.divObj.style.height)==this.contentheight){this.startTime=new Date().getTime();this._slideengine("up")}}}};animatedcollapse3.prototype.slideit=function(){if(isNaN(this.contentheight)){alert("Please wait until document has fully loaded then click again")}else{if(parseInt(this.divObj.style.height)==0){this.slidedown()}else{if(parseInt(this.divObj.style.height)==this.contentheight){this.slideup()}}}};animatedcollapse3.curveincrement=function(c){return(1-Math.cos(c*Math.PI))/2};animatedcollapse3.dotask=function(d,e,c){var c=(window.addEventListener)?c:"on"+c;if(d.addEventListener){d.addEventListener(c,e,false)}else{if(d.attachEvent){d.attachEvent(c,e)}}};animatedcollapse3.getCookie=function(c){var d=new RegExp(c+"=[^;]+","i");if(document.cookie.match(d)){return document.cookie.match(d)[0].split("=")[1]}return""};animatedcollapse3.setCookie=function(c,d){document.cookie=c+"="+d};function NiftyCheck(){if(!document.getElementById||!document.createElement){return(false)}var c=navigator.userAgent.toLowerCase();if(c.indexOf("msie 5")>0&&c.indexOf("opera")==-1){return(false)}return(true)}function Rounded(d,c,g,j){var h;var f=getElementsBySelector(d);var e=f.length;for(h=0;h<e;h++){AddTop(f[h],c,g,j);AddBottom(f[h],c,g,j)}}function RoundedTop(d,c,f,h){var g;var e=getElementsBySelector(d);for(g=0;g<e.length;g++){AddTop(e[g],c,f,h)}}function RoundedBottom(d,c,f,h){var g;var e=getElementsBySelector(d);for(g=0;g<e.length;g++){AddBottom(e[g],c,f,h)}}function AddTop(c,f,g,m){var h;var j=document.createElement("b");var l="r";var e=4;if(m&&m=="small"){l="rs";e=2}j.className="rtop";j.style.backgroundColor=f;for(h=1;h<=e;h++){var k=document.createElement("b");k.className=l+h;k.style.backgroundColor=g;j.appendChild(k)}c.insertBefore(j,c.firstChild)}function AddBottom(c,f,g,m){var h;var j=document.createElement("b");var l="r";var e=4;if(m&&m=="small"){l="rs";e=2}j.className="rbottom";j.style.backgroundColor=f;for(h=e;h>0;h--){var k=document.createElement("b");k.className=l+h;k.style.backgroundColor=g;j.appendChild(k)}c.appendChild(j,c.firstChild)}function getElementsBySelector(d){var e;var k=[];var c="";var g="";var l=d;var h=[];if(d.indexOf(" ")>0){k=d.split(" ");var f=k[0].split("#");if(f.length==1){return(h)}return(document.getElementById(f[1]).getElementsByTagName(k[1]))}if(d.indexOf("#")>0){k=d.split("#");l=k[0];c=k[1]}if(c!=""){h.push(document.getElementById(c));return(h)}if(d.indexOf(".")>0){k=d.split(".");l=k[0];g=k[1]}var j=document.getElementsByTagName(l);if(g==""){return(j)}for(e=0;e<j.length;e++){if(j[e].className==g){h.push(j[e])}}return(h)}var menuObjArray=new Array();menuObjArray[0]=new Array();menuObjArray[1]=new Array();menuObjArray[2]=new Array();menuObjArray[3]=new Array();menuObjArray[4]=new Array();menuObjArray[5]=new Array();menuObjArray[6]=new Array();menuObjArray[7]=new Array();var timerSlide=null;var numMenuItem=0;var slideDelay=5;var divHeight=21;var moveSlidePix=7;var isLocked=null;var doFading=true;InitAll();function InitAll(){var c=document.getElementsByTagName("DIV");menuStateAry=GetUserCookie("xpMenuCookv2").split(",");aryNum=0;for(dn=0;dn<c.length;dn++){if(String(c.item(dn).className).substring(0,7)=="topItem"){mainMenuDiv=c.item(dn).parentNode;menuContainerDiv=mainMenuDiv.getElementsByTagName("DIV").item(1);itemContainerDiv=menuContainerDiv.getElementsByTagName("DIV").item(0);try{if(menuStateAry!=0){itemContainerDiv.style.height=parseInt(menuStateAry[aryNum])+"px"}if(!doFading){if(menuContainerDiv.filters){menuContainerDiv.filters.alpha.opacity=100}else{menuContainerDiv.opacity=1}}if(menuStateAry!=0){if(parseInt(menuStateAry[aryNum])==0){itemContainerDiv.style.display="none"}else{itemContainerDiv.style.display="inline"}}}catch(d){d=null}Init(c.item(dn));aryNum++}}}function Init(c){if(isLocked){return}var h,f,e,d,g;for(r=0;r<document.styleSheets.length;r++){if(-1!=String(document.styleSheets[r].href).indexOf("sddm.css")){break}}if(!document.styleSheets[r].rules){g=document.styleSheets[r].cssRules}else{g=document.styleSheets[r].rules}numMenuItem=0;h=c.parentNode;f=h.getElementsByTagName("DIV").item(0);e=h.getElementsByTagName("DIV").item(1);d=e.getElementsByTagName("DIV").item(0);aLen=menuObjArray[0].length;for(i=0;i<aLen;i++){if(menuObjArray[0][i]==e){break}}if(i==aLen){menuObjArray[0][i]=e;menuObjArray[1][i]=d;menuObjArray[7][i]=f;menuObjArray[7][i].onmouseover=ChangeStyle;menuObjArray[7][i].onmouseout=ChangeStyle;f.onclick=SetSlide;lastmenuNum=-1;for(b=0;b<d.childNodes.length;b++){if(d.childNodes.item(b).tagName=="DIV"){numMenuItem++;d.childNodes.item(b).onmouseover=ChangeStyle;d.childNodes.item(b).onmouseout=ChangeStyle;lastmenuNum=b}}for(r=0;r<g.length;r++){tmpStr1=String(g[r].selectorText);tmpStr2=String("."+d.childNodes.item(lastmenuNum).className);if(tmpStr1==tmpStr2){if(NaN!=parseInt(g[r].style.height)){divHeight=parseInt(g[r].style.height)+2;break}}}menuObjArray[2][i]=numMenuItem;menuObjArray[3][i]=h;if(d.style.display=="inline"){menuObjArray[4][i]=numMenuItem*divHeight;menuObjArray[0][i].style.height=numMenuItem*divHeight+"px";menuObjArray[6][i]=true;if(doFading){if(menuObjArray[0][i].filters){menuObjArray[0][i].filters.alpha.opacity=100}else{menuObjArray[0][i].style.opacity=1}}}else{menuObjArray[7][i].className=menuObjArray[7][i].className+"Close";menuObjArray[4][i]=0;menuObjArray[0][i].style.height=0+"px";menuObjArray[6][i]=false;if(doFading){if(menuObjArray[0][i].filters){menuObjArray[0][i].filters.alpha.opacity=0}else{menuObjArray[0][i].style.opacity=0}}}}h=null;f=null;e=null;d=null}function SetSlide(){if(isLocked){return}else{isLocked=this.parentNode}for(i=0;i<menuObjArray[0].length;i++){if(menuObjArray[3][i]==this.parentNode){if(menuObjArray[5][i]==null){menuObjArray[5][i]=setInterval("RunSlide("+i+")",slideDelay)}break}}}function UpdateUserCookie(c){date=new Date();date.setTime(date.getTime()+(1000*60*60*24*30));document.cookie="xpMenuCookv2="+escape(menuObjArray[4].toString())+"; expires="+date.toGMTString()}function GetUserCookie(c){colCookie=document.cookie.split("; ");for(a=0;a<colCookie.length;a++){colCrumb=colCookie[a].split("=");if(colCrumb[0]==c){return unescape(colCrumb[1])}}return""}function RunSlide(c){if(menuObjArray[6][c]){if(doFading){if(menuObjArray[0][c].filters){menuObjArray[0][c].filters.alpha.opacity-=100/(((menuObjArray[2][c]*divHeight)/moveSlidePix)+1)}else{menuObjArray[0][c].style.opacity-=0.9/(((menuObjArray[2][c]*divHeight)/moveSlidePix)+1)}}menuObjArray[1][c].style.display="none";menuObjArray[4][c]-=moveSlidePix;if(menuObjArray[4][c]>0){menuObjArray[0][c].style.height=menuObjArray[4][c]+"px"}else{if(doFading){if(menuObjArray[0][c].filters){menuObjArray[0][c].filters.alpha.opacity=0}else{menuObjArray[0][c].style.opacity=0}}cName=String(menuObjArray[7][c].className);if(cName.substring(cName.length-4,cName.length)=="Item"){menuObjArray[7][c].className=menuObjArray[7][c].className+"Close"}if(cName.substring(cName.length-4,cName.length)=="Over"){menuObjArray[7][c].className=cName.substring(0,cName.length-4);menuObjArray[7][c].className=menuObjArray[7][c].className+"CloseOver"}if(cName.substring(cName.length-5,cName.length)=="Close"){menuObjArray[7][c].className=cName.substring(0,cName.length-5);menuObjArray[7][c].className=menuObjArray[7][c].className+"CloseOver"}menuObjArray[4][c]=0;menuObjArray[0][c].style.height=0+"px";clearInterval(menuObjArray[5][c]);menuObjArray[5][c]=null;menuObjArray[6][c]=false;isLocked=null;UpdateUserCookie(c);return 0}return 0}if(!menuObjArray[6][c]){if(doFading){if(menuObjArray[0][c].filters){menuObjArray[0][c].filters.alpha.opacity+=100/(((menuObjArray[2][c]*divHeight)/moveSlidePix)+1)}else{opcVal=parseFloat(menuObjArray[0][c].style.opacity);opcVal+=0.9/((menuObjArray[2][c]*divHeight)/moveSlidePix);menuObjArray[0][c].style.opacity=opcVal}}menuObjArray[4][c]+=moveSlidePix;if(menuObjArray[4][c]<(menuObjArray[2][c]*divHeight)){menuObjArray[0][c].style.height=menuObjArray[4][c]+"px"}else{if(doFading){if(menuObjArray[0][c].filters){menuObjArray[0][c].filters.alpha.opacity=100}else{menuObjArray[0][c].style.opacity=1}}strClassName=String(menuObjArray[7][c].className);menuObjArray[4][c]=(menuObjArray[2][c]*divHeight);menuObjArray[0][c].style.height=(menuObjArray[2][c]*divHeight)+"px";menuObjArray[1][c].style.display="inline";clearInterval(menuObjArray[5][c]);menuObjArray[5][c]=null;menuObjArray[6][c]=true;cName=String(menuObjArray[7][c].className);if(cName.substring(cName.length-4,cName.length)=="Over"){menuObjArray[7][c].className=cName.substring(0,cName.length-9);menuObjArray[7][c].className=menuObjArray[7][c].className+"Over"}if(cName.substring(cName.length-5,cName.length)=="Close"){menuObjArray[7][i].className=cName.substring(0,cName.length-5)}isLocked=null;UpdateUserCookie(c);return 0}return 0}}function ChangeStyle(){className=String(this.className);if(className.substring(className.length-4,className.length)=="Over"){this.className=className.substring(0,className.length-4)}else{this.className=this.className+"Over"}};