var mylocation = window.location;

var sitename='IndianHoliday.com';

var siteURL='www.indianholiday.com';
//var siteURL='localhost/indianholiday.com';

var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
///////////////////////////Country and country code Array
var ct_arr = Array(
Array('Afghanistan',93), 
Array('Albania',355), 
Array('Algeria',213), 
Array('American Samoa',684), 
Array('Andorra',376), 
Array('Angola',244), 
Array('Anguilla',809), 
Array('Antarctica',672), 
Array('Antigua and Barbuda',1268), 
Array('Argentina',54), 
Array('Armenia',374), 
Array('Aruba',297), 
Array('Ascension',247), 
Array('Australia',61), 
Array('Austria',43), 
Array('Azerbaijan',994), 
Array('Bahamas',1242), 
Array('Bahrain',973), 
Array('Bangladesh',880), 
Array('Barbados',1246), 
Array('Belarus',375), 
Array('Belgium',32), 
Array('Belize',501), 
Array('Benin',229), 
Array('Bermuda',1441), 
Array('Bhutan',975), 
Array('Bolivia',591), 
Array('Bosnia and Herzegovina',387), 
Array('Botswana',267), 
Array('Brazil',55), 
Array('British Virgin Islands',284), 
Array('Brunei',673), 
Array('Bulgaria',359), 
Array('Burkina Faso',226), 
Array('Burundi',257), 
Array('Cambodia',855), 
Array('Cameroon',237), 
Array('Canada',1), 
Array('Cape Verde Islands',238), 
Array('Cayman Islands',345), 
Array('Central African Republic',236), 
Array('Chad',235), 
Array('Chatham Island (NewZealand)',64), 
Array('Chile',56), 
Array('China',86), 
Array('Christmas Island',672), 
Array('Cocos Islands',672), 
Array('Colombia',57), 
Array('Comoros',269), 
Array('Congo',242), 
Array('Cook Islands',682), 
Array('Costa Rica',506), 
Array('Croatia',385), 
Array('Cuba',53), 
Array('Cyprus',357), 
Array('Czech Republic',420), 
Array('Denmark',45), 
Array('Diego Garcia',246), 
Array('Djibouti',253), 
Array('Dominica',767), 
Array('Dominican Republic',809), 
Array('Easter Island',56), 
Array('Ecuador',593), 
Array('Egypt',20), 
Array('El Salvador',503), 
Array('Equatorial Guinea',240), 
Array('Eritrea',291), 
Array('Estonia',372), 
Array('Ethiopia',251), 
Array('Falkland Islands',500), 
Array('Faroe Islands',298), 
Array('Fiji',679), 
Array('Finland',358), 
Array('France',33), 
Array('French Antilles',596), 
Array('French Guyana',594), 
Array('French Polynesia',689), 
Array('Fyrom (Macedonia)',389), 
Array('Gabon',241), 
Array('Gambia',220), 
Array('Georgia',995), 
Array('Germany',49), 
Array('Ghana',233), 
Array('Gibraltar',350), 
Array('Greece',30), 
Array('Greenland',299), 
Array('Grenada and Carriacuou',473), 
Array('Grenadin Islands',784), 
Array('Guadeloupe',590), 
Array('Guam',671), 
Array('Guantanamo Bay',53), 
Array('Guatemala',502), 
Array('Guiana',594), 
Array('Guinea',224), 
Array('Guinea-Bissau',245), 
Array('Guyana',592), 
Array('Haiti',509), 
Array('Honduras',504), 
Array('Hong Kong',852), 
Array('Hungary',36), 
Array('Iceland',354), 
Array('India',91), 
Array('Indonesia',62), 
Array('Iran',98), 
Array('Iraq',964), 
Array('Ireland',353), 
Array('Israel',972), 
Array('Italy',39), 
Array('Ivory Coast',225), 
Array('Jamaica',876), 
Array('Japan',81), 
Array('Jerusalem',2), 
Array('Jordan',962), 
Array('Kazakhstan',7), 
Array('Kenya',254), 
Array('Kiribati',686), 
Array('South Korea',82), 
Array('Kuwait',965), 
Array('Kygyzstan',996), 
Array('Laos',856), 
Array('Latvia',371), 
Array('Lebanon',961), 
Array('Lesotho',266), 
Array('Liberia',231), 
Array('Libya',218), 
Array('Liechtenstein',41), 
Array('Lithuania',370), 
Array('Luxembourg',352), 
Array('Macau',853), 
Array('Macedonia',389), 
Array('Madagascar',261), 
Array('Malawi',265), 
Array('Malaysia',60), 
Array('Maldives',960), 
Array('Mali',223), 
Array('Malta',356), 
Array('Mariana Islands',670), 
Array('Marshall Islands',692), 
Array('Martinique',596), 
Array('Mauritania',222), 
Array('Mauritius',230), 
Array('Mayotte',269), 
Array('Mexico',52), 
Array('Micronesia,Federated States',691), 
Array('Midway Islands',808), 
Array('Miquelon',508), 
Array('Moldova',373), 
Array('Monaco',377), 
Array('Mongolia',976), 
Array('Montserrat',664), 
Array('Morocco',212), 
Array('Mozambique',258), 
Array('Myanmar',95), 
Array('Namibia',264), 
Array('Nauru',674), 
Array('Nepal',977), 
Array('Netherlands',31), 
Array('Neth. Antilles',599), 
Array('Nevis',869), 
Array('New Caledonia',687), 
Array('New Zealand',64), 
Array('Nicaragua',505), 
Array('Niger',227), 
Array('Nigeria',234), 
Array('Niue',683), 
Array('Norfolk Island',672), 
Array('North Korea',850), 
Array('Norway',47), 
Array('Oman',968), 
Array('Pakistan',92), 
Array('Palau',680), 
Array('Panama',507), 
Array('Papua New Guinea',675), 
Array('Paraguay',595), 
Array('Peru',51), 
Array('Philippines',63), 
Array('Poland',48), 
Array('Portugal',351), 
Array('Principe',239), 
Array('Puerto Rico',1787), 
Array('Qatar',974), 
Array('Reunion Island',262), 
Array('Romania',40), 
Array('Russia',7), 
Array('Rwanda',250), 
Array('St. Helena',290), 
Array('St. Kitts',869), 
Array('St. Lucia',758), 
Array('St Pierre et Miquelon',508), 
Array('St. Vincent',784), 
Array('Saipan',670), 
Array('San Marino',378), 
Array('Sao Tome',239), 
Array('Saudi Arabia',966), 
Array('Senegal Republic',221), 
Array('Serbia',381), 
Array('Seychelles',248), 
Array('Sierra Leone',232), 
Array('Singapore',65), 
Array('Slovakia',421), 
Array('Slovenia',386), 
Array('Solomon Islands',677), 
Array('Somalia',252), 
Array('South Africa',27), 
Array('Spain',34), 
Array('Sri Lanka',94), 
Array('Sudan',249), 
Array('Suriname',597), 
Array('Swaziland',268), 
Array('Sweden',46), 
Array('Switzerland',41), 
Array('Syria',963), 
Array('Taiwan',886), 
Array('Tajikistan',7), 
Array('Tanzania',255), 
Array('Thailand',66), 
Array('Togo',228), 
Array('Tokelau',690), 
Array('Tonga',676), 
Array('Trinidad and Tobago',868), 
Array('Tunisia',216), 
Array('Turkey',90), 
Array('Turkmenistan',993), 
Array('Turks & Caicos Islands',649), 
Array('Tuvalu',688), 
Array('Uganda',256), 
Array('Ukraine',380), 
Array('United Arab Emirates',971), 
Array('United Kingdom',44), 
Array('United States',1), 
Array('Uruguay',598), 
Array('U.S. Virgin Islands',340), 
Array('Uzbekistan',7), 
Array('Vanuatu',678), 
Array('Vatican city',39), 
Array('Venezuela',58), 
Array('Vietnam',84), 
Array('Wake Island',808), 
Array('Wallis & Futuna Islands',681), 
Array('Western Samoa',685), 
Array('Yemen',967), 
Array('Yugoslavia',381), 
Array('Zaire',243), 
Array('Zambia',260), 
Array('Zanzibar',259), 
Array('Zimbabwe',263)
);

