// JavaScript Document
// ###################################################################
// Global Variables, to be accessed by all the functions..
   var mydate = new Date();
   var newline = '\n';
//
//####################################################################

function goValue(formName, menu){
	var URL = document[formName][menu].options[document[formName][menu].selectedIndex].value;
	window.location.href = URL;
}
//####################################################################
//
// The below function is used to build a valid email address
// 
//####################################################################

function buildEmail(user, form, formName, fieldName) {
	var at = "@";
	var domain = "virtualcity.com.au";
		
	Email = user + at + domain;
	
	if (form == "n") {
		document.write('<a href=mailto:' + Email + '>' + Email + '</a>');
	} 
	
	if (form == "y") {
		getvalue=eval('document.'+formName+'.'+fieldName+'');
		getvalue.value = Email;
	}
		
}
//-->
//####################################################################
//
// The below function is used to open a new window
// 
//####################################################################

function popUp(theURL, name, w, h , t , l) {
	var windowName = name;
	var features = "status=yes,scrollbars=yes,resizable=yes,width="+w+",height="+h+",top="+t+",left="+l+"";
	var newWindow = window.open("", windowName, features);
	newWindow.focus();
	newWindow.location = theURL;
	return false;
}
