//FRAMEBUSTER
if (parent.frames.length > 0) {
	parent.location.href = location.href;
}

var ns  = 0;
var ie  = 0;
var ns6 = 0;

if ( ( navigator.appName == "Netscape" ) && ( navigator.appVersion.charAt(0) == "4" ) )
{
	ns = 1;
}
else if ( ( navigator.appName == "Netscape" ) && ( navigator.appVersion.charAt(0) == "5" ) )
{
	ns6 = 1;
}
else
{
	ie = 1;
}


logoOff = new Image();  logoOff.src = "/images/spotlogo.gif";
logoOn = new Image();  logoOn.src = "/images/spotlogo2.gif";



function showLayer( layerName )
{	
	if ( ns == 1 )
	{
		document.layers[layerName].visibility = "show";
	}
	else if ( ns6 == 1 )
	{
		theLayer = document.getElementById( layerName );
		theLayer.style.visibility = "visible";
		theLayer.style.left="135px";
		theLayer.style.top="255px";
		theLayer.style.width="465px";
		theLayer.style.backgroundColor="white";
	}
	else
	{
		document.all[layerName].style.visibility = "visible";
	}
}
        
function hideLayer( layerName )
{
	if ( ns == 1 )
	{
		document.layers[layerName].visibility = "hide";
	}
	else if ( ns6 == 1 )
	{
		theLayer=document.getElementById( layerName );
		theLayer.style.visibility = "hidden";
		theLayer.style.left="135px";
		theLayer.style.top="640px";
		theLayer.style.width="465px";
		theLayer.style.backgroundColor="white";
	}
	else
	{
		document.all[layerName].style.visibility = "hidden";
	}
}

function hideAllAgency()
{
	for ( i = 0; i < document.forms.length - 1; i++ )
	{
		document.forms[i].reset();
	}

	hideLayer( 'callForm' );
	hideLayer( 'bothForm' );
	hideLayer( 'numberForm' );
	hideLayer( 'searchTips' );
  hideLayer( 'batchForm' );
}

function hideAll()
{
	for ( i = 0; i < document.forms.length - 1; i++ )
	{
		document.forms[i].reset();
	}

    hideLayer( 'allForm' );
	  hideLayer( 'bothForm' );
	  hideLayer( 'numberForm' );
	  hideLayer( 'numberFormIA' );
	  hideLayer( 'searchTips' );
}


function openHelp()
{
	var helpWindow = window.open("help.html", "helpWindow", "menubar=no,toolbar=no,directories=no,scrollbars=no,resizable=no,width=400,height=350");
}


function openWindow( url )
{
	var helpWindow = window.open(url, "helpWindow", "menubar=yes,toolbar=yes,directories=no,scrollbars=yes,resizable=yes");
}


function openBatchAlert( batchNum, invCount)
{
  var url = "viewBatchAlert.jsp?batchNum=" + batchNum + "&invCount=" + invCount;
	var w = "400";
	var h = "315";
	var winName = "Alert";
	var menuargs = "menubar=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,width=" + w + ",height=" + h;
	window.open(url,winName,menuargs);
}


function openHelpWindow( url )
{
	var w = "400";
	var h = "400";
	var winName = "helpWindow";
	var menuargs = "menubar=yes,toolbar=no,directories=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h;
	var winName = window.open(url, winName, menuargs);
}


function getPage( url )
{
	window.location = url;
}


function closeWindow( url )
{
	window.close();
}


function swap(imgName1, imgName2)
{
	imgNew = eval(imgName2 + ".src");
	document[imgName1].src = imgNew;
}


function openPDFWindow( url, id )
{ 
        var helpWindow = window.open(url, id, "menubar=yes,toolbar=yes,directories=no,scrollbars=yes,resizable=yes"); 
}


function checkAll( theForm )
{
	for (var i=0; i<document.forms[theForm].elements.length ; i++) 
	{
		var e = document.forms[theForm].elements[i];
		if ((e.name != 'allbox') && (e.type=='checkbox'))
		e.checked = document.forms[theForm].allbox.checked;
	}
}
