function Show(sId)
{
 var oNode = document.getElementById(sId)
 if (oNode.style.display=="block")
 		oNode.style.display="none"
 else if (oNode.style.display=="none")
 		oNode.style.display="block"
 else
 		 oNode.style.display="block"
}

var sFilter="";
var sMoz="";
var sOpacity="";
function NoFilter(sId)
{
 var oNode = document.getElementById(sId)

 if (oNode)
 {

  sFilter=oNode.style.filter;
  sMoz=oNode.style.opacity;

 oNode.style.filter="alpha(opacity=100)"
 oNode.style.opacity="1"
// oNode.style.-moz-opacity="1"
 
 }

}

function ReFilter(sId,sVal)
{
 var oNode = document.getElementById(sId)
 if (oNode)
 {

 oNode.style.filter="alpha(opacity="+sVal+")"
 oNode.style.opacity="."+sVal
// oNode.style.-moz-opacity=".100"
 
 }

}

/*
onerror=handleErr
var txt=""

function handleErr(msg,url,l)
{
txt="There was an error on this page.\n\n"
txt+="Error: " + msg + "\n"
txt+="URL: " + url + "\n"
txt+="Line: " + l + "\n\n"
txt+="Click OK to continue.\n\n"
alert(txt)
return true
}
*/

function ShowHideById(elementID,bDrag) {
  if (document.getElementById(elementID).style.display=='none'||document.getElementById(elementID).style.display=='')
  {document.getElementById(elementID).style.display='block'}
  else
  {document.getElementById(elementID).style.display='none'}
}


function expandById(elementID){
document.getElementById(elementID).style.display='none'
}

function expandById(elementID){
document.getElementById(elementID).style.display='block'
}

var newwindow;
function OpenInNewWindow(img,title,lheight,lwidth)
{
	newwindow=window.open("",'name','left=40,top=60,height=1,width=1,scrollbars=1');
	if (window.focus) {newwindow.focus()}

	newwindow.document.write("<HTML>")
	newwindow.document.write("<TITLE>"+title+"</TITLE>")
	newwindow.document.write("<BODY>")
	newwindow.document.write("<p align='center'><img src='"+img+"'></p>")
	newwindow.document.write("</BODY>")
	newwindow.document.write("</HTML>")
	newwindow.resizeBy(lwidth-60,lheight-76)

}

var newwindow2;
function OpenInNewWindow2(text,title)
{
	newwindow2=window.open("",'name','left=40,top=60,height=200,width=300,scrollbars=1');
	if (window.focus) {newwindow2.focus()}

	newwindow2.document.write("<HTML>")
	newwindow2.document.write("<TITLE>"+title+"</TITLE>")
	newwindow2.document.write("<BODY>")
	newwindow2.document.write("<h3>"+title+"</h3>")
	newwindow2.document.write("<p>"+text+"</p>")
	newwindow2.document.write("</BODY>")
	newwindow2.document.write("</HTML>")
}

var urlwindow;
function OpenUrlInNewWindow(url,lheight,lwidth)
{
	urlwindow=window.open(url,'name','height=1,width=1,scrollbars=1');
	urlwindow.resizeTo(lwidth,lheight);
	if (window.focus) {urlwindow.focus()}
}

function help_popup(form,context)
{
var file="help_popup.php?form=" + form+"&context="+context;
window.open(file,"Help","top=5,left=30,toolbars=no,maximize=yes,resize=yes,width=550,height=200,location=no,directories=no,scrollbars=yes");
}

function colorLinks(oClickedLink)
{
 	//this clears the colors from all the main header links and colors in the clicked link
  oClickedLink.style.color='#FF9933'
  oLinkHeader = document.getElementById('header-links')
  oLinks = oLinkHeader.getElementsByTagName('a')
  oLinks[0].style.color='#FFFFFF';
  oLinks[1].style.color='#FFFFFF';
  oLinks[2].style.color='#FFFFFF';
  oLinks[3].style.color='#FFFFFF';
//  oLinks[4].style.color='#FFFFFF';
//  oLinks[5].style.color='#FFFFFF';
  oClickedLink.style.color='#FF9933'
 
}
