// JavaScript Document

/*sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("td");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

	
	/*
	##Cross Browser InnerHTML Change
	
	##Added By Boyd Cyr Feb. 15 2009
	*/

	function replaceTextContent(element,text) {
		if (typeof element ==="string") element = document.getElementById(element);
		//if (!element||element.nodeType!==1) return;
		if ("textContent" in element) {
			element.textContent = text; //Standard, DOM3
	
		} else if ("innerText" in element) {
			element.innerText = text; //Proprietary, Micosoft
		} else {
			//Older standard, even supported by Microsoft
			while (element.childNodes.length) element.removeChild(element.lastChild);
			element.appendChild(document.createTextNode(text));
		}
	}

	/*function nav(id) {

	}*/

	function write(text,id)
	{
		if (document.getElementById)
		{
			x = document.getElementById(id);
			x.innerHTML = '';
			x.innerHTML = text;
		}
		else if (document.all)
		{
			x = document.all[id];
			x.innerHTML = text;
		}
		else if (document.layers)
		{
			x = document.layers[id];
			text2 = '<P CLASS="testclass">' + text + '</P>;';
			x.document.open();
			x.document.write(text2);
			x.document.close();
		}
	}

	function read(id)
	{
		if (document.getElementById)
		{
			x = document.getElementById(id);
			text = x.innerHTML;
		}
		else if (document.all)
		{
			x = document.all[id];
			text = x.innerHTML;
		}
		else if (document.layers)
		{
			x = document.layers[id];
			x.document.open();
			text = x.document.innerHTML;
			x.document.close();
		}
		return text;
	}
	
	function copy(from,to){
		write(read(from),to);
	}
	function imageView2(myImage,w,h,winl,wint){
                winprops = 'toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=' +w+ ',height=' +h+ ',left=' +winl+ ',top=' + wint+'';
                open(myImage,"1stpop",winprops);
	}
	var popUpWin=0;
	function popUpWindow2(URLStr, left, top, width, height)
	{
	  if(popUpWin)
	  {
		if(!popUpWin.closed) popUpWin.close();
	  }
	  popUpWin = open(URLStr, 'popUpWin', 'toolbar=0,location=1,directories=0,status=0,scrollbars=yes,menubar=0,resizable=0,copyhistory=0,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	
	}
	
	function show_login(id) {
		if (document.getElementById){ 
			obj = document.getElementById(id); 
			if (obj.style.display == "none") { 
				obj.style.display = ""; 
			} 
		} 
	}
	function hide_login(id){ 
		if (document.getElementById){ 
			obj = document.getElementById(id); 
			if (obj.style.display == ""){ 
				obj.style.display = "none"; 
			} 
		} 
	}
