//<!--
	/* =============================================================================
	Function:	popUpNewWin(url)
	Purpose:	open a new window. For the javascript navigation arrays.
	Parameters:1)url
				Data type:String
				Description:Url of the website to be opened in a new window
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(2/08/2006)
	============================================================================= */
	function popUpNewWin(url)
		{
	 
			window.open(url,"","");
		}
	
		
	/* =============================================================================
	Function:	fnFocusText(strFieldName)
	Purpose:	The function is called onclick of the radio button with 2 options and a textfield. It focuses on the relevant text field depending on the field name passed.
	Parameters:1)strFieldName
				Data type:String
				Description:Name of the field to be focused
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(2/08/2006)
	============================================================================= */
	function fnFocusText(strFieldName)
	{
		document.all.item(strFieldName).focus();		
	}
	
	/* =============================================================================
	Function:	fnClearText(strFieldName)
	Purpose:	The function is called onclick of the radio button with 2 options and a textfield. It clears the relevant text field if option no is chosen.
	Parameters:1)strFieldName
				Data type:String
				Description:Name of the field to be focused
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(2/08/2006)
	============================================================================= */
	function fnClearText(strFieldName)
	{
		document.all.item(strFieldName).value="";		
	}
	
	
	/* =============================================================================
	Function:	validateEnquiry()
	Purpose:	Validates the form fields of the mbapg_ipodtouch.asp form
	Parameters:	none
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(25/08/2008)
	============================================================================= */
	