///////////Function for country
function ShowCountryOption()
{
	for(var x=0;x<ct_arr.length;x++)
	{
		document.write('<option value="' + ct_arr[x][0] + '">' + ct_arr[x][0] + '</option>\n');
	}

}

//////////////////////Function for ISD code
function getISDCode(sCtry)
{
	for(var x=0;x<ct_arr.length;x++)
	{
		if (sCtry == ct_arr[x][0])
		{
			
			document.medicalform.txiCountryCode.value = ct_arr[x][1];
		}
	}

}


///////////////////////////////////////////////////////////////////////////////////////////////////////

	var ref = document.referrer;
	
	//alert(ref);
//var ref='http://www.tourtoindia.com/rajasthan/pushkar-fair.html';
//var t1=ref.split("/")
//var  n=t1.length
//var t2=t1[n -1];
//alert  (t2);
//var  locat=t2.split(".")

//var  m=locat.length

//var l2=locat[0]
	
//alert (l2);

var mydate=new Date()

var year=mydate.getYear()



if (year < 1000)

year+=1900



var day=mydate.getDay()

var month=mydate.getMonth()

function OpenModalDialog()
{
  var ReturnedValue = showModalDialog("http://www.medicalindiatourism.com/medical-process-flowchart.html","",
    "dialogWidth:620px; dialogHeight:710px; status:no; center:yes");
 
}


var daym=mydate.getDate()

if (daym<10)

daym="0"+daym

var hours=mydate.getHours()

var minutes=mydate.getMinutes()

var seconds=mydate.getSeconds()

var dn="AM"

if (hours>=12)

dn="PM"

if (hours>12){

hours=hours-12

}

if (hours==0)

hours=12

if (minutes<=9)

minutes="0"+minutes

if (seconds<=9)

seconds="0"+seconds



var dateVal = daym + "-" + montharray[month] + "-" + year

var rtflg=true;

var pkflg=true;

var retmn = 0;

var pickmn = 0;



//////////////////////////////////////////////////////////event handling  for air booking
function checkIt(el) 
{
	//alert(el);
if (el.value == "air-booking" )  
{
	if(el.checked)
	{
	//alert ('hello1');
	//form.txaQuery.focus();  
	alert('Please mention:: \n\n Fly from & Fly to \n\n in Additional Requirements field');
	   generalfrm.txaQuery.focus();        
	//document.generalfrm["flight_from"].disabled=false;
	//document.generalfrm["flight_to"].disabled=false;
//document.getElementById('air').style.display = "block";
	}
	/*else
	{
	document.generalfrm["flight_from"].value='';
	document.generalfrm["flight_to"].value='';
	document.generalfrm["flight_from"].disabled=true;
	document.generalfrm["flight_to"].disabled=true;
//document.getElementById('air').style.display = "none";
	}*/
}
}
///////////////////////////////////////////////////////////

function frmstyle(path){

document.write('<link rel="stylesheet" href="'+path+'style1/form.css" type="text/css">');

}



function frmtop(path,hdname){

}



function frmbtm(path){

document.write('</td> </tr> </table>');

}

function updateEvents(events)
{
//alert(events);
if(document.medicalform.other.checked==true)
document.getElementById('more_tour').style.display='block';
else
document.getElementById('more_tour').style.display='none';
document.medicalform.other_option.value='NA';
}

function updateFields(events)
{
	//alert(events);

	if(events=="feet-inches")
	{
		document.getElementById('ftin').style.display='block';
		document.getElementById('cmts').style.display='none';
		
	}
	else if(events=="centimeters")
	{
		document.getElementById('cmts').style.display='block';
		document.getElementById('ftin').style.display='none';
	}
	

}

///////////////////////

function commonbooking(path, tour, http_ref)

