<!--

// This reloads Netscape 4.xx after window resize
NS4 = document.layers;
if (NS4) {
  origWidth = innerWidth;
  origHeight = innerHeight;
}

function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
  location.reload();
}

if (NS4) onresize = reDo;

/*
Auto tabbing script- By JavaScriptKit.com
http://www.javascriptkit.com
This credit MUST stay intact for use
*/

function autotab(original,destination){
if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
destination.focus()
}


//	Functions to preload images and for rollover effect
function MakeArray(n) {
        if (good=="y") {
           this.length = n
           for (var i = 1; i<=n; i++) {
              this[i] = new Image()
           }
        return this
        }
}

function imageOn(imgDocID, imgNum) {
        if (good=="y") {
           document.images[imgDocID].src = imgOn[imgNum].src
        }
}

function imageOff(imgDocID, imgNum) {
        if (good=="y") {
           document.images[imgDocID].src = imgOff[imgNum].src
        }
}

if(parseInt(navigator.appVersion)>=3)
good="y";
else good="n";
	if (good=="y") {
        

 }


/*
If user's browser does not support javascript-based "Print" button,
this function will tell user to use browser's (system's) print function.
*/
function printPage() {
	if (!window.print) {
	alert("It seems that your browser does not support this button.\nPlease use your browser's File Menu Print function instead.")
	return
	}
window.print()
}


/*
This function makes the top-center of the popup window with fixed preset width
to pop exactly to the location on the screen calculated from the screen's dimensions

usage: onClick="popUp(this.href,'w','h');return false;"
(return is set to false to avoid refreshing of the parent window)
*/

function popUp(winURL, w, h) {
var w = 723;							/* just in case we want it back: old number was 622 */
var h = 500;
var l = (screen.width - w)*4/5;
var t = (screen.height - h)*1/3;
winProps =
'left='+l+',top='+t+',width='+w+',height='+h+',location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no';
win = window.open(winURL, "work", winProps);
return false;
}

//	same as above, but with full height
function popUpAutoHeight(winURL, w) {
var w = 723;							/* just in case we want it back: old number was 622 */
var l = (screen.width - w)*4/5;
winProps =
'left='+l+',width='+w+',location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no';
win = window.open(winURL, "work", winProps);
return false;
}

/*
This function will make link in popup window to return to original
window that opened the popup ("opener") and display new page there

Usage:
with popup remaining open: onClick="return backToOpener(this)"
with popup closing itself: onClick="return backToOpener(this,true)"
*/
function backToOpener(POPlink, POPclose, POPcloseOnly)
{
	if (! (window.focus && window.opener))return true;
		window.opener.focus();
	if (! POPcloseOnly)window.opener.location.href=POPlink.href;
	if (POPclose)window.close();
		return false;
}

function phnareaskip(phnarea)
{
	if (phnarea.length == 3)
	{
		theForm.phnprefix.focus();
	}
}

function phnprefixskip(phnprefix)
{
	if (phnprefix.length == 3)
	{
		theForm.phnsuffix.focus();
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
	
		preloadFlag = true;
	}
}

	function openWindow(file, w, h)
	{
		window.open(file,"popup","toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + w + ",height=" + h);
	}

// -->