function validateEnquiry()
	{
		var blnSubmit = true;
		if (document.getElementById("selTitle").selectedIndex == 0) 
		{
			alert('Please select your title');
			document.getElementById("selTitle").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtFirstName").value == "") 
		{
			alert('Please enter your first name');
			document.getElementById("txtFirstName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtLastName").value == "") 
		{
			alert('Please enter your last name');
			document.getElementById("txtLastName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtAddress").value == "") 
		{
			alert('Please enter your postal address');
			document.getElementById("txtAddress").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtSuburb").value == "") 
		{
			alert('Please enter your suburb');
			document.getElementById("txtSuburb").focus();
			blnSubmit=false;
		}		
		else if (document.getElementById("selState").selectedIndex == 0) 
		{
			alert('Please select your state');
			document.getElementById("selState").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtPostcode").value == "") 
		{
			alert('Please enter your post code');
			document.getElementById("txtPostcode").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtCountry").value == "") 
		{
			alert('Please enter your country');
			document.getElementById("txtCountry").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtPhone").value == "") 
		{
			alert('Please enter your phone');
			document.getElementById("txtPhone").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtEmail").value == "") 
		{
			alert('Please enter your email id');
			document.getElementById("txtEmail").focus();
			blnSubmit=false;
		}
		else if (!emailcheck(document.getElementById("txtEmail").value)) 
		{
			document.getElementById("txtEmail").select();
			document.getElementById("txtEmail").focus();
			blnSubmit=false;
		}
		
		if(blnSubmit == true){
		document.frmEnquiry.submit();
		
		}
		
		
	}
	
	/* =============================================================================
	Function:	fnFocusTextHear(objForm,strValue)
	Purpose:	The function is called onclick of the radio button options(magazine,newspaper and exhibitions) of the contact us for (q:where did you hear about us?)and it focuses on the relevant text field depending on the option chosen.
	Parameters:	Required:objForm,strValue
				1)objForm
				Data type:form object
				Description:form object for the contact us form 
				2)strValue
				Data type:String
				Description:option selected
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(28/07/2006)
	============================================================================= */
	function fnFocusTextHear(objForm,strValue)
	{
		switch(strValue){
		
			case 'Magazine':
				objForm.txtMagazine.focus();
				objForm.txtNewspaper.value="";
				objForm.txtExhibitions.value="";
				objForm.txtOther.value="";
				break;
			
			case 'Newspaper':
				objForm.txtNewspaper.focus();
				objForm.txtMagazine.value="";
				objForm.txtExhibitions.value="";
				objForm.txtOther.value="";
				break;
			
			case 'Exhibitions':
				objForm.txtExhibitions.focus();
				objForm.txtMagazine.value="";
				objForm.txtNewspaper.value="";
				objForm.txtOther.value="";
				break;
				
			case 'Other':
				objForm.txtOther.focus();
				objForm.txtMagazine.value="";
				objForm.txtNewspaper.value="";
				objForm.txtExhibitions.value="";
				break;
			
			default:
				break;				
		}
	}
	/* =============================================================================
	Function:	fnClearTextHear(objForm)
	Purpose:	The function is called onclick of the radio button options(other than magazine,newspaper and exhibitions) of the enquiry for (q:where did you hear about us?)and it clears the text box values of the magazine,newspaper,exhibitions and other options
	Parameters:	Required:objForm
				1)objForm
				Data type:form object
				Description:form object for the contact us form
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(2/08/2006)
	============================================================================= */
	function fnClearTextHear(objForm)
	{
		objForm.txtMagazine.value="";
		objForm.txtNewspaper.value="";
		objForm.txtExhibitions.value="";
		objForm.txtOther.value="";
	}
	
	/* =============================================================================
	Function:	fnWhereHear(objForm,strWhereHear)
	Purpose:	The function is called onchange of the where did your hear about chifley drop down and it focuses on the text box if the value corresponding the selected value needs to be specified.
	Parameters:	Required:objForm,strWhereHear
				1)objForm
				Data type:form object
				Description:The form object
				2)strWhereHear
				Data type:string
				Description:Value chosen from the drop down
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(5/06/2009)
	============================================================================= */
		
	function fnWhereHear(objForm,strWhereHear){
			
		if (strWhereHear=="Magazine" || strWhereHear=="Newspaper" || 
			strWhereHear=="Internet Search Engine" || strWhereHear== "Website Referral" ||
			strWhereHear=="Hobsons Guide" ||
			strWhereHear== "Email Newsletter" || strWhereHear=="Exhibitions / Conferences"){				
			
				alert("Please specify the " + strWhereHear);
				if(document.getElementById("wherehear").style.display != '')
				{
					document.getElementById("wherehear").style.display='';
				}
				objForm.txtWhereHear.select();
				objForm.txtWhereHear.focus();
		}
		else if (strWhereHear=="Other"){			
				alert("Please specify " + strWhereHear);
				if(document.getElementById("wherehear").style.display != '')
				{
					document.getElementById("wherehear").style.display='';
				}
				objForm.txtWhereHear.select();
				objForm.txtWhereHear.focus();
		}
		else
		{
			objForm.txtWhereHear.value="";
			document.getElementById("wherehear").style.display='none';
		}
		
	} 
	
/* =============================================================================
	Function:	openWindowDetails()
	Purpose:	Opens the customer Login screen in a separate window
	Parameters:	none
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(28/07/2006)
============================================================================= */
	
	function openWindowDetails() {
		var propStr = 'toolbar=1,location=0,directories=0,menubar=0,status=0,scrollbars=1,resizable=1,width='+screen.width+',height='+screen.height+',top=0,left=0'
		popupWin = window.open('https://federal.apesma.asn.au/source/security/member-logon.cfm?section=customer', 'popup_eseries', propStr)
	}
	/* =============================================================================
	Function:	validateUpdateDetails(form)
	Purpose:	Validates the form fields of the update_details.asp form
	Parameters:	Required:form
				Data type:form object
				Description:Form object of the validating form
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(5/08/2006)
	============================================================================= */
function validateUpdateDetails(form)
	{
		var isSelected = checkDropList(form.selTitle, "your title.");
	
	  	if (!isSelected) {
	  	 return false;
	  	}
	  
		var isOK = checkBlank(	
							form.txtFirstName, "your first name",
						  	form.txtLastName, "your last name",
							form.txtAddress, "postal address",
							form.txtSuburb, "your suburb",
							form.txtState, "your state",
							form.txtPostcode, "your post code",
							form.txtCountry, "your country",
						  	form.txtPhone, "your phone number",
							form.txtEmail, "your e-mail id"
						  	);
		  if (!isOK) {
			return false;
		  } 
		 else if (emailcheck(form.txtEmail.value)==false){
			form.txtEmail.select();
			form.txtEmail.focus();
			return false;
		}

		if (confirm("Do you wish to send the enquiry?"))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
/* =============================================================================
	Function:	validateContact(form,strUser)
	Purpose:	Validates the form fields of the enquiry.asp form
	Parameters:	1) Required:form
				Data type:form object
				Description:Form object of the validating form
				2) Required:strUser
				Data type:string
				Description:Is used to determine the type of field validation done on
				the State field. If strUser is "australia" then checkDropList function is
				called. If strUser is "overseas" then checkBlank function is called.
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(2/08/2006)
	Modification: 		Felicity Dynan 29/10/2007
	Modification Notes: The enquiry.asp page was modified to either display a drop-down
						list for the State field if user is located in Australia or an input
						text field if the user is located overseas. validateContact needed
						to be modified when validating the State field, depending on the field
						type. The state field type is determined in the asp code when the page
						is loaded, state field name is dependent on the field type ie, selState 
						for drop-down list and txtState for input text field.
	============================================================================= */
function validateContact(form,strUser)
	{
		var isSelected = checkDropList(form.selTitle, "your title.");
	
	  	if (!isSelected) {
	  	 return false;
	  	}
	  
		var isOK = checkBlank(form.txtFirstName, "your first name",
						  	form.txtLastName, "your last name",
							form.txtAddress, "postal address",
							form.txtSuburb, "your suburb");

		  if (!isOK) {
			return false;
		  } 
		  
		  var blnStateEntered; //Boolean created for the Sate field
		  if (strUser == "aust") {
			  //State field is a drop-down list so use checkDropList
			  blnStateEntered = checkDropList(form.selState, "your state.");
		  }
		 else {
			  //State field is an input text field so use checkBlank
		  	  blnStateEntered = checkBlank(form.txtState, "your state");
		  }
		  //Test if state information has been entered by the user
		  if (!blnStateEntered) {
			  return false;  
		  }
		  
		  //Continue with the validation
		  isOK = checkBlank(form.txtPostcode, "your post code",
							form.txtCountry, "your country",
						  	form.txtPhone, "your phone number",
							form.txtEmail, "your e-mail id");
		  if (!isOK) {
			return false;
		  }
		 
		  if (emailcheck(form.txtEmail.value)==false){
			form.txtEmail.select();
			form.txtEmail.focus();
			return false;
		 }
		
		
		
		 var blnCheckRadio = checkRadio(form.rdDegree, "if you have a degree.");
		 if (!blnCheckRadio) {
				    return false;
				  }
		
		
				
		if(form.rdDegree[0].checked)
		{
			if(form.txtDegreeName.value == "")
			{
				form.txtDegreeName.focus();
				alert("Please specify your degree name.");
				return false;
			}			
		}				

		if (confirm("Do you wish to submit the form?"))
		{
			return true;
		}
		else
		{
			return false;
		}
	}


/* =============================================================================
	Function:	checkDropList()
	Purpose:	Checks if the value is selected in the drop down box
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(28/07/2006)
	============================================================================= */
function checkDropList() {
	if (arguments[0].selectedIndex == 0) {
  		alert("Please select " + arguments[1]);
  		arguments[0].focus();
  		return false;
	}
	else return true;
}

/* =============================================================================
	Function:	checkBlank()
	Purpose:	Checks if the textbox fields are blank
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(28/07/2006)
	============================================================================= */

function checkBlank() {
  for (var i = 0; i < arguments.length; i += 2) {
    if (!arguments[i].value) {
      alert("Please enter " + arguments[i+1] + ".");
      arguments[i].focus();
      return false;
    }
  }
  return true;
}

/* =============================================================================
	Function:	checkRadio
	Purpose:	Checks whether a radio button has been selected from a group.
	Parameters:	* form field name [req] - the radio button group you want to test
            	* "error message" [req] (string) - display text must be enclosed in double quotation marks.
	Returns:	Boolean. True if an radio button has been selected, False if no radio button has been selected.
	Calling:	Usually used in the form validate function: 
				<form method="post" action="destination.asp" onsubmit="return validate(this)">
				* Validate function code
				function validate(form) {
				  var isSelected = checkRadio(form.radioGroupName, "an option from the radio button group.");
				  if (!isSelected) {
				    return false;
				  }
				}
	Notes:		Limitations - This function is only useful if no radio button has been pre-selected when page is loaded.
	============================================================================= */
	function checkRadio() {
	  var checkedButton = false;
	  var question = arguments[0];
	  var message = arguments[1];
	  for (var b = 0; b < question.length; b++) {
		if (question[b].checked) {
		  checkedButton = true;
		}
	  }
	  if (checkedButton == false) {
		alert("Please select " + message);
		question[0].focus();
	  }
	  return checkedButton;
	} 
/* =============================================================================
	Function:	emailcheck(str)
	Purpose:	checks for valid email address
	Parameters:	Required:str
				Data type:String
				Description:String to be validated
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(28/07/2006)
	============================================================================= */

function emailcheck(str) {

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		
		if (str.indexOf(at)==-1){
		   alert("Please enter a valid email address.");
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please enter a valid email address.");
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please enter a valid email address.");
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please enter a valid email address.");
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }

 		 return true;					
	}
	
/* =============================================================================
	Function:	fnFocustTextBox(objForm,strWhereHear)
	Purpose:	The function is called onchange of the where did your hear about chifley drop down and it focuses on the text box if the value corresponding the selected value needs to be specified.
	Parameters:	Required:objForm,strWhereHear
				1)objForm
				Data type:form object
				Description:The form object
				2)strWhereHear
				Data type:string
				Description:Value chosen from the drop down
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(28/08/2006)
	============================================================================= */
		
	function fnFocustTextBox(objForm,strWhereHear){
			
		if (strWhereHear=="Magazine" || strWhereHear=="Newspaper" || 
			strWhereHear=="Internet Search Engine" || strWhereHear== "Website Referral" ||
			strWhereHear=="Hobsons Guide" ||
			strWhereHear=="Exhibitions / Conferences"){				
			
				alert("Please specify the " + strWhereHear);
				if(document.getElementById("wherehear").style.display != '')
				{
					document.getElementById("wherehear").style.display='';
				}
				objForm.txtWhereHear.select();
				objForm.txtWhereHear.focus();
		}
		else if (strWhereHear=="Other"){			
				alert("Please specify " + strWhereHear);
				if(document.getElementById("wherehear").style.display != '')
				{
					document.getElementById("wherehear").style.display='';
				}
				objForm.txtWhereHear.select();
				objForm.txtWhereHear.focus();
		}
		else
		{
			objForm.txtWhereHear.value="";
			document.getElementById("wherehear").style.display='none';
		}
		
		
	} 

/* =============================================================================
	Function:	fnDisplaySessionDates(objForm)
	Purpose:	The function is called onclick of the "Do you wish to register for an information session radio button?"
	Parameters:	Required:objForm,strValue
				1)objForm
				Data type:form object
				Description:The form object				
	Returns:	nothing
	Author:		Shefali Adlakha Joshi(23/03/2007)
	============================================================================= */
	function fnDisplaySessionDates(objForm){
		
		if (objForm.rdRegister[0].checked)
			{
				document.getElementById("infoSessionDates").style.display='';
			}
		else
			{
				document.getElementById("infoSessionDates").style.display='none';
			}		
	}

/* =============================================================================
	Function:	show(strId)
	Purpose:	Displays the div as passed.
	Parameters:	-
	Returns:	-
	============================================================================= */
	function show(strId) {
		document.getElementById(strId).style.display = 'block';
	}





	/* =============================================================================
	Function:	hide(strId)
	Purpose:	Displays the div as passed.
	Parameters:	-
	Returns:	-
	============================================================================= */
	function hide(strId) {
		document.getElementById(strId).style.display = '';
	}
	
	
/* =============================================================================
			Function:	changeColor(strId)
			Purpose:	Displays the div as passed.
			Parameters:	-
			Returns:	-
			============================================================================= */
			function changeColor(strId) {
				
			switch(strId)
				{
				case 'Benefits':
				  document.getElementById('Benefits').style.color = '#000000';	
				  document.getElementById('Join').style.color = '#666666';
				  document.getElementById('Update').style.color = '#666666';
				  document.getElementById('Subscribe').style.color = '#666666';
				  break;
				case 'Join':
				  document.getElementById('Benefits').style.color = '#666666';	
				  document.getElementById('Join').style.color = '#000000';
				  document.getElementById('Update').style.color = '#666666';
				  document.getElementById('Subscribe').style.color = '#666666';
				  break;
				case 'Update':
				  document.getElementById('Benefits').style.color = '#666666';	
				  document.getElementById('Join').style.color = '#666666';
				  document.getElementById('Update').style.color = '#000000';
				  document.getElementById('Subscribe').style.color = '#666666';
				  break;
				case 'Subscribe':
				  document.getElementById('Benefits').style.color = '#666666';	
				  document.getElementById('Join').style.color = '#666666';
				  document.getElementById('Update').style.color = '#666666';
				  document.getElementById('Subscribe').style.color = '#000000';
				  break;
				default:
				  document.getElementById('Benefits').style.color = '#666666';	
				  document.getElementById('Join').style.color = '#666666';
				  document.getElementById('Update').style.color = '#666666';
				  document.getElementById('Subscribe').style.color = '#666666';
				  break;
				}
				
				
					
	
			}

		/* 			=============================================================================		
			Function:	submitSurvey()
			Purpose:	The function validates the survey
			Parameters: form
						type:form object
						description:Form Object of the form being validated
			Returns:	boolean
			Author:		Shefali Adlakha Joshi(15/2/2010)
			============================================================================= */
			function submitSurvey() {
			 var blnSubmit=true; 
			if (document.getElementById("txtId").value == "") 
			{
				alert('Please enter your Id');
				document.getElementById("txtId").focus();
				blnSubmit=false;
			}
			else if (!(document.getElementById("chkSubscribe").checked))
			{
				alert('If you accept the terms of subscription to GRAD forum, please check the box. We cannot subscribe you to GRAD forum without your acceptance.');
				document.getElementById("chkSubscribe").focus();
				blnSubmit=false;
			}
			
		
			if(blnSubmit == true){
			document.frmAlumni.submit();
			
			}
				
			}
			



	/* =============================================================================
	Function:	toggle_view(strId)
	Purpose:	toggles show/hide of div by changing its class: disp_block - disp_none.
	Parameters:	-
	Returns:	-
	============================================================================= */

	function toggle_view(){
		var strId;
		for (var i=0;i<arguments.length;i++) {
			strId = arguments[i];
			if (document.getElementById(strId)){
				Obj = document.getElementById(strId)
				if (Obj.className == "disp_block"){
					str_class="disp_none";
				}else if (Obj.className == "disp_none"){
					str_class="disp_block";
				}
				if (document.all){
				Obj.setAttribute("className", str_class);
				}else{
				Obj.setAttribute("class", str_class);
				}
			}
		}
	}

	
	/*=============================================================================
	Function:	fnValidateEmailFriend()
	Purpose:	Validates the form fields of the forward_url_to_friend.asp form
	Parameters:	none
	Returns:	none
	Author:		Shefali Adlakha Joshi(12/06/2008)
============================================================================= */
	

function fnValidateEmailFriend()
	{
		var blnSubmit = true;
		if (document.getElementById("txtFriendName").value == "") 
		{
			alert('Please enter the name of your friend');
			document.getElementById("txtFriendName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtFriendEmail").value == "") 
		{
			alert('Please enter the email id of your friend');
			document.getElementById("txtFriendEmail").focus();
			blnSubmit=false;
		}
		else if (!emailcheck(document.getElementById("txtFriendEmail").value)) 
		{
			document.getElementById("txtFriendEmail").select();
			document.getElementById("txtFriendEmail").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtYourName").value == "") 
		{
			alert('Please enter your name');
			document.getElementById("txtYourName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtYourEmail").value == "") 
		{
			alert('Please enter your email id');
			document.getElementById("txtYourEmail").focus();
			blnSubmit=false;
		}
		else if (!emailcheck(document.getElementById("txtYourEmail").value)) 
		{
			document.getElementById("txtYourEmail").select();
			document.getElementById("txtYourEmail").focus();
			blnSubmit=false;
		}
		if(blnSubmit == true){
		document.frmEmailFriend.submit();
		
		}
		
		
	}

/* =============================================================================
	Function:	validateContact_new()
	Purpose:	Validates the form fields of the contact.asp form
	Parameters:	none
	Returns:	boolean
	Author:		Shefali Adlakha Joshi(11/09/2008)
	============================================================================= */
	

function validateContact_india()
	{
		var blnSubmit = true;
		if (document.getElementById("selTitle").selectedIndex == 0) 
		{
			alert('Please select your title');
			document.getElementById("selTitle").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtFirstName").value == "") 
		{
			alert('Please enter your first name');
			document.getElementById("txtFirstName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtLastName").value == "") 
		{
			alert('Please enter your last name');
			document.getElementById("txtLastName").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtAddress").value == "") 
		{
			alert('Please enter your postal address');
			document.getElementById("txtAddress").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtSuburb").value == "") 
		{
			alert('Please enter your suburb');
			document.getElementById("txtSuburb").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtState").value == "") 
		{
			alert('Please enter your state');
			document.getElementById("txtState").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtPostcode").value == "") 
		{
			alert('Please enter your post code');
			document.getElementById("txtPostcode").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtCountry").value == "") 
		{
			alert('Please enter your country');
			document.getElementById("txtCountry").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtPhone").value == "") 
		{
			alert('Please enter your phone');
			document.getElementById("txtPhone").focus();
			blnSubmit=false;
		}
		else if (document.getElementById("txtEmail").value == "") 
		{
			alert('Please enter your email id');
			document.getElementById("txtEmail").focus();
			blnSubmit=false;
		}
		else if (!emailcheck(document.getElementById("txtEmail").value)) 
		{
			document.getElementById("txtEmail").select();
			document.getElementById("txtEmail").focus();
			blnSubmit=false;
		}
		else if (!checkRadio(document.frmContact.rdDegree, "if you have a degree."))
		{			
			document.frmContact.rdDegree[0].focus();
			blnSubmit=false;
		}
		else if (document.frmContact.rdDegree[0].checked)
		{
			if(document.frmContact.txtDegreeName.value == "")
				{
					document.frmContact.txtDegreeName.focus();
					alert("Please specify your degree name.");
					blnSubmit=false;
				}						
		}
		if(blnSubmit == true){
		document.frmContact.submit();
		
		}
		
		
	}
/* =============================================================================
	Function:	fnDisplayState(strState)
	Purpose:	Displays the div as passed.
	Parameters:	-
	Returns:	-
	============================================================================= */
	function fnDisplayState(strState) {
		
		
		
		switch(strState){
		
			case 'VIC':
				document.getElementById('VIC').style.display = 'block';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'none';
				break;
			
			case 'NSW':
				document.getElementById('NSW').style.display = 'block';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'none';
				break;
			
			case 'QLD':
				document.getElementById('QLD').style.display = 'block';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'none';
				break;
				
			case 'TAS':
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('TAS').style.display = 'block';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'none';
				break;
			case 'South':
				document.getElementById('South').style.display = 'block';
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';				
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'none';				
				break;
			case 'WA':
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'block';
				document.getElementById('NT').style.display = 'none';
				break;
			case 'NT':
				document.getElementById('QLD').style.display = 'none';
				document.getElementById('VIC').style.display = 'none';
				document.getElementById('NSW').style.display = 'none';
				document.getElementById('TAS').style.display = 'none';
				document.getElementById('South').style.display = 'none';
				document.getElementById('WA').style.display = 'none';
				document.getElementById('NT').style.display = 'block';
				break;
			default:
				break;				
		}
	}
	/* =============================================================================
	Function:	fnDisplayState(strCountry)
	Purpose:	Displays the div as passed.
	Parameters:	-
	Returns:	-
	============================================================================= */
	function fnDisplayCountry(strCountry) {
		
		switch(strCountry){
		
			case 'AUS':
			document.getElementById('OVERSEAS').style.display = 'none';
			document.getElementById('AUS').style.display = 'block';
			var strState;
			 for(var k=0;k<document.frmState.rdState.length;k++){
				if(document.frmState.rdState[k].checked){
					strState=document.frmState.rdState[k].value; 					
					break;
				}
			 }   
			fnDisplayState(strState);			
			break;
			
			case 'OVERSEAS':
			document.getElementById('AUS').style.display = 'none';
			document.getElementById('OVERSEAS').style.display = 'block';
			break;
			
			default:
			break;
		}
	
	}
/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script 
***********************************************/

/*Message arrays for the scroller*/

var pausecontent=new Array()

pausecontent[0]='<h2>UNITS OFFERED IN SP3, 2008</h2>The following units will be available to re-enrolling students in Study Period 3, 2008;<br /> 102 Management Perspectives,<br /> 201 Economic Decision Making,<br /> 306 Strategic Management,<br /> 405 Environmental Management,<br /> 423 e-Business Strategy,<br /> 430 Leadership.';
pausecontent[1]='<h2>Enrolments for Study Period 3, 2008 will open in Late September.</h2>';
pausecontent[2]='<a href="pdf/exam_stats_sp1_2008.pdf" target="_blank"><h2>RESULT STATISTICS FOR SP1, 2008</h2>How do you compare? Click here to find out the average overall result statistics for your unit in Study Period 1, 2008.</a>';
pausecontent[3]='<a href="pdf/top_students_sp1_2008.pdf" target="_blank"><h2>TOP STUDENTS FOR SP1, 2008</h2>Were you one of the top students in your Unit for Study Period 1, 2007?  Click here to download a list of top students per unit and their overall grade. Congratulations to all the top students on their achievements.</a>';

pausecontent[4]='<a href="javascript:openWindowDetails();"><h2>E-COMMUNITIES SP2, 2008</h2>Have you subscribed to e-Communities yet? E-Communities is a valuable tool to allow you to enter in discussion with your fellow students and Unit Chair and find out important information to assist you in your study. Click here to subscribe to e-Communities for this Study Period.</a>';

pausecontent[5]='<a href="sc_deferWithdraw.asp"><h2>CENSUS DATES SP2, 2008</h2>The Census Date for Study Period 2, 2008 is 29th August 2008.  Please be aware that this date impacts on students who wish to defer or withdraw from a unit and students who have accessed FEE-HELP. Click here to find out more.</a>';

pausecontent[6]='<h2>CENSUS DATE FOR STUDY PERIOD 2, 2008 IS 29TH AUGUST</h2>';
 

 

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

/***********************************************
* initialize()- Initialize scroller method.
* -Get div objects, set initial positions, start up down animation
***********************************************/

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


/***********************************************
* animateup()- Move the two inner divs of the scroller up and in sync
***********************************************/

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

/***********************************************
*  swapdivs()- Swap between which is the visible and which is the hidden div
***********************************************/

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

/***********************************************
* setmessage()- Populate the hidden div with the next message before it's visible
***********************************************/

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
//-->