// 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()">

// -----------------------------------

// MAP WINDOW POPUP

function popUpMap(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=530,height=615,left = 226,top = 182');");
}

// -----------------------------------

// INFO WINDOW POPUP

function popUpInfo(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=380,left = 226,top = 182');");
}

// -----------------------------------

// CRUISE WINDOW POPUP

function popUpCruise(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=450,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 = 3500;

// 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);
}