function showSection(id)
{
	o = document.getElementById(id);
	o.style.display = 'block';
}

function hideSection(id)
{
	o = document.getElementById(id); 
	o.style.display = 'none';

}

function openNewWindow(url, name, width, height)
{
	popupWin = window.open(url, name, 'resizable=no, width=' + width + ',height=' + height + ',scrollbars=no,top=100,left=100');
	popupWin.focus();
}

function openNewWindow3()
{	
	var infText = document.getElementById("Form").message.value;

	var infTitle = document.getElementById("Form").subject.value;

	top.consoleRef=window.open('','myconsole',
		'width=600,height=500'
		+',top=80,left=80'
		+',menubar=0'
   		+',toolbar=0'
  		+',status=0'
   		+',scrollbars=1'
   		+',resizable=1')
 	top.consoleRef.document.open("text/html","replace");
 	top.consoleRef.document.writeln(
 	'<html><head><title>Preview</title><link rel="stylesheet"  type="text/css" href="../styles/common.html"></head>'
 	+'<body style="background-image: url(../layout/background.jpg); margin:6px;font-size:11px;" onLoad="self.focus()">'
 	+'<u><strong>NOTE!</strong> smilies will not show up here, but they will when the reciever gets the message!<br /><br /><strong>NOTE!</strong> HTML does work here, but not in the real message!</u><br><br><div style="background-color:#fff;border:1px solid black;padding:4px;margin:3px;"><b>' + infTitle + '</b><br><br>' + infText
 	+'</div></body></html>'
 	)
 	top.consoleRef.document.close()
}

function process_form(the_form)
{
	if (document.all || document.getElementById)
	{
		if (document.getElementById("login").req_username.value=='' || document.getElementById("login").req_password.value=='')
		{
			alert("Both fields are required to login!")
			document.getElementById("login").req_username.focus()
			return false
		}
	}

	return true
}

function checkBrowser() {
	var browser = navigator.appName;
	
	if(browser == "Netscape") {
	
		this.browser = "ns";
		
	} else if(browser == "Microsoft Internet Explorer") {
		
		this.browser = "ie";
		
	}
	
	this.version = parseInt(navigator.appVersion);
	
	this.ns4 = ((this.browser=="ns")&&(this.version <= 4));
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4') > 0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5') > 0);
	this.ie6 = (navigator.userAgent.indexOf('MSIE 6') > 0);
	this.moz = ((this.browser=="ns")&&(this.version >= 5));
}
is = new checkBrowser();

	   
//-- Show menu
function show_menu(menu_nr) {

	var div_id = 'menu' + menu_nr + '';

	if(is.ie4) {

		if(document.all[div_id]) {

			document.all[div_id].style.visibility = "visible";

		}

	} else {

		if(document.getElementById(div_id)) {

			document.getElementById(div_id).style.visibility = "visible";

		}

	}

}




//-- Hide menu
function hide_menu(menu_nr) {

	var div_id = 'menu' + menu_nr + '';

	if (is.ie4) {

		if(document.all[div_id]) {

			document.all[div_id].style.visibility = "hidden";

		}

	} else {

		if(document.getElementById(div_id)) {

			document.getElementById(div_id).style.visibility = "hidden";

		}

	}

}


//-- Hide all menus
function hideAll_menu() {

	hide_menu(1);
	hide_menu(2);
	hide_menu(3);
	hide_menu(4);
	hide_menu(5);
	hide_menu(6);
	hide_menu(7);
	hide_menu(8);
	hide_menu(9);

}
