var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;

// image new window opener

var ImageWin;
function newWin(whichPage, width, height){
		ImageWin = window.open(whichPage,"ImageWindow","left=0,top=0,toolbar=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",location=no");
		ImageWin.focus();
}	

function show(id){
	var TextShow = id + "Div";
	if (ns4) document.layers[TextShow].visibility ="show"
	else if (ie4) document.all[TextShow].style.visibility="visible"
	}
	
function hide(id){
	var TextShow = id + "Div";
	if (ns4) document.layers[TextShow].visibility="hide"
	else if (ie4) document.all[TextShow].style.visibility="hidden"
	}	
	
	
	var base = 'img/'

function tocItem (name, width, height) {
   
	this.off = new Image();
	this.off.src = base + name + ".gif";
	this.on = new Image();
	this.on.src = base + name + "_hl.gif";
}
function toc_new (name) {
	tocItem[name] = new tocItem(name);
}
function img_act (imgName) {
	if (document.images) {
		document[imgName].src = tocItem[imgName].on.src;
		document[imgName].src = "img/" + imgName + "_hl.gif";
	}
}
function img_inact (imgName) {
	if (document.images) {
		document[imgName].src = tocItem[imgName].off.src;
		document[imgName].src = "img/" + imgName + ".gif";
	}
}


if (document.images != null) {
for(i=1; i<5;i++){
	toc_new ('top_' + i);
	toc_new ('bt_' + i);
	toc_new ('bt_up');
	}
}