{
document.write('<link rel="stylesheet" href="'+path+'style1/form.css" type="text/css">');

document.write('<br><div align="center"><form name="medicalform" action="http://www.indianholiday.com/all-php-bin/medicalbooking1.php" method="post" onsubmit="return chkQueryForm(this);"> <input type="hidden" name="http_ref" value="'+http_ref+'"><input type="hidden" name="frm_name" value="'+tour+'"><input type="hidden" name="referer" value="'+window.location+'"><input type="hidden" name="sitename" value="'+sitename+'"><input type="hidden" name="siteURL" value="'+siteURL+'">');

//document.write('<br><div align="center"><form name="medicalform" action="http://localhost/indianholiday.com/all-php-bin/medicalbooking.php" method="post" onsubmit="return chkQueryForm(this);"> <input type="hidden" name="http_ref" value="'+http_ref+'"><input type="hidden" name="frm_name" value="'+tour+'"><input type="hidden" name="referer" value="'+window.location+'"><input type="hidden" name="sitename" value="'+sitename+'"><input type="hidden" name="siteURL" value="'+siteURL+'">');


document.write('<table width="570" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><table border="0" cellspacing="0"cellpadding="0" width="570"><tr><td width="180" height="40" background="images/medical-form/formtopleft.jpg" style="background-repeat:no-repeat;" valign="top" >&nbsp; <a href="javascript:OpenModalDialog()" class="formhead"> Medical Process Flowchart </a></td><td width="214" height="40" background="images/medical-form/form-top-center.jpg" style="background-repeat:repeat-x;"></td><td><IMG SRC="images/medical-form/form-top-right.jpg" WIDTH="176" HEIGHT="40" BORDER="0" ALT=""></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0" height="277" background="images/medical-form/background.jpg"><tr><td valign="top" width="52%"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td height="10"></td></tr><tr> <td class=ftxtmedical><b>Name: </b></td> <td><select NAME="title" size="1" class="fldsnnew"> <option SELECTED VALUE="Mr">Mr <option VALUE="Mrs">Mrs <option VALUE="Ms">Ms <option VALUE="Dr">Dr </select> <input TYPE="text" NAME="your_name" SIZE="16" class="fldsnnew"> <sup><font color="red">*</font></sup></td> </tr><tr> <td class=ftxtmedical><b>Email: </b> </td> <td><input TYPE="text" NAME="your_email" SIZE="25" class="fldsnnew"> <sup><font color="red">*</font></sup></td> </tr><tr> <td class=ftxtmedical><b>Verify Email: </b> </td> <td><input TYPE="text" NAME="your_remail" SIZE="25" class="fldsnnew"><sup><font color="red">*</font></sup></td> </tr><tr><td height="5"></td></tr><tr> <td class=ftxtmedical><b>Country:</b></td><td><select  name="selCountry" class="fldsnnew" onchange="getISDCode(this.value)"><option value="">Your Country of Residence</option>');
ShowCountryOption();
document.write('</select><sup><font color="red">*</font></sup></td></tr><tr><td colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td class=ftxtmedical width="23%"><b>Telephone<br> Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td> <td class=ftxtmedical width="77%">Country&nbsp;&nbsp; Area&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Phone<br><input name="txiCountryCode" size="4" class="fldsnnew"> <input name="txiCityCode" size="5" class="fldsnnew"> <input name="txiPhone" size="7" class="fldsnnew"><font color="red"><font color="red">*</font></font></td> </tr></table></td> </tr><tr> <td class=ftxtmedical><B>Mobile:</B></td> <td><INPUT TYPE="text" NAME="txtmobile" SIZE="20" MAXLENGTH="10"  class="fldsnnew"><font color="red"><font color="red">*</font></font></td> </tr><tr> <td class=ftxtmedical><B>Age:</B></td> <td><INPUT TYPE="text" NAME="selAge" SIZE="5" MAXLENGTH="2"  class="fldsnnew"> <font color="red"><font color="red">*</font></font></td> </tr><tr><td colspan="2"><table border="0" width="65%" cellspacing="0" cellpadding="0"><tr> <td class=ftxtmedical width="25%"><b>Sex: </b></td> <td class=ftxtmedical width="75%"><INPUT TYPE="radio" NAME="selSex" value="Male" checked> Male&nbsp;&nbsp;&nbsp<INPUT TYPE="radio" NAME="selSex" value="Female"> Female</td> </tr></table></td> </tr><tr> <td   colspan="2"   valign="top" align="left"><table border="0" cellspacing="0" cellpadding="0"  ><tr><td class=ftxtmedical valign="top" align="left"><B>Height:&nbsp;&nbsp;&nbsp;&nbsp;</b><select NAME="hUnit" size="1" class="fldsnnew" onChange="updateFields(this[this.selectedIndex].value);"> <option SELECTED VALUE="feet-inches">feet-inches  <option VALUE="centimeters">centimeters</select> &nbsp;</td><td  valign="top"></td><td ><div id="cmts" style="display:none"><INPUT TYPE="text" NAME="cms" SIZE="3" MAXLENGTH="3"  class="fldsnnew" value="cms" onClick="this.value=\'\' ;"></div></td><td><div id="ftin" style="display:none"><INPUT TYPE="text" NAME="feet" SIZE="3" MAXLENGTH="1"  class="fldsnnew" value="ft" onClick="this.value=\'\' ;">&nbsp;<INPUT TYPE="text" NAME="inches" SIZE="3" MAXLENGTH="2"  class="fldsnnew" value="ins" onClick="this.value=\'\' ;"> </div></td><td><font color="red">*</font></td></tr></table></td> </tr><tr><td height="8"></td></tr><tr> <td colspan="2"  class=ftxtmedical><B>Weight:&nbsp;&nbsp;&nbsp;</b><select NAME="wUnit" size="1" class="fldsnnew"> <option SELECTED VALUE="lbs">lbs <option VALUE="kgs">kgs </select>&nbsp;<INPUT TYPE="text" NAME="selweight" SIZE="5" MAXLENGTH="3"  class="fldsnnew">&nbsp;<font color="red">*</font></td></tr><tr><td height="8"></td></tr> <tr> <td colspan="2" class=ftxtmedical style="padding-left:10;"><B>Medical Treatment:</b></td> </tr> <tr> <td colspan="2" style="padding-left:10;"><SELECT NAME="med_treatment" STYLE="background:#FFFFFF"  class="fldsnnew"> <option value="">Please Select</option> <option value="Anesthesiology">Anesthesiology</option> <option value="Biochemistry">Biochemistry</option> <option value="Apollo Cancer Institute">Apollo Cancer Institute</option> <option value="Apollo Cardiac Center">Apollo Cardiac Center</option> <option value="Clinical Apheresis">Clinical Apheresis</option> <option value="Clinical Pathology">Clinical Pathology</option> <option value="Critical Care">Critical Care</option> <option value="Dental Surgery">Dental Surgery</option> <option value="Dermatology">Dermatology</option> <option value="Dietetics and Nutrition">Dietetics & Nutrition</option> <option value="ENT">ENT</option> <option value="Emergency Medicine">Emergency Medicine </option> <option value="Trauma">Trauma</option> <option value="Endocrinology">Endocrinology</option> <option value="Fetal Medicine">Fetal Medicine</option> <option value="Gastroentology and Hepatology">Gastroentology & Hepatology</option> <option value="Geriatrics">Geriatrics</option> <option value="Gynaeocology and Obstetrics">Gynaeocology & Obstetrics</option> <option value="Histopathology">Histopathology</option> <option value="Haematology">Haematology</option> <option value="Hyper baric Oxygen Therapy">Hyper baric Oxygen Therapy</option> <option value="Immunology and Molecular Biology">Immunology & Molecular Biology</option> <option value="IVF">IVF</option> <option value="Joint Surgery">Joint Surgery</option> <option value="Multi Organ Transplantation">Multi Organ Transplantation</option> <option value="Microbiology">Microbiology</option> <option value="Apollo Neurosciences Center">Apollo Neurosciences Center</option> <option value="Nuclear Medicine">Nuclear Medicine</option> <option value="Nephrology">Nephrology</option> <option value="Ophthalmology">Ophthalmology</option> <option value="Orthopedics">Orthopedics</option> <option value="Apollo Center for Advanced Pediatrics">Apollo Center for Advanced Pediatrics <option value="Physiotherapy and Rehabilitation">Physiotherapy & Rehabilitation</option> <option value="Plastic Surgery and Cosmetic Surgery">Plastic Surgery & Cosmetic Surgery</option> <option value="Psychiatry and Psychology">Psychiatry & Psychology</option> <option value="Radiology">Radiology</option> <option value="Respiratory Medicine">Respiratory Medicine</option> <option value="Sleep Medicine">Sleep Medicine</option> <option value="Rheumatology">Rheumatology</option> <option value="Spinal Surgery">Spinal Surgery</option> <option value="Transfusion Medicine">Transfusion Medicine</option> <option value="Thoracic Surgery">Thoracic Surgery</option> <option value="Urology and Andrology">Urology & Andrology</option> <option value="Apollo Surgical Science Center">Apollo Surgical Science Center</option><option value="Others">Others</option> </SELECT>&nbsp;<font color="red">*</font></td> </tr><tr><td height="5"></td></tr><tr> <td colspan="2" class=ftxtmedical style="padding-left:10;"><B>Treatment Required at:</b></td> </tr> <tr> <td  class=ftxtmedical colspan="2"></b><select NAME="treat_city" STYLE="background:#FFFFFF" class="fldsnnew"> <option VALUE="" size="18" SELECTED>Please select city &nbsp;&nbsp;</option><option VALUE="Apollo Hospital Bangalore">Apollo Hospital Bangalore</option><option VALUE="Apollo Victor Hospital Goa">Apollo Victor Hospital Goa</option><option VALUE="Apollo Hospital Chennai">Apollo Hospital Chennai</option><option VALUE="Apollo Hospital Hyderabad">Apollo Hospital Hyderabad</option><option VALUE="Apollo Hospital Ahmedabad">Apollo Hospital Ahmedabad</option><option VALUE="Apollo Gleneagles Hospital Kolkata">Apollo Gleneagles Hospital Kolkata</option><option VALUE="BNWCCC Hospital Kolkata">BNWCCC Hospital Kolkata</option> <option VALUE="Baby Memorial Hospital Calicut">Baby Memorial Hospital Calicut</option><option VALUE="Max Super Speciality, Panchsheel Park">Max Super Speciality, Panchsheel Park</option> <option VALUE="Max Super Speciality, West Block, Saket">Max Super Speciality, West Block, Saket</option> <option VALUE="Max Medcentre, Panchsheel Park">Max Medcentre, Panchsheel Park</option> <option VALUE="Max Super Speciality, East Block, Saket">Max Super Speciality, East Block, Saket</option> <option VALUE="Max Super Speciality, Patparganj">Max Super Speciality, Patparganj</option> <option VALUE="Fortis Hospital, Mohali">Fortis Hospital, Mohali</option> <option VALUE="Fortis Malar Hospital, Chennai">Fortis Malar Hospital, Chennai</option> <option VALUE="Fortis Seshadripuram Hospital, Bangalore">Fortis Seshadripuram Hospital, Bangalore</option> <option VALUE="Hiranandani Fortis Hospital, Navi Mumbai">Hiranandani Fortis Hospital, Navi Mumbai</option> <option VALUE="Fortis Hospital, Noida">Fortis Hospital, Noida</option> <option VALUE="Fortis La Femme Hospital, New Delhi">Fortis La Femme Hospital, New Delhi</option> </select> <font color="red">*</font></td> </tr><tr><td height="6"></td></tr> <tr> <td class=ftxtmedical><B>Hospital <br> Rooms:</B></td> <td><SELECT NAME="hos_room" STYLE="background:#FFFFFF" class="fldsnnew"> <option value="">Please Select</option> <option value="General Ward">General Ward</option> <option value="Semi-Private Room">Semi-Private Room</option> <option value="Single Room">Single Room</option> <option value="Deluxe Room">Deluxe Room</option> <option value="Suite Room">Suite Room</option> <option value="ICU">ICU</option> <option value="HDU">HDU</option> <option value="Emergency Ward">Emergency Ward</option> <option value="Day Care">Day Care</option> <option value="Triage">Triage</option> </SELECT>&nbsp;<font color="red">*</font></td> </tr> </table></td><td valign="top" width="50%"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td height="15"></td></tr><tr><td valign="top"><tr> <td  class=ftxtmedical><b>Hotel Category:</b></td> <td><select NAME="hotel_cat" size="1" class="fldsnnew"> <option VALUE="NA" SELECTED>Please select</option> <option VALUE="Deluxe">Deluxe</option> <option VALUE="First class">First class</option> <option VALUE="Economy">Economy</option> </select>          </td> </tr> <tr> <td  class=ftxtmedical><b>Hotel Required <BR>at City:</b></td><td><select NAME="re_city" size="1" class="fldsnnew"> <option VALUE="" SELECTED>Please select</option>	<option VALUE="Ahmedabad">Ahmedabad</option> <option VALUE="Bangalore">Bangalore</option><option VALUE="Chennai">Chennai</option><option VALUE="Calicut">Calicut</option><option VALUE="Goa">Goa</option><option VALUE="Hyderabad">Hyderabad</option><option VALUE="Kolkata">Kolkata</option><option VALUE="New Delhi">New Delhi</option> <option VALUE="--NA--">--NA--</option>  </select></td> </tr> <tr> <td  class=ftxtmedical><b>Check In Date:</b></td> <td><input TYPE="text" NAME="selTentDate" SIZE="14" class="fldsnnew" readonly onClick="displayCalendar(this.form.selTentDate,\'yyyy-mm-dd\',this); return false;">&nbsp;<input type="image"  src="calendar/calendar.gif" ALT="calendar" onClick="displayCalendar(this.form.selTentDate,\'yyyy-mm-dd\',this); return false;" style="position:relative; top:2px; left:0px;"></td> </tr><tr><td height="15"></td></tr> <tr> <td  class=ftxtmedical><b>Check Out Date:</b></td> <td><input TYPE="text" NAME="selTentDate1" SIZE="14" class="fldsnnew" readonly onClick="displayCalendar(this.form.selTentDate1,\'yyyy-mm-dd\',this);  return false;">&nbsp;<input type="image"  src="calendar/calendar.gif" ALT="calendar" onClick="displayCalendar(this.form.selTentDate1,\'yyyy-mm-dd\',this);  return false;" style="position:relative; top:2px; left:0px;"></td> </tr><tr><td height="15"></td></tr><tr><td colspan="2"> <table border="0" width="100%" cellspacing="0" cellpadding="0"><tr> <td class=ftxtmedical width="38%"><b>No. of Rooms<BR> Required:</b></td> <td  class=ftxtmedical width="62%">Single&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Double&nbsp;&nbsp;&nbsp; Triple<br> <select NAME="single" class="fldsnnew" size="1"> <option VALUE="NA">0</option> <option VALUE="1">1</option> <option VALUE="2">2</option> <option VALUE="3">3</option> <option VALUE="4">4</option> <option VALUE="5">5</option> <option VALUE="6">6</option> <option VALUE="7">7</option> <option VALUE="8">8</option> </select> &nbsp;&nbsp; <select NAME="double" class="fldsnnew" size="1"> <option VALUE="NA">0</option> <option VALUE="1">1</option> <option VALUE="2">2</option> <option VALUE="3">3</option> <option VALUE="4">4</option> <option VALUE="5">5</option> <option VALUE="6">6</option> <option VALUE="7">7</option> <option VALUE="8">8</option> </select> &nbsp;&nbsp;&nbsp; <select NAME="triple" class="fldsnnew" size="1"> <option VALUE="NA">0</option> <option VALUE="1">1</option> <option VALUE="2">2</option> <option VALUE="3">3</option> <option VALUE="4">4</option> <option VALUE="5">5</option> <option VALUE="6">6</option> <option VALUE="7">7</option> <option VALUE="8">8</option> </select></td> </tr></table></td> </tr><tr><td height="8"></td></tr> <tr> <td  class=ftxtmedical><b>Medical Treatment<BR> related information:</b></td> <td><textarea NAME="txaQuery" COLS="22" ROWS="5" WRAP="virtual" class="fldsnnew"></textarea><sup><font color="red">*</font></sup></td> </tr><tr><td  class=ftxtmedical><b>Other Tour options:</b></td><td><input type="checkbox" name="other" onClick="updateEvents(this.value);"></td></tr><tr> <td colspan="2" align="right"><div id="more_tour" style="display:none"><select NAME="other_option" size="1" class="fldsnnew"> <option VALUE="NA" SELECTED>Please select</option> <option VALUE="Golden Triangle Tours">Golden Triangle Tours</option> <option VALUE="Wildlife Tour Packages">Wildlife Tour Packages</option> <option VALUE="Rajasthan Tour Package">Rajasthan Tour Package</option> <option VALUE="South India Tours">South India Tours</option> <option VALUE="Kerala Tour Package">Kerala Tour Package</option> <option VALUE="Pilgrimage Travel Tours">Pilgrimage Travel Tours</option> <option VALUE="Honeymoon Travel Package">Honeymoon Travel Package</option> <option VALUE="India Heritage Tours">India Heritage Tours</option> <option VALUE="Adventure Travel Package">Adventure Travel Package</option> <option VALUE="Ayurveda and Spa Tours">Ayurveda and Spa Tours</option></select>&nbsp;<font color="red">*</font>      </div>    </td> </tr><td colspan="2" class=ftxtmedical align="center"><input type="checkbox" name="chk_term"> <b><font size="1px">I agree to the</font><a  class=ftxtmedical href="http://www.medicalindiatourism.com/terms-and-conditions.html" target="_blank"><font color="blue">Terms & Conditions</font></a></b></td></tr><tr><td  height=10></td></tr> <td colspan="2"  class=ftxtmedical><input name="submit" TYPE="submit" class="btnnew"  VALUE="Submit.."> &nbsp;&nbsp; &nbsp; <input name="reset" type="reset" class="btnnew" value="Reset.."></td> </tr><tr> <td CLASS="ftxtmedical" COLSPAN=2 align="right" height="10"></td> </tr><tr> <td CLASS="ftxtmedical" COLSPAN=2 align="right"><i><font color="red">*</font> Essential Information</i></td> </tr></table></td></table></td></tr><tr><td valign="top"><table border="0" cellspacing="0"cellpadding="0" width="570"><tr><td><IMG SRC="images/medical-form/form-bottom-left.jpg" WIDTH="179" HEIGHT="21" BORDER="0" ALT=""></td><td width="216" height="21" background="images/medical-form/form-bottom-center.jpg" style="background-repeat:repeat-x;"></td><td><IMG SRC="images/medical-form/form-bottom-right.jpg" WIDTH="175" HEIGHT="21" BORDER="0" ALT=""></td></tr></table></td></tr></table>');
document.write('</FORM></div>');
}




