<!--
//*************************
//# Name		JavaScript.js
//# Version		11.00
//# Modified	15/08/2001 11:46
//*************************

//Browser Detection For Style Sheet
//Put into header tags and run as window is loaded

SubmittedOnce = 'no';

browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;

if (browser_type == "Netscape" && (browser_version >= 4)) {
document.write("<link REL='stylesheet' HREF='/css/ns.css' TYPE='text/css'>");
}

//*************************
//Pop up centered window
//called by :<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','yes');return false;">Popup Yahoo.com</a>

function NewWindow(theURL,winname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',screenX='+winl+',screenY='+wint+',scrollbars='+scroll+',resizable'
	win = window.open(theURL, winname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//*************************
//Pop up centered window as above but with options
//called by :<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','options-see-below');return false;">Popup Yahoo.com</a>
//options scrollbars=1,menubar=0,status=1,resizeable=0,toolbar=1,location=0,directories=0 0=off 1=on

function NewWindow2(theURL,winname, w, h, options) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',screenX='+winl+',screenY='+wint+','+options
	win = window.open(theURL, winname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//*************************
//Pop up positioned window
//called by :<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','0','0','options-see-below');return false;">Popup Yahoo.com</a>
//options scrollbars=1,menubar=0,status=1,resizeable=0,toolbar=1,location=0,directories=0 0=off 1=on

function NewWindow3(theURL,winname, w, h, winl, wint, options) {
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',screenX='+winl+',screenY='+wint+','+options
	win = window.open(theURL, winname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//*************************
//fullscreen
//called by onload="fullScreen('indexfull.asp','newwindow');"

function fullScreen(theURL,winname) {
	var attribs = "fullscreen,scrollbars"
	attribs += ",width=" + (screen.width-10) + ",height=" + (screen.height-30) + ",top=0,left=0,screenX=0,screenY=0";
	var newWindow = window.open(theURL, winname, attribs);
}

//*************************
//SubmitOnce
//Allow button to be pressed only once

function SubmitOnce(ButtonText, ButtonObject, FormObject) {
	if ( SubmittedOnce == 'no' ){
		ButtonObject.value = ButtonText;
		ButtonObject.disabled = true;
		SubmittedOnce = 'yes';
		document.forms[FormObject].submit();
	}
}

//*************************
//confirm delete
//Allow button to be pressed only once
	function ConfirmDelete (confirmpage) {
		temp = window.confirm('Is it OK to delete this record? \n\nNOTE : This operation is irreversible!');
		
		if (temp) {
			document.location = confirmpage;
		}
	}	
	
	
// -->