//////////////////////// 
/////GLOBAL VARIABLES/// 
//////////////////////// 
var browser = navigator.appName 
var formObject 
 
 
// NETSCAPE RESIZE FIX 
	if (document.layers) { 
		widthCheck = window.innerWidth 
		heightCheck = window.innerHeight 
		window.onResize = resizeFix 
	} 
	function resizeFix() { 
		if (widthCheck != window.innerWidth || heightCheck != window.innerHeight) 
		document.location.href = document.location.href 
	} 
 
// GET BROWSER TYPE 
//''IF IT IS INTERNET EXPLORER THEN BROWSER WILL BE IE 
//''IF IT IS NETSCAPE THEN BROWSER WILL BE NETSCAPE 
		if (browser == "Microsoft Internet Explorer") { 
			//alert("IE") 
			browser = "IE" 
		} 
		if (browser == "Netscape") { 
			//alert("Netscape") 
			browser = "Netscape" 
		} 
// SET THE FORM OBJECT FUNCTION 
//''PASS THE NAME OF THE FORM AND THE DIV ID IF NEEDED 
	function setFormObject(formName, layerName) { 
		if (browser == "IE") { 
			formObject = 'document.' + formName 
			//alert(formObject) 
		} 
		if (browser == "Netscape") { 
			formObject = 'document.' + formName 
			//alert(formObject) 
		} 
	} 
//THIS IS BASICLY THE SAME AS THE SET FORM FUNCTION RATHER IT SUBMITS IT 
	function submitForm(formName, layerName) { 
		setFormObject(formName, layerName) 
		eval(formObject).submit(); 
		return false; 
	} 
 
// OPEN NEW WINDOW FUNCTION 
//''PASS THESE VALUES: 
//''URL, windowName, width(int), height(int), showLocation(yes/no), showToolbar(yes/no) 
//''showStatusBar(yes/no), showScrollBar(yes/no), resizable(yes/no) 
	function openWindow(URL, windowName, width, height, showLocation, showToolbar, showStatusBar, showScrollBar, resizable) { 
		arrValidate = new Array(8) 
		arrValidate[0] = URL; 
		arrValidate[1] = windowName; 
		arrValidate[2] = width; 
		arrValidate[3] = height; 
		arrValidate[4] = showLocation; 
		arrValidate[5] = showToolbar; 
		arrValidate[6] = showStatusBar; 
		arrValidate[7] = showScrollBar; 
		arrValidate[8] = resizable; 
		blnProceed = true; 
		for (i = 0; i <= 8; i++) { 
			if (arrValidate[i] == null) { 
				alert("You are missing a variable when calling your function") 
				blnProceed = false; 
				break; 
			} 
		} 
		 
		if (blnProceed == true) { 
			var windowString 
			windowString = 'location=' + showLocation + ','; 
			windowString += 'toolbar=' + showToolbar + ','; 
			windowString += 'statusbar=' + showStatusBar + ','; 
			windowString += 'height=' + height + ','; 
			windowString += 'width=' + width + ','; 
			windowString += 'scrollbars=' + showScrollBar + ','; 
			windowString += 'resizable=' + resizable; 
			window.open(URL,windowName,windowString) 
		} 
		return false; 
	} 
// CLOSE WINDOW FUNCTION 
	function closeWindow() { 
		window.close() 
		return false; 
	} 
// GO BACK FUNCTION 
//''PASS pages(number) 
	function goBack(pages) { 
		history.back(pages) 
		return false; 
	} 
 
	 
	////////////////////////////LOGIN PAGE FUNCTIONS//////////////////// 
	 
	function verify() { 
		var formObject; 
		proceed = true;
		if (navigator.appName == "Microsoft Internet Explorer") { 
			browser = "IE" 
			formObject = document.access 
		} 
		if (navigator.appName == "Netscape") { 
			browser = "NS" 
			formObject = document.menu.document.access 
		} 
		var userName = eval(formObject).user; 
		var passWord = eval(formObject).pass; 
		var proceed = true; 
		if (!userName.value){ 
			alert("Please Enter a Username"); 
			proceed = false; 
		} 
		if (!passWord.value){ 
			alert("Please Enter a Password"); 
			proceed = false; 
		} 
//		if (proceed != false){ 
//			eval(formObject).submit() 
//		} 
		return proceed; 
	} 
	 
	function submitLoginForm() { 
		return verify();
	} 
	 
	function listSubmit(){ 
		setFormObject('dir', 'menu') 
		eval(formObject).submit(); 
	} 
	 
	function submitForm(){ 
		setFormObject('category', 'menu') 
		eval(formObject).submit(); 
	} 
	 
	 
	 
	