// JavaScript Document


var getElementsByIds = function(ids){
	//document.write('<p> ids: ' + ids[1] + '</p>');
	if(ids == undefined || (ids.length == 0)){
		alert('Expecting an array based parameter or there are no ids, exiting');
		return null;
	}
	
	
	//var elems = [];
	//for(var i = 0; i < ids.length; i++){
		var elems = document.getElementById(ids[0]);
	//}
	
	alert('elems value' + elems.value);
		
	return elems;	
}

//input data must contain at least an @ sign and a dot (.).
// Also, the @ must not be the first character of the email address, 
//and the last dot must at least be one character after the @ sign
function validate_answer_old()
{

     thisForm = document.getElementById('tutorial');
  
	 var validate=true ;
	 //var inputs=getElementsByIds(['first_name','cust_email']);
		
	
	 
	 var phone = document.getElementById('phoneChange');
	 
	 for (i=0;i<document.tutorial.password.length;i++) {
	if (document.tutorial.password[i].checked) {
		passAns = document.tutorial.password[i].value;
		
	}
   }

	
	validate=true;
		
	//alert('validate='+validate);
	 if(validate==true)
	 {
	  //document.thisform.action ="\contactUs.asp?path=<% =request("path")%>";
	  //document.thisform.action ="\contactUs.asp";
	  
	  //alert('action='+thisForm.action);
	  //thisForm.action='contactUs_safe.asp';
	  //thisForm.action='http://www.globaloutpostservices.com';
	  thisForm.action='/default.asp';
	  
	  alert('phone ='+phone.value  + '  passAns='+ passAns);
	  
	  thisForm.submit();
	  
	  
	 }
	 


}


function validate_answer() {
	
	thisForm = document.getElementById('tutorial');
	
	/* var phone = document.getElementById('phoneChange');
	 
	 for (i=0;i<document.tutorial.password.length;i++) {
	if (document.tutorial.password[i].checked) {
		passAns = document.tutorial.password[i].value;
		
	}
   }*/
	
	  thisForm.action='/validate_Stat_answer.asp';
	  
	   // alert('phone ='+phone.value  + '  passAns='+ passAns);
	  
	  thisForm.submit();
	
}