/////////// Validation Starts



 /*****************************************general Form Validation******************************************/

 function commonFormValidate(form) {

var v=allBlanksCommon(form);
/*
    iscommonFrmArrival(form);
	iscommonFrmDepart(form);
	iscommonFrmDaysInHands(form);
	iscommonFrmAdults(form);
	iscommonFrmName(form);
    iscommonFrmCountry(form);

    iscommonFrmEmail(form);

iscommonFrmServices(form);
iscommonFrmAccomodation(form);


iscommonFrmPhone(form);

iscommonFrmCityCode(form);

iscommonFrmCountryCode(form);


iscommonFrmChildren(form);

//iscommonFrmTentArrival(form);

iscommonFrmQuery(form);

//iscommonFrmDestination(form)

//iscommonFrmCheckOut(form)
*/
return v ;  

}



function allBlanksCommon(form) {

if((iscommonFrmCountry(form)&& iscommonFrmPhone(form))&&( iscommonFrmDaysInHands(form)&& iscommonFrmEmail(form)) && (iscommonFrmCityCode(form) && iscommonFrmCountryCode(form)) && (iscommonFrmName(form) && iscommonFrmChildren(form)) && (iscommonFrmAdults(form)&&iscommonFrmArrival(form))&&(iscommonFrmQuery(form)&&iscommonFrmDepart(form))&&(iscommonFrmServices(form)&&iscommonFrmAccomodation(form))) {

 return true ; 

}



if((iscommonFrmCountry(form)==false || iscommonFrmPhone(form)==false) || (iscommonFrmAdults(form)==false || iscommonFrmEmail(form)==false) || (iscommonFrmCityCode(form)==false || iscommonFrmCountryCode(form)==false) || (iscommonFrmName(form)==false || iscommonFrmArrival(form)==false) ||(iscommonFrmDaysInHands(form)==false ||iscommonFrmChildren(form)==false ) || (iscommonFrmQuery(form)==false||iscommonFrmDepart(form)==false) || (iscommonFrmServices(form)==false||iscommonFrmAccomodation(form)==false) ) {

composeform(form)

return false ; 

 }

}

