/*Contains JavaScript Function for
  Technical Support Pages
  Created By:  Scott Warden
  June 2004 */
  
  //checks choice in a select menu
  //form var name, default value, what is the list made of
  
  function CheckChoice(name, defchoice, message){
    if ( name == defchoice) {
	  alert ('You must choose from the ' + message + ' list.');
	  return false;
	}
    return true;
  }
  
//checks text box to make sure it isnt blank
function CheckForm1(){
   if (commentform.Name.value.length == 0) {
     alert('Please enter your name.');
	 commentform.Name.focus();
	 return false;
  }
   if (commentform.Email.value.length == 0) {
     alert('Please enter your email address.');
	 commentform.Email.focus();
	 return false;
  }
   if (commentform.Question.value.length == 0) {
     alert('Please enter a question or comment so we can help you.');
	 commentform.Question.focus();
	 return false;
  }
    return true;  
 
}

//checks for existing ticket number and email to provide case information to the user
function CheckForm2(){
   if (checkform.TicketNum.value.length == 0) {
     alert('Please enter your ticket number.');
	 checkform.TicketNum.focus();
	 return false;
  }
   if (checkform.Email.value.length == 0) {
     alert('Please enter your email address.');
	 checkform.Email.focus();
	 return false;
  }
    return true;  
}

//updates style choice with onchange event handler from dropdown list
//UpdateCSS (select ('this'), first part of URL being routed to)
function UpdateCSS(var1,var2){
  var URL = var2 + var1.options[var1.selectedIndex].value;
  window.location.href = URL;
}

