//utils.js

var remote = null;
var contents = true;

function doRollover(elem, rollover_color, text_color){
    // set background color of TD
    if (elem.parentNode){ // IE5, IE6 and Netscape 6
	if (rollover_color == 'transparent'){   // Netscape does not like the word "transparent".
	    elem.parentNode.bgColor = '';
	}
	else{
	    elem.parentNode.bgColor=rollover_color;
	}
    }
    else if (elem.parentElement && elem.parentElement.setAttribute){ // IE4.
	elem.parentElement.setAttribute("bgColor", rollover_color);
    }
    else{  // Netscape 4.6x or 4.7x
	//alert("Must be Netscape! do nothing");
    }
    // set color of the link text
	if ( document.getElementsByTagName ) {
//		elem.getElementsByTagName('a')[0].style.color = text_color;
	}

}

function openWindow(URL) {
    remote = window.open(URL, "newwindow",
        "width=800,height=900,scrollbars=yes,resizable=yes,status=no,menubar=no,toolbar=no");
	if (remote != null) {
		if (remote.opener == null)
		remote.opener = self;
		window.name = 'NewLnk';
		remote.location.href = URL;
	}
	remote.focus();
}
function openWindow2(URL,u,w,h) {
	remote = window.open(URL, n, 'width=' + w + ',height=' + h +',resizable=yes,scrollbars=yes');
	if (remote != null) {
		if (remote.opener == null)
		remote.opener = self;
	window.name = 'NewLnk';
	remote.location.href = URL;}
	remote.focus();
}

function showFrame(docum, linkUrl, iWidth){
	var ns4 = (docum.layers);
	var ie5 = (docum.getElementById && document.all);
	var ns6 = (docum.layers);
	if(ie5) {
		innerHeight = docum.body.offsetHeight;
		if (innerHeight < 650) {
			innerHeight = 650;
		}
		else {
			innerHeight = innerHeight - 82;
		}
	}
	if (ns4) {
		docum.write("<IFRAME NAME=content_frame width=iWidth height=" + innerHeight + " SRC="+linkUrl+" frameborder=0 border=0></IFRAME>");
		}
		else {
	docum.write("<IFRAME NAME=content_frame width=iWidth height=" + innerHeight + " SRC="+linkUrl+" frameborder=0 border=0></IFRAME>");
	}
}
