function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}
function setIframeHeight(iframeName) {
  var iframeWin = window.frames[iframeName];
  var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
  if ( iframeEl && iframeWin ) {
    iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous  
    var docHt = getDocHeight(iframeWin.document);
    // need to add to height to be sure it will all show
    if (docHt) iframeEl.style.height = docHt + 30 + "px";
  }
}

function menuL1_swapImgRestore() { //v3.0
if (typeof(window["showTimer"]) != "undefined"){ 
clearInterval(showTimer);
}
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
hideStatus = 2;
menuHide();
}
function menuL2_swapImgRestore() { //v3.0
hideStatus = 0;
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
menuHideStop();
menuHide();
}
function setSection(mySection){
lastSection = mySection;
if (mySection != ""){
defaultSection = document.getElementById("menuItem__" + mySection ) ;
defaultSection.style.visibility = "visible";
myObj = defaultSection;
}
}
function doHide(){
hideStatus =0;
if (typeof(window["myObj"]) != "undefined"){ 
myObj.style.visibility = 'hidden';
//showTimer = window.setTimeout("showDefault()",1000); 
}


}
function showDefault(){
doHide();
setSection(lastSection);
}
function menuHideStop(){
if (typeof(window["hideTimer"]) != "undefined"){ 
clearInterval(hideTimer);
}
if (typeof(window["showTimer"]) != "undefined"){ 
clearInterval(showTimer);
}
}
hideStatus = 0;
function menuHide(){
menuHideStop();
if (lastSection == ''){

hideStatus++;
if (hideStatus >=2){
hideTimer = window.setTimeout("doHide()",1000); 
}
}else{
hideTimer = window.setTimeout("showDefault()",1000); 
}
}
function menuL1_swapImage() { //v3.0
menuHideStop();
doHide();
  var i,j=0,x,a=menuL1_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
//alert( a[0] );
myObj = document.getElementById("menuItem_" + a[0] );
myObj.style.visibility = 'visible';
}
}
function menuL2_swapImage() { //v3.0
  var i,j=0,x,a=menuL2_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showTip(){
acuTipStop();
myTip = document.getElementById("acuTip");
myTip.style.visibility = 'visible';
myTipBtn = document.getElementById("good_advice_btn");
myTipBtn.style.visibility = 'hidden';
}
function acuTipStop(){
if (typeof(window["acuTipHide"]) != "undefined"){
clearInterval(acuTipHide);
}
}
function setHide(){
acuTipStop();
myTip = document.getElementById("acuTip");
myTip.style.visibility = 'hidden';
myTipBtn = document.getElementById("good_advice_btn");
myTipBtn.style.visibility = 'visible';
}
function hideTip(){
acuTipStop();
acuTipHide = window.setTimeout("setHide()",1000); 
}