var SM_PARENT_OVER_BGCOLOR="#464646",SM_PARENT_OFF_BGCOLOR="",SM_PARENT_OVER_WEIGHT="bold",SM_PARENT_OFF_WEIGHT="normal",SM_ITEM_OVER_COLOR="#464646",SM_ITEM_OFF_COLOR="",SM_ITEM_OVER_WEIGHT="bold",SM_ITEM_OFF_WEIGHT="normal",SM_ITEM_OVER_BGCOLOR="#999999",SM_ITEM_OFF_BGCOLOR="",SM_SEP_ITEM_OVER_MARGIN="0px",SM_SEP_ITEM_OFF_MARGIN="0px 15px 0px 15px",SM_FADE_TIMEOUT=30,SM_FADE_OPACITY=25,SM_FADE_PAUSE=500,objMenuState=[];function MenuState(strMenuId){this.menuId=strMenuId;this.intervalId=0;this.timeoutId=0;this.opacity=0;this.fadeDirection=0;this.mouseOver=true;} MenuState.prototype.fadeIn=function(){var objPanel=document.getElementById(this.menuId);objPanel.style.visibility="visible";this.mouseOver=true;setParentItemStyle(this.menuId,SM_PARENT_OVER_BGCOLOR,SM_PARENT_OVER_WEIGHT);if(this.fadeDirection!=1)this.startFade(1);};MenuState.prototype.fadeOut=function(){this.mouseOver=false;if(this.opacity==100){if(this.timeoutId!=0)window.clearTimeout(this.timeoutId);this.timeoutId=window.setTimeout("timeoutPause(\""+this.menuId+"\")",SM_FADE_PAUSE);}else{setParentItemStyle(this.menuId,SM_PARENT_OFF_BGCOLOR,SM_PARENT_OFF_WEIGHT);if(this.fadeDirection!=-1)this.startFade(-1);}};MenuState.prototype.startFade=function(intDirection){if(this.intervalId!=0)window.clearInterval(this.intervalId);this.fadeDirection=intDirection;this.intervalId=window.setInterval("intervalFade(\""+this.menuId+"\")",SM_FADE_TIMEOUT);};function setParentItemStyle(strMenuId,strBackgroundColor,strFontWeight){objPanel=document.getElementById(strMenuId).parentNode;with(objPanel.style){backgroundColor=strBackgroundColor;fontWeight=strFontWeight;}} function timeoutPause(strMenuId){var objState=getMenuState(strMenuId);objState.timeoutId=0;if(!objState.mouseOver){setParentItemStyle(objState.menuId,SM_PARENT_OFF_BGCOLOR,SM_PARENT_OFF_WEIGHT);objState.startFade(-1);}} function intervalFade(strMenuId){var objPanel=document.getElementById(strMenuId),objState=getMenuState(strMenuId);objState.opacity+=SM_FADE_OPACITY*objState.fadeDirection;if(objState.opacity>100)objState.opacity=100;else if(objState.opacity<0)objState.opacity=0;objPanel.style.opacity=objState.opacity/100;objPanel.style.filter="alpha(opacity="+new String(objState.opacity)+")";if(objState.opacity==0||objState.opacity==100){window.clearInterval(objState.intervalId);objState.intervalId=0;objState.fadeDirection=0;}if(objState.opacity==0)objPanel.style.visibility="hidden";} function getMenuState(strMenuId){var objRetVal=null,intIndex=-1;while(++intIndex<objMenuState.length&&objRetVal==null)if(objMenuState[intIndex].menuId==strMenuId)objRetVal=objMenuState[intIndex];if(objRetVal==null){objMenuState.length++;objRetVal=new MenuState(strMenuId);objMenuState[objMenuState.length-1]=objRetVal;}return objRetVal;} function showSkinMenuParentHighlight(objPanel){with(objPanel.style){backgroundColor=SM_PARENT_OVER_BGCOLOR;fontWeight=SM_PARENT_OVER_WEIGHT;}} function hideSkinMenuParentHighlight(objPanel){with(objPanel.style){backgroundColor=SM_PARENT_OFF_BGCOLOR;fontWeight=SM_PARENT_OFF_WEIGHT;}} function showSkinMenu(objPanel){var objSubPanel=getSkinMenuNode(objPanel.childNodes[0],1),objState=getMenuState(objSubPanel.id);objState.fadeIn();} function hideSkinMenu(objPanel){var objSubPanel=getSkinMenuNode(objPanel.childNodes[0],1),objState=getMenuState(objSubPanel.id);objState.fadeOut();} function overSkinMenuItem(objPanel){var objSepPanel1=getSkinMenuNode(objPanel.nextSibling,1),objSepPanel2=getSkinMenuNode(objPanel.previousSibling,-1),objLink=getSkinMenuNode(objPanel.firstChild);with(objPanel.style){color=SM_ITEM_OVER_COLOR;fontWeight=SM_ITEM_OVER_WEIGHT;backgroundColor=SM_ITEM_OVER_BGCOLOR;}window.status=objLink.href;if(objSepPanel1!=null)objSepPanel1.style.margin=SM_SEP_ITEM_OVER_MARGIN;if(objSepPanel2!=null)objSepPanel2.style.margin=SM_SEP_ITEM_OVER_MARGIN;} function offSkinMenuItem(objPanel){var objSepPanel1=getSkinMenuNode(objPanel.nextSibling,1),objSepPanel2=getSkinMenuNode(objPanel.previousSibling,-1);with(objPanel.style){color=SM_ITEM_OFF_COLOR;fontWeight=SM_ITEM_OFF_WEIGHT;backgroundColor=SM_ITEM_OFF_BGCOLOR;}window.status="";if(objSepPanel1!=null)objSepPanel1.style.margin=SM_SEP_ITEM_OFF_MARGIN;if(objSepPanel2!=null)objSepPanel2.style.margin=SM_SEP_ITEM_OFF_MARGIN;} function navSkinMenuItem(objPanel){var objLink=getSkinMenuNode(objPanel.firstChild);document.location=objLink.href;} function getSkinMenuNode(objNode,intDirection){while(objNode!=null&&objNode.nodeName=="#text"){if(intDirection>0)objNode=objNode.nextSibling;else objNode=objNode.previousSibling;}return objNode;}
