// Open a new window
function OpenWindow(theURL, target, winwidth, winheight) 
{ //v2.0
	var xposi = 0, yposi = 0;				// default values
	//var winwidth = 350, winheight= 250;		// default values
	if (document.all) var xMax = screen.width, yMax = screen.height;
	else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight;
	xposi = xMax/2 - (winwidth/2)
	yposi = yMax/2 - (winheight/2)
  window.open(theURL,'','screenX='+xposi+',screenY='+yposi+',top='+yposi+',left='+xposi+',width='+winwidth+',height='+winheight+',location=no,toolbar=no,scrolling=yes, scrollbars=yes,status=no, resizable');
}

// MouseOver on TDs  
  function co(element,mode) 
  {
    if (mode=="in") 
    {
      cursortype = 'hand'
      colorbgval = '#dddddd'
      colorval = '#ff0000'
	    strfontweight = 'bold' 
    }
    else if (mode=="out") 
    {
      cursortype = ''
      colorbgval = ''
      colorval = ''
	    strfontweight = '' 
    }
	element.style.background=colorbgval;
 	element.style.color =colorval;
	//element.style.fontWeight=strfontweight;
 	element.style.cursor=cursortype;
}

function showhide(what)
{
	if (what.style.display=='none')
	{
		what.style.display='';
	}
	else
	{
		what.style.display='none'
	}
}

function toggleIcon(what)
{
	objWhat = document.getElementById(what) 
	strSrc = objWhat.src
	strSrc = strSrc.substring(strSrc.indexOf("images/"),strSrc.length)
	
	Open = new Image(9,11)    
	Closed = new Image(9,11)
	Open.src = "images/minus_dot.gif"
	Closed.src = "images/plus_dot.gif"
	if (strSrc == "images/plus_dot.gif")
	{
		objWhat.src=Open.src
	}
	else
	{
		objWhat.src = Closed.src
	}
}

function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		var style2 = document.getElementById(whichLayer).style;

		if (style2.display == "block")
		{
			style2.display="none";
		}
		else
		{
			style2.display="block";
		}
	}
}