//smooth scroll
smooth = 10;
speed = 10;
function scrlWin(){if(distYY >= 1 || distYY <= -1){if(distYY > 0){moveYY = Math.ceil(distYY / smooth);}else{moveYY = Math.floor(distYY / smooth);}distYY -= moveYY;window.scrollBy(0, -moveYY);clearTimeout(timerId);timerId = setTimeout("scrlWin()", speed);}}function smScroll(ET){if(document.body.scrollTop){winYY = document.body.scrollTop;}else{winYY = document.documentElement.scrollTop;}if(window.innerHeight){winHH = window.innerHeight;}else if(document.all && document.getElementById && (document.compatMode == 'CSS1Compat')){winHH = document.documentElement.clientHeight;}else{winHH = document.body.clientHeight;}linkVal = "" + ET;linkName = linkVal.split("#");targetEt = document.getElementById(linkName[1]);targetYY = targetEt.offsetTop;distYY = winYY - targetYY;pageHH = document.body.scrollHeight;if(pageHH - targetYY < winHH){difVal = winHH - (pageHH - targetYY) - 15;distYY += difVal;}timerId = setTimeout("scrlWin()", speed);}



//smart rollover
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}