function composeform(form) {

var text = " You entered incorrectly or forgot to fill in ::\n"	



if(iscommonFrmPhone(form) == false) {

text += "\nPhone -- Phone number should be numeric."

}

if(iscommonFrmCountry(form) == false) {

text += "\nCountry -- Not Selected Yet."

}

if(iscommonFrmEmail(form) == false) {

text += "\nEmail -- improper/incomplete e-mail ID."

}

if(iscommonFrmServices(form) == false) {

text += "\nServices -- Either services or flight source destination left to be filled."

}

if(iscommonFrmAccomodation(form) == false) {

text += "\nAccomodationl -- Accomodation Type left for Hotel Booking."

}

if(iscommonFrmCityCode(form) == false) {

text += "\nCity Code -- City code should be numeric"

}

if(iscommonFrmCountryCode(form) == false) {

text += "\nCountry Code -- Country Code should be numeric."

}

if(iscommonFrmName(form) == false) {

text += "\nName -- must be purely alphabetic"

}

if(iscommonFrmChildren(form) == false) {

text += "\nNumber of Children -- should be a number."

}

if(iscommonFrmAdults(form) == false) {

text += "\nNumber of Adults -- should be a number."

}

if(iscommonFrmArrival(form) == false) {

text += "\nArrival Date -- cannot be earlier than today."

}
if(iscommonFrmDaysInHands(form)== false) {

text += "\nDays in hand -- is left empty or not a number."

}

if(iscommonFrmQuery(form) == false) {

text += "\nComment or Query --must have the services required."

}
if(iscommonFrmDepart(form)==false) {

text += "\nDeparture date --is left or must be after arrival date "

}


alert(text)

}

//For Services
function iscommonFrmServices(form)
{ 
	//alert('hello there');
	
	if(form["Services[ ]"][0].checked==false && form["Services[ ]"][1].checked==false && form["Services[ ]"][2].checked==false && form["Services[ ]"][3].checked==false)
	{
	//		alert('hello there1');
		//form.Services[ ].focus();
		//form.flight_from.focus();
		return false;
	}
	
//else if(form["Services[ ]"][3].checked==true && (form["flight_from"].value== "" || form["flight_to"].value== ""))
else if(form["Services[ ]"][3].checked==true && form.txaQuery.value=="")
	{

		return false;
	}//end if

	return true; 	
}//end function

//// for services nd accomodation hotel booking
function iscommonFrmAccomodation(form)
{
//alert('hello there 1');
//if (form["Services[ ]"][1].checked==true && (form.accom[0].checked==false && form.accom[1].checked==false && form.accom[2].checked==false))
if (form["Services[ ]"][1].checked==true && form.accom.value== "NA")
	{
	//alert('hello there 2');
	return false;
	}
	//alert('hello there 3');
else 
	{
	return true;
	}
	return true;
}




//for country of residence

function iscommonFrmCountry(form)
{ 
	
	if(form.selCountry.value== "Country of Residence")
	{
		
		form.selCountry.focus();
		return false;

	}
	else
	{
		return true; 
	}//end if

}//end function



//FOR EMAIL

function iscommonFrmEmail(form) {

if (trim(form.txiEmail.value)== "")

	{

		form.txiEmail.focus();

		return false; // because it is not optional 

	}

else

	{

		var eid=form.txiEmail.value=trim(form.txiEmail.value);

		if (eid.indexOf(' ')!= -1)

			{

			form.txiEmail.focus();

			return false ; // no spaces

			} 

		if (eid.length < 6 ){

			form.txiEmail.focus();

			return false ; // at least j.a@in

			}

		at=eid.indexOf('@', 0); //check from first position ---- 

		if ( at == -1 || at == 0){ //should not be at first place

			form.txiEmail.focus();

			return false ;

			}

		else

			{

				var at1=eid.indexOf('@', (at + 1)); //looking for another at one place ahead

				if ( at1 == -1 ) // ie only one at is there

				{

					var dot=eid.indexOf('.',(at + 1));//looking for just next value

					if(dot == (at + 1)|| dot== -1){ //if dot is not there or in the next place

						form.txiEmail.focus();

						return false ;	

						}

					else

						{

						 if ( (dot + 2 ) < eid.length )

							return true ;

						 else

						 {

							form.txiEmail.focus();

							return false ;

							}

						}

				}

				else // two @ are there

				{

				form.txiEmail.focus();

				return false;

				}

			}	

	form.txiEmail.focus();

	return false ;

	}		



}



