// IMAGE PRELOADER

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

// -----------------------------------

// IMAGE CHANGER

function change_image(img,imgSrc) {
	document[img].src = imgSrc ;
}

// -----------------------------------

// HEADER FRAME IMAGE CHANGER
// to change an image in another frame

function swapHead(imgName,imgSrc) {

	top.header.document[imgName].src = imgSrc

}

// -----------------------------------

// "PRINT THIS PAGE" BUTTON SCRIPT

function printit(){
	if (!window.print){
		alert("You need NS4.x or IE5 to use this print button!")
		return
	}
	window.print()
}

// this is the link:
// <a href="javascript:printit()">

// -----------------------------------

// FRAME KILLER
// must be included in the head of the html page

//if (top.location == self.location) {
//	top.location.href = "frames.htm"
//}

// -----------------------------------

// WINDOW POPUP

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=500,left = 226,top = 182');");
}

// -----------------------------------

// LOADS NEW URL AFTER A SET TIME

// onload timer
//
// pause_time determines the length of pause after the page
// is loaded until it transfers
//     0 =  0 seconds
//  5000 =  5 seconds
// 10000 = 10 seconds
pause_time = 9000;

// transfer_location is either the relative or full URL
// of the page to which you want it to transfer you
transfer_location = "main.html";

function transfer() {
 if (document.images)
  setTimeout('location.replace("'+transfer_location+'");',pause_time);
 else
  setTimeout('location.href = transfer_location;',pause_time);
}