//NOEL Sultana 13/12/2007
// WEB HOMEPAGE FUNCTIONS


//FUNCTION clears the text when user enters the search course textbox
function ClearForm() {
  document.browsecareer.keyword.value= "";
}


//FUNCTION Refills the text when user leaves the search course textbox
function RefillForm() {
  document.browsecareer.keyword.value= "Enter keyword or course number or national code"; 
} 

//FUNCTION clears the text when user enters the search keyword textbox in header
function ClearSearchForm() {
  document.searchForm.QueryText.value= "";
}


//FUNCTION Refills the text when user leaves the search keyword textbox in header
function RefillSearchForm() {
  document.searchForm.QueryText.value= "Enter keyword/s"; 
} 


function SubmitSearch() {
  var form = document.forms[0];
  if(document.searchForm.QueryText.value=='') {
    alert('Please enter your keywords to search for.');
    form.QueryText.focus();
    return false;
  }
  return true;
}

function serviceslogin() {
  if(document.loginform.cbxLogin.value=='/ols/ols.xhtml') 
  {
     window.open(document.loginform.cbxLogin.value,'ols');
  }
  else if (document.loginform.cbxLogin.value=='https://www.det.nsw.edu.au/mvi/servlet/Logon?Command=GoToLogon') 
  {
     window.open(document.loginform.cbxLogin.value,'ses');
  }
  else  // https://portal.det.nsw.edu.au
  {
     window.open(document.loginform.cbxLogin.value,'detportal');
  }
}
