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);  
}  

function subWindow(contents,height,width){
	
	var status;
	var hcond;
	var wcond;
	if(!isNaN(height)){
		hcond = ",height=" + height;
	}else{
		hcond = "";
	};
	if(!isNaN(width)){
		wcond = ",width=" + width;
	}else{
		wcond = "";
	};
	status = "\"location=0,status=0,toolbar=0,scrollbars=0,resizable=1"+hcond+wcond+"\"";
	nwd = window.open(contents,"_blank",status);
};

function subWindowScroll(contents,height,width){
	
	var status;
	var hcond;
	var wcond;
	if(!isNaN(height)){
		hcond = ",height=" + height;
	}else{
		hcond = "";
	};
	if(!isNaN(width)){
		wcond = ",width=" + width;
	}else{
		wcond = "";
	};
	status = "\"status=yes,toolbar=no,scrollbars=yes,resizable=1"+hcond+wcond+"\"";
	nwd2 = window.open(contents,"_blank",status);
};
