// scrollup
function scrollup() {
	if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
	sctop = document.body.parentNode.scrollTop;
	}
	else if(window.pageYOffset){
	sctop = window.pageYOffset;
	} else {
	sctop = document.body.scrollTop;
	}
	
	if(sctop){
	scup = Math.ceil(sctop*.2);
	scrollBy(0,-scup);
	if (sctop-scup) setTimeout("scrollup()",20);
	}
}


// subWin
function subWin(theURL,winName,w,h) {
	wx = w;
	wy = h;
	features = "width="+wx+",height="+wy+",status=no,scrollbars=yes,location=no,menubar=no,resizable=yes";
	window.open(theURL,winName,features);
}


// subWinCenter
function subWinCenter(theURL,w,h) {
	wx = w;
	wy = h;
	x = (screen.width  - wx) / 2;
	y = (screen.height - wy) / 2;
	features = "left="+x+",top="+y+",width="+wx+",height="+wy+",status=no,scrollbars=no,location=no,menubar=no";
	subWin=window.open(theURL,"subWin",features);
	subWin.focus();
}




// rollOver (use prototype.js)
conf = {
       className : 'rollover',
       postfix : '_sw'
};
function setMouseOverImages() {
       $A(document.getElementsByClassName(conf.className)).each(function (node){
               node.onmouseout = changeSrcFunction(node.src);
               node.onmouseover =
			    changeSrcFunction(node.src.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1"));
       });
}
function changeSrcFunction(data){
       return function(){ this.src = data; }
}
Event.observe(window, 'load', setMouseOverImages, false);
