function popup(link, title, width, height)
{
	mywindow = window.open(link, title,"location=0,toolbar=0,menubar=0,statusbar=0,status=0,scrollbars=0,width=" + width + ",height=" + height);
	mywindow.moveTo(((screen.width/2) - (width/2)),((screen.height/2) - (height/2)));
	mywindow.focus();
}

function initMouseOvers() {
	var imgs = document.images, osrc
	for (var i = 0; i < imgs.length; i++) {
		osrc = imgs[i].getAttribute("osrc")
		if (osrc != "" && osrc != null) {
			imgs[i].oimg = new Image()
			imgs[i].img  = new Image()
			imgs[i].oimg.src = osrc
			imgs[i].img.src  = imgs[i].src
			imgs[i].onmouseover = swapOn
			imgs[i].onmouseout = swapOff
		}
	}
}

function swapOn() {
	this.src = this.oimg.src
}

function swapOff() {
	this.src = this.img.src
}


function gotoUrl(url) {
	if (url != ""){
		document.location.href = url;
	}
}

function checkBox() {
	var is_checked = window.document.agreeForm.appAgree.checked;
	if (is_checked == false)
	{
		alert('You must check the checkbox indicating that you have read and understand everything on this page before you can complete the application.'); 
		document.agreeForm.appAgree.focus(); 
		return false;
	}
	return true;
}

function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
   }
}
function checkLocation() {
object="slideNav";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}

function selSELECT(which) {
	document.monthForm.bMonth.selectedIndex = which;
}

function FillDays(fldMonth, fldDay, fldYear, CauseOfEvent, nonDateText)
{
	var agt=navigator.userAgent.toLowerCase();
	var is_webtv = (agt.indexOf("webtv") != -1);
	var is_ie4mac = (agt.indexOf("mozilla/4.0") != -1) && (agt.indexOf("msie") != -1) && (agt.indexOf("mac") != -1);
	
	
	if (!(is_webtv) && !(is_ie4mac)) {
		var monthDays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
		var iDay = 0;
		var sDay = "";
		var iMonth = 0;
		var sMonth = "";
		var iYear = 0;
		var iDaysInMonth = 0;
		var iCurrentDays = 0;
		var dDate = new Date()
		var x = 0;
	
		iDate = fldDay.selectedIndex;
		iMonth = fldMonth.selectedIndex;
		sMonth = fldMonth.options[iMonth].text;
		iYear = fldYear.options[fldYear.selectedIndex].text;
		if (((iYear % 4 == 0) && (iYear % 100 != 0)) || (iYear % 400 == 0))
			monthDays[1] = 29;
		iDaysInMonth = monthDays[fldMonth.selectedIndex];

		iCurrentDays = fldDay.length;
		for (var i=iCurrentDays; i >= 0; i--) {
			fldDay.options[i]=null
		}

		dDate.setYear(iYear);
		dDate.setMonth(iMonth);
	
		if (iDate == 0)
			oDay = new Option(nonDateText, "", true, true);
		else
			oDay = new Option(nonDateText, "", false); 
		
		fldDay.options[0] = oDay;

		for (var i=1; i <= iDaysInMonth; i++) {
			dDate.setDate(i);
			x++;
			if (x == iDate)
				oDay = new Option(i, i, true, true);
			else
				oDay = new Option(i, i, false);

			fldDay.options[x] = oDay;
		}

		fldDay.focus();
		if (CauseOfEvent == "month") {
			fldMonth.focus();
		}
		if (CauseOfEvent == "year") {
			fldYear.focus();
		}
		return false;
	}	
}

function openWindow(theName) { 
// BOB is the NAME of the window we are opening. 
	msgWindow=open(theName,'BOB','width=400,height=500,menubar=no,resizable=yes,scrollbars=yes,toolbars=no'); 
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}