// 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);


	
	/*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+'');
	
	}
	