// JavaScript Document :: JB 10.15.08 4:55p ::

// GNS toggle



function ToggleBodyDiv()
	{
		if (MoreBodyDiv.style.display == "none")
		{
			MoreBodyDiv.style.display = "";
			MoreLink.style.display = "none";
		}
		else
		{
			MoreBodyDiv.style.display="none";
		}
	}

function toggle (secID){
//display the section if it's not displayed; hide it if it is displayed
	var sDivID = secID
	document.poppedLayer = eval(GetSpecificBrowserObject(sDivID));
	if (document.poppedLayer.style.display=="none") 
		{
		document.poppedLayer.style.display = "block";
		//secID.style.display="block"
		}
	else
		{
		document.poppedLayer.style.display = "none";
		//secID.style.display="none";
		}
	}

function GetSpecificBrowserObject(sValue){
	var browserType;
	
	if (document.layers) {browserType = "nn4"}
	if (document.all) {browserType = "ie"}
	if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
	
	if (browserType == "gecko" ){
		return "document.getElementById(\'"+sValue+"\')";
		}
	else if (browserType == "ie"){
		return "document.all[\'"+sValue+"\']";
		}
	else
		{
		return "document.layers[\'`"+sValue+"\']";
		}
	}

function hideSection (secID){
//hide the section 
		{secID.style.display="none"}
	}
	
function showSection (secID){
//hide the section 
		{secID.style.display=""}
	}

function initSections(){
// hide the appropriate sections
//showSection(MainSpec);
//hideSection(SearchFeatures);
//hideSection(num2);
}

function checkFile(file, immform, deletelink) 
{
	if (file == "" && immform && deletelink == false)
	{ 
		alert('No file name was specified.  Please specify a file before submitting this update.');
	}
}

function toggleView(form)
{
	errtext.style.display = "none";	

	if (form == "linkedit")
	{	
		if (linkedit.immform.checked == true)
		{
			imm_file.style.display = "inline";
			linkedit.linkpath.style.backgroundColor = "lightgrey";
			linkedit.linkpath.readOnly = true;
		}
		else
		{
			imm_file.style.display = "none";
			linkedit.linkpath.style.backgroundColor = "";
			linkedit.linkpath.readOnly = false;
		}
	}
	
	else if (form == "linkadd")
	{
		if (linkadd.immform.checked == true)
		{
			imm_file.style.display = "inline";
			link_file.style.display = "none";
		}
		else
		{
			imm_file.style.display = "none";
			link_file.style.display = "inline";
		}
	}
}