﻿
startList = function() {
if (document.all&&document.getElementById) {
if (document.getElementById("nav") == null)
    return;
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;



//Menu Library
function PopupFly_Init(name, offsetLeft, offsetTop, alignment, staticHover, popupHover, popupLatency, hideLatency, onInit, onPopup, onHide) {
 var TFly = document.getElementById(name);
 TFly.DT = document.getElementById(name + "_Popup");
 TFly.oX = offsetLeft;
 TFly.oY = offsetTop;
 TFly.alignment = alignment;

 TFly.popupLatency = popupLatency;
 TFly.hideLatency = hideLatency;
 TFly.onPopup = onPopup;
 TFly.onHide = onHide;

 TFly.onmouseover = function() {
 if (staticHover != '') {
     TFly.className_ = TFly.className;
      TFly.className = staticHover;
    }
 TFly_Popup(TFly, true);
  }

 TFly.onmouseout = function() {
   if (staticHover != '') {
     TFly.className = TFly.className_;
    }
    TFly_Popup(TFly, false);
  }

 if (document.all) {
 TFly.onactivate = TFly.onmouseover;
 TFly.ondeactivate = TFly.onmouseout;
 } else {
 TFly.onfocus = TFly.onmouseover;
 TFly.onblur = TFly.onmouseout;
 }

 TFly.DT.onmouseover = function() {
 if (popupHover != '') {
     TFly.DT.className_ = TFly.DT.className;
      TFly.DT.className = popupHover;
    }
    TFly_Popup(TFly, true);
  }

 TFly.DT.onmouseout = function() {
   if (popupHover != '') {
 TFly.DT.className = TFly.DT.className_;
    }
   TFly_Popup(TFly, false);
 }

}

function TFly_SetPosition(TFly, obj) {
 obj.style.top = TFly.oY + TFly.offsetHeight + "px";
 obj.style.left = TFly.oX + (TFly.offsetWidth - obj.offsetWidth ) * (1 + TFly.alignment) / 2 + "px";
}

function TFly_Popup(TFly, value) {
 if (TFly.timer != null) window.clearTimeout(TFly.timer);

 if (value) {

 if (TFly.status == "on") return;
 var timeout = (TFly.status == "active") ? 0 : TFly.popupLatency;
 TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, true);}, timeout);

 } else {

 if (TFly.status == "off") return;
 var timeout = (TFly.status == "active") ? 0 : TFly.hideLatency;
 TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, false);}, timeout);
  }
}

function TFly_SetVisibility(TFly, value) {
 if (value == true) {
 TFly_SetPosition(TFly, TFly.DT);
 TFly.DT.style.visibility = "visible";
 TFly.style.zIndex = "999";
 } else {
 TFly.DT.style.visibility = "hidden";
 TFly.style.zIndex = "0";
 TFly.DT.style.left = "-10000px";
 }
}

var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementById("contenttext");

	  if(p.style.fontSize) {
		 var s = parseInt(p.style.fontSize.replace("px",""));
	  } else {
		 var s = 12;
	  }
	  if(s!=max) {
		 s += 1;
	  }
	  p.style.fontSize = s+"px"
}
function decreaseFontSize() {
   var p = document.getElementById("contenttext");
  if(p.style.fontSize) {
	 var s = parseInt(p.style.fontSize.replace("px",""));
  } else {
	 var s = 12;
  }
  if(s!=min) {
	 s -= 1;
  }
  p.style.fontSize = s+"px"
}


