// mousover
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);
}else{
window.onload = smartOver;
}



// pagetop
function getScroll(){
var x, y;
if(document.all !== void 0){ // IE4, IE5, IE6
x = document.body.scrollLeft;
y = document.body.scrollTop;
}else if(document.layers !== void 0 || (navigator.userAgent.indexOf("Opera") != -1 || window.opera !== void 0)){ // NN4, Opera6
x = window.pageXOffset;
y = window.pageYOffset;
}else if(navigator.userAgent.indexOf("Gecko") != -1){ // NS6, Mozilla
x = window.scrollX;
y = window.scrollY;
}else{
x = y = 0;
}
return {x: x, y: y};
}


var SCROLL;

var divCountScroller = 20;

function scroller(x, y, count){
if(count === void 0){
count = 0;
SCROLL = getScroll();
}

if(count++ < divCountScroller){
var c = count/divCountScroller;

var nx = SCROLL.x+(x-SCROLL.x)*c;
var ny = SCROLL.y+(y-SCROLL.y)*c;

window.scrollTo(nx, ny);

setTimeout("scroller("+x+","+y+","+count+");", 10); 
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

