var boolNS4 = navigator.appVersion.indexOf("Nav") > 0 && parseInt(navigator.appVersion) == 4;

function toggleDesc(strProgramID)
{
   if(boolNS4) return false;

 //  objCurrentShort = GetElement("Desc"+strProgramID+"Short");
 //  objCurrentShort.style.display = (objCurrentShort.style.display=="none" ? "block" : "none");

   objCurrentLong = GetElement("Desc"+strProgramID+"Long");
   objCurrentLong.style.display = (objCurrentLong.style.display=="none" ? "block" : "none");

}

function OpenWindow(strURL, strTitle, intWidth, intHeight, boolScrollbar)
{
	var intMyLeft = eval(screen.width-intWidth)/2;
	var intMyTop  = eval(screen.height-intHeight)/2;
	window.open(strURL,strTitle,'toolbar=no,location=no,status=no,menubar=no,scrollbars='+(boolScrollbar ? 'yes' : 'no')+',resizable=no,width='+intWidth+',height='+intHeight+',left='+intMyLeft+',top='+intMyTop);
}
function SetStatusMsg($strText)
{
   window.status = $strText;
}

function ClearStatusMsg()
{
   window.status = "";
}

function GetElement(strElement)
{
	if (document.getElementById)
	{
		// IE5+, Netscape 6, Mozilla
		return (document.getElementById(strElement));
	}
	else if (document.all)
	{
		// IE4
		return (eval("document.all." + strElement));
	}
	else if (document.layers)
	{
		// Netscape 4
		return (eval("document." + strElement));
	}
	else
	{
		// Nothing
		return (null);
	}
}

function GetFormElement(strForm, strElement)
{
   // If strElement is empty, then get the form.
	if (strElement != "") {
		strElement = "." + strElement;
	}
	return (eval("document.forms['" + strForm + "']" + strElement));
}

function GetParentElement(strElement)
{
	if (document.getElementById)
	{
		// IE5+, Netscape 6, Mozilla
		return (parent.document.getElementById(strElement));
	}
	else if (document.all)
	{
		// IE4
		return (eval("parent.document.all."+strElement));
	}
	else if (boolNS4)
	{
		// Netscape 4
		return (eval("document."+strElement));
	}
	else
	{
		// Nothing
		return (null);
	}
}
function mouseovermenutr (o){
	// o.style.backgroundColor= "#70a0cF";
	o.style.cursor="hand";	
}
function mouseoutmenutr(o){
	//o.style.backgroundColor="#000000";
}
function mouseovermenutd (o){
	// o.style.borderStyle="solid";
	// o.style.borderColor="#ffffff";
	//o.style.backgroundColor= "#4a4a4a";
	//o.style.color="#ffffff";
}
function mouseoutmenutd (o){
	//o.style.color="#ffffff";
	//o.style.borderColor="#556996";
	//o.style.backgroundColor="black";
	//o.style.backgroundColor="transparent";
	//o.style.backgroundImage="url(../images/MenuBlackBackground.gif)";
	//o.style.backgroundRepeat="repeat-x";
}
function mouseovertr (o){
	// o.style.backgroundColor= "#70a0cF";
	o.style.cursor="hand";	
}
function mouseouttr(o){
	o.style.backgroundColor="#556996";
}
function mouseovertd (o){
	//o.style.backgroundColor= "#70a0cF";
	o.style.color="#ffffff";
	o.style.filter = "progid:DXImageTransform.Microsoft.gradient(GradientType=1,endColorstr=#ffffff, startColorstr=#556996);";
}
function mouseouttd (o){
	o.style.color="#ffffff";
	o.style.backgroundColor="#556996";
	o.style.filter = "progid:DXImageTransform.Microsoft.gradient(GradientType=1,endColorstr=#556996, startColorstr=#556996);";
}
function hoverTitle (o) {
//	o.class = 
}
function mouseoverMenu(sProgramID)
{
   if(boolNS4) return false;
   
	objCurrentTop = GetElement("Top"+sProgramID);
	objCurrentTop.style.textDecoration = "underline"; 
	objCurrentTop.style.color = "blue";
}
function mouseoutMenu(sProgramID)
{
   if(boolNS4) return false;
   
	objCurrentTop = GetElement("Top"+sProgramID);
	objCurrentTop.style.textDecoration = "none"; 	
	objCurrentTop.style.color = "black";
}


function toggle(el)
{
	myEl = document.getElementById(el);
	myEl.style.display = (myEl.style.display == 'none') ? 'block' : 'none';
}
function showhide(div){
    oDiv = document.getElementById(div);
    if(oDiv.style.display == "none"){
        oDiv.style.display = "block";
    }else{
        oDiv.style.display = "none";
    }
}
function email(n,d,c) 
{
    if(c) {
        document.write("<a href=\"mailto");
        document.write(":" + n+ "@");
        document.write(d + "\">" + c + "<\/a>");
   }
   else
   {
        document.write("<a href=\"mailto");
        document.write(":" + n+ "@");
        document.write(d + "\">" + n+ "@" + d+ "<\/a>");
   }
}
function openFull(el){
	el.nextSibling.style.display=='none'?el.nextSibling.style.display='block':el.nextSibling.style.display='none'
}
function expandAll(fl){
	var elAr = document.getElementsByTagName("DIV");
	for(var i=2;i<elAr.length;i++){
		if(elAr[i].className=='block'){
			if(fl)
				elAr[i].style.display = "";
			else
				elAr[i].style.display = "none";
		}
	}
}