function message(text) {
	window.status = text;
	return true;
}

function winPrint() {
	window.print();
}

loaded = 0;
function loadimages() {
	if (document.images) {
		home_on = new Image;
		home_on.src = "../images/btn_home_on.gif";
		home_off = new Image;
		home_off.src = "../images/btn_home_off.gif";
		loaded = 1	 
	}
}

loadimages();

timerID = null	 

function on_img(imagename) {
	if (document.images && loaded == 1) {
		if (timerID) {
			clearTimeout(timerID);
		}
	if (document.images) {
		document.images[imagename].src = eval(imagename + '_on.src');
		}
	}
}

function off_img(imagename) {
	if (document.images && loaded == 1) {
		if (document.images) {
			document.images[imagename].src = eval(imagename + '_off.src');
		}
	}
}

function viewLg_img(imgname, imgFilename) {
	if (document.images) {
		document.images[imgname].src = eval(imgFilename + '_lg.src');
	}
}

function launchRemote(url) {
	remote = window.open(url,"remoteWin","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=405,height=350");		   
	remote.location.href = url;
    if (remote.opener == null) remote.opener = window; 
	remote.opener.name = "opener";
}

function launchVtour(url) {
	remote = window.open(url,"vtourWin","toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=0,resizable=0,width=405,height=400");		   
	remote.location.href = url;
    if (remote.opener == null) remote.opener = window; 
	remote.opener.name = "opener";
}

function launchFullPgView(url) {
	remote = window.open(url,"fullPgViewWin","toolbar=no,location=0,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=750,height=550");
	remote.location.href = url;
    if (remote.opener == null) remote.opener = window; 
	remote.opener.name = "opener";
}

var winopts = "toolbar=no,location=0,directories=0,status=yes,menubar=yes,scrollbars=no,resizable=no,height=350,width=510,copyhistory=0,"
var smallwindow = null;
function setEvent() {
	return false;
}
function WindowFocus() {
   if( navigator.appVersion.indexOf("2.") == -1 &&
      navigator.appVersion.indexOf("MSIE") == -1 )
	smallwindow.focus();
}
function historywin(filename) {
	fileURL = filename;
	if (parseInt(navigator.appVersion) < 4) {
		if (smallwindow != null) smallwindow.close();
	}  
	timerID = setTimeout('Opener(fileURL)', 200);
}
function Opener(winname) {
	filename = winname;
	winname = "historywin"
	smallwindow = window.open(filename,winname,winopts)
	if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1)
		smallwindow = window.open(filename,winname,winopts)
	if (navigator.appVersion.indexOf("MSIE") == -1 )
		smallwindow.mainWin = this;
		WindowFocus();
}