var Dentists=new Array(49);
//var Psychologists=new Array(49);
var Other = new Array(49);
for (loop=0; loop < 49; loop++) {
	Dentists[loop]="";
	//Psychologists[loop]="";
	Other[loop]="";
}
var Dentists1 = new Array("General","Endodontics","Oral and maxillofacial surgery",	"Oral pathology","Oral radiology ","Orthodontics","Pediatric dentistry",	"Periodontics",				"Prosthodontics","Oral Medicine");
var Psychologists1 = new Array("Psychologists");
//var Other1=new Array("Physiotherapists","Occupational therapists","Chiropractors", 
//"Counselling","Cosmetologists", "Dental Technicians", "Homeopathists", "Optometrists",
//"Massage and acupuncture therapy","Nutrition and diet consulting","Pharmacy","Psychologists");


var Other1=new Array("Chiropractors", "Counsellors/Therapists","Cosmetologists", "Dental Hygienists","Dental Technicians", "Homeopaths", "Optometrists",
"Massage Therapists and Acupuncturists","Nutritionists and Dieticians","Occupational therapists","Pharmacists","Physiotherapists","Psychologists");
for (loop=0; loop < Dentists1.length; loop++) {
			Dentists[loop]=Dentists1[loop];
}
//for (loop1=0; loop1 < Psychologists1.length; loop1++) {
//			Psychologists[loop1]=Psychologists1[loop1];
//}
for (loop1=0; loop1 < Other1.length; loop1++){
		Other[loop1]=Other1[loop1];
}
Dentists[48]="                                                            ";
//Psychologists[48]="                                                          ";
Other[48]="                                                               ";
var Physicians = new Array("Family","Anatomical Pathology","Anesthesia",
				"Cardiac Surgery",	"Cardiology","Cardiothoracic Surgery",	"Cardiovascular and Thoracic Surgery","Clinical Immunology and Allergy",	"Community Medicine","Critical Care Medicine","Dermatology",	"Diagnostic Radiology",
				"Diagnostic and Therapeutic Radiology","Emergency Medicine",
				"Endocrinology and Metabolism","Gastroenterology",
				"General Pathology",	"General Surgery","Geriatric Medicine","Hematological Pathology","Hematology",	"Infectious Diseases","Internal Medicine",				"Medical Biochemistry","Medical Genetics","Medical Microbiology",				"Medical Oncology",	"Nephrology","Neurology","Neuropathology",
				"Neurosurgery","Nuclear Medicine",	"Obstetrics and Gynecology","Occupational Medicine",	"Ophthalmology",	"Orthopedic Surgery",				"Otolaryngology","Pediatric Cardiology","Pediatric General Surgery",				"Pediatrics","Physical Medicine and Rehabilitation",	"Plastic Surgery",				"Public Health","Radiation Oncology","Respirology","Rheumatology","Therapeutic Radiology",				"Thoracic Surgery","Urology");
				
var count;
function swapOptions(the_array_name){
//alert(the_array_name);

  var numbers_select = window.document.form1.specialists;
  var the_array = eval(the_array_name);
  count=the_array.length;
  //alert(count);
  setOptionText(window.document.form1.specialists, the_array, count);
}


function setOptionText(the_select, the_array,count){
//alert(the_array);

  for (loop=0; loop < count; loop++)
  {
    the_select.options[loop].text = the_array[loop];
	the_select.options[loop].value = the_array[loop];
  }
}
 

function validateForm(){
	 var message="";
	 valid=true;
	if(document.form1.first_name.value.length==0)
		message+="Please provide valid first name  \n";
	if(document.form1.last_name.value.length==0)
		message+="Please provide valid last name \n";
	if(document.form1.phone.value.length<7)
		message=message+"Please provide valid  phone number  \n";
	if(message.length>10){
		alert(message);
		 valid=false;
	}
		return valid;
}
/*function swapOptions(dentist_selected)
{
	//alert(dentist_selected);
  if(dentist_selected =="General"){
	  window.document.form1.specialists. selectedIndex=0;
	  window.document.form1.specialists.disabled=true;
  }
  if(dentist_selected =="Specialists")
  window.document.form1.specialists.disabled=false;
}*/