//FOR PHONE

function iscommonFrmPhone(form) {

if (trim(form.txiPhone.value) == "") {

form.txiPhone.value=trim(form.txiPhone.value);

//return true //because it is optional
return false
}

else {

			form.txiPhone.value=trim(form.txiPhone.value);

	 if(checkfornum(form.txiPhone.value)==0)

		 {

			form.txiPhone.focus();

			return(false);

			}

return true

 }

}



//FOR CITY CODE OF PHONE



function iscommonFrmCityCode(form) {

if (trim(form.txiCityCode.value) == "") {

form.txiCityCode.value=trim(form.txiCityCode.value);

//return true //because it is optional
return false

}

else {

			form.txiCityCode.value=trim(form.txiCityCode.value);

	 if(checkfornum(form.txiCityCode.value)==0)

		 {

			form.txiCityCode.focus();

			return(false);

			}

return true

 }

}



//for country code of phone

function iscommonFrmCountryCode(form) {

	form.txiCountryCode.value = trim(form.txiCountryCode.value);

 if(checkfornum(form.txiCountryCode.value)==0)

	{

		form.txiCountryCode.focus();

		return false;

	}

	else

		return true;

}



//FOR No. of Adults

function iscommonFrmAdults(form) {
if(form.txiAdults.value== "NA")

		{

			form.selTentMonth.focus();

			return false;

		}
		else
	{
		return true;
		}
		}
/*function iscommonFrmAdults(form) {

if (trim(form.txiAdults.value) == "" ) {

//form.adults.value=trim(form.adults.value);

form.txiAdults.focus();

return(false); //because it is optional

}

else {

			//form.adults.value=trim(form.adults.value);

	 if(checkfornum(form.txiAdults.value)==0)

		 {

			form.txiAdults.focus();

			return(false);

			}

return true;

 }

}
*/







//FOR Days in hands

function iscommonFrmDaysInHands(form) {

//if (trim(form.txiDaysInHands.value) == "" ||trim(form.txiDaysInHands.value)<1 ) {

//form.hands.value=trim(form.hands.value);

//form.txiDaysInHands.focus();

return(true); //because it is optional

/*}

else {

			form.txiDaysInHands.value=trim(form.txiDaysInHands.value);

	 if(checkfornum(form.txiDaysInHands.value)==0)

		 {

			form.txiDaysInHands.focus();

			return(false);

			}

return true

 }
 */

}



function iscommonFrmArrival(form)

{ 

	if ((form.selTentMonth.value== "NA") || (form.selTentDate.value== "NA") || (form.selTentYear.value== "NA"))

	{

		if(form.selTentMonth.value== "NA")

		{

			form.selTentMonth.focus();

			return false;

		}

		if(form.selTentDate.value== "NA")

			

		{

			form.selTentDate.focus();

			return false; 

		}

		if(form.selTentYear.value== "NA")

			form.selTentYear.focus()

			return false;

	}

	else{

		if (iscommonFrmArrDate(form)==false)

		{

			return false;

		}

		else

			return true;

	}

}



function iscommonFrmArrDate(form)

{

	for(i=0;i<=montharray.length;i++)

	{

		if (montharray[i]==form.selTentMonth.value)

		{

			dgt=i;

			break;

		}

	}

	//alert(dgt)

if(form.selTentYear.value < year)

{

	//alert("Invalid date. It must be a future date.");

	pkflg = false;

	form.selTentYear.focus(); 

	return false; //presently used

 } 

 else

	{

		if((form.selTentYear.value == year) && (dgt < month))

		{

			//alert("Invalid date. It must be a future date.");

			pkflg = false;

			form.selTentMonth.focus();

			return false;

		}

		else

		{

			if((form.selTentYear.value == year) && (dgt == month))

			{

				if (form.selTentDate.value < daym)

				{

				//alert("Invalid date. It must be a future date.");

				pkflg = false;

				form.selTentDate.focus();

				return false;

				}

				else

					return true;

			}

			else

				return true;

		}

	}

 }

 function iscommonFrmDepart(form)

{
	//alert('hello there');
/*if ((form.selTentDepMonth.value== "NA")&&(form.selTentDepDate.value== "NA")  && (form.selTentDepYear.value== "NA"))
	{
		return true;
	}  */

	if ((form.selTentDepMonth.value== "NA")||(form.selTentDepDate.value== "NA")  || (form.selTentDepYear.value== "NA"))

	{

		

		if(form.selTentDepMonth.value== "NA")

		{

			form.selTentDepMonth.focus();

			return false;

		}

		if(form.selTentDepDate.value== "NA")

		{

			form.selTentDepDate.focus();

			return false; 

		}

		if(form.selTentDepYear.value== "NA")

		{

			form.selTentDepYear.focus()

			return false;

		}

	}

	else{

		if (iscommonFrmRetDate(form)==false)

		{

			return false;

		}

		else

			return true;

	}

}



function iscommonFrmRetDate(form)

{

	if(form.selTentDepYear.value < form.selTentYear.value)

	{

		//alert("1")

		//alert("Return Date cannot be Earlier than Picking Date");

		rtflg = false;

		form.selTentDepYear.focus(); 

		return false; //presently used

	}

	else

	{

		for(i=0;i<=montharray.length;i++)

		{

			if (montharray[i]==form.selTentDepMonth.value)

			{

				retmn=i+1;

				break;

			}

		}

		for(i=0;i<=montharray.length;i++)

		{

			if (montharray[i]==form.selTentMonth.value)

			{

				pickmn=i+1;

				break;

			}

		}

		//alert(retmn)

		//alert(pickmn)

		if((form.selTentDepYear.value == form.selTentYear.value) && (retmn<pickmn))

		{

			//alert("2")

			//alert("Return Date cannot be Earlier than Picking Date");

			rtflg = false;

			form.selTentDepMonth.focus();

			return false;

		}

		else

		{

			if((form.selTentDepYear.value == form.selTentYear.value) && (retmn==pickmn))

			{

				//alert("hello")

				//alert(form.selOutDate.value)

				//alert(form.d_arrival.value)

				//alert((form.selTentDepDate.value));

				//alert((form.selTentDate.value));

				if ((form.selTentDepDate.value)< (form.selTentDate.value))

				{

					//alert("3")

					//alert("Return Date cannot be Earlier than Picking Date");

					

					rtflg = false;

					form.selTentDepDate.focus();

					return false;

				}

				else

					return true;

			}

			else

				return true;

		}

	}

 }



//FOR No. of Children if any
function iscommonFrmChildren(form) {

if(form.txiChildren.value== "NA")

		{

			form.txiChildren.focus();

			return true;

		}
		else
	{
			return true;
	}
}

/*function iscommonFrmChildren(form) {

if (trim(form.txiChildren.value) == "NA" ) { //since children are optional so it doesn't include checkforzero

//form.txiChildren.focus();

return(true); //because it is optional

}

else {

			form.txiChildren.value=trim(form.txiChildren.value);

	 if(checkfornum(form.txiChildren.value)==0)

		 {

			form.txiChildren.focus();

			return(false);

			}

return true

 }

}
*/


//FOR Query

function iscommonFrmQuery(form) {

	
	form.txaQuery.value=trim(form.txaQuery.value);

if (trim(form.txaQuery.value) == "") {

//form.txaQuery.focus();

return true;

}

else {

			

	 if(checkfornum(form.txaQuery.value)==1)// i. e, it is a pure number that is invalid

		 {

			form.txaQuery.focus();

			return(false);

			}

		qry=trim(form.txaQuery.value);

		if(qry.length <= 6 )// if it is too short

			{

			 form.txaQuery.focus();

			 return(false);

			}	

return true ;

 }

}





//FOR NAME

function iscommonFrmName(form) {

if (trim(form.txiName.value) == "") {

form.txiName.focus();

return false

}

else {

			form.txiName.value=trim(form.txiName.value);

	 if(checkforchar(form.txiName.value)== 0)

		 {

			form.txiName.focus();

			return(false);

			}

return true ;

 }

}





//FOR Destination

function iscommonFrmDestination(form) {

if (trim(form.dest.value) == "") {

form.dest.focus();

return false

}

else {

			form.dest.value=trim(form.dest.value);

	 if(checkforchar(form.dest.value)== 0)

		 {

			form.dest.focus();

			return(false);

			}

return true ;

 }

}



function iscommonFrmTentArrival(form)

{

	if ((form.selTentMonth.value== "NA") || (form.selTentDate.value== "NA") || (form.selTentYear.value== "NA"))

	{

		if(form.selTentMonth.value== "NA")

		{

			form.selTentMonth.focus();

			return false;

		}

		if(form.selTentDate.value== "NA")

		{

			form.selTentDate.focus();

			return false; 

		}

		if(form.selTentYear.value== "NA")

		{

			form.selTentYear.focus();

			return false;

		}

	}

	else{

		if (iscommonFrmTentDate(form)==false)

		{

			return false;

		}

		else

			return true;

	}

}



function iscommonFrmTentDate(form)

{

	for(i=0;i<=montharray.length;i++)

	{

		if (montharray[i]==form.selTentMonth.value)

		{

			dgt=i;

			break;

		}

	}

	//alert(dgt)

if(form.selTentYear.value < year)

{

	//alert("Invalid date. It must be a future date.");

	pkflg = false;

	form.selTentYear.focus(); 

	return false; //presently used

 } 

 else

	{

		if((form.selTentYear.value == year) && (dgt < month))

		{

			//alert("Invalid date. It must be a future date.");

			pkflg = false;

			form.selTentMonth.focus();

			return false;

		}

		else

		{

			if((form.selTentYear.value == year) && (dgt == month))

			{

				if (form.selTentDate.value < daym)

				{

				//alert("Invalid date. It must be a future date.");

				pkflg = false;

				form.selTentDate.focus();

				return false;

				}

				else

					return true;

			}

		}

	}

 }



////////////////////////////////////////////Common Functions////////////////////////////////////////



function trim(str1)

{

// This function trims any given field value for blank spaces.

 var intCtr=0

 for(intCtr=0;str1.charAt(intCtr)==" ";intCtr++);

 str1=str1.substring(intCtr,str1.length);

 return str1; 

}



function checkforchar(strdate)

{

//This function checks for string values

var validdate = "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ";

	

	var strlength = strdate.length;

	for(var i=0; i<=strlength; i++)

	{

		var unitstr = strdate.substr(i,1);

		if (validdate.indexOf(unitstr)==-1)

		{

			return false;

		}

	}

	return true;

}



function checkfornum(str1) 

{

//This function checks for numeric values

 var numstr="1234567890 ,";

 var intctr,intLen;

 intLen=str1.length;

 for(intCtr=0;intCtr <= intLen && numstr.indexOf(str1.charAt(intCtr))>=0 ;intCtr++);

 if(intCtr > intLen)

 {

 return 1;

 }

 else

 {

 return 0;

 }

}



function checkforzero(str1) 

{

//This function checks for all zero with spaces

 var numstr=" 0";

 var intctr,intLen;

 intLen=str1.length;

 for(intCtr=0;intCtr <= intLen && numstr.indexOf(str1.charAt(intCtr))>=0 ;intCtr++);

 if(intCtr > intLen)

 {

 return 1; // return true if all zero and spaces are there

 }

 else

 {

 return 0;//otherwise return false

 }

}



function checkfordate(str1) 

{

//This function checks for date Type of data

 var numstr="1234567890//";

 var intctr,intLen;

 intLen=str1.length;

 for(intCtr=0;intCtr <= intLen && numstr.indexOf(str1.charAt(intCtr))>=0 ;intCtr++);

 if(intCtr > intLen)

 {

 return 1;

 }

 else

 {

 return 0;

 }

}



function GoBack() 

{ 

	history.back(); 

}
