var browser=navigator.appName;

var cityArr = new Array();
var airTxtArr = new Array();
var actvArr = new Array();
var attArr = new Array();
var hgrpArr = new Array();
var hlocArr = new Array();
var starArr = new Array();

var searchError=false;
var errorMsg=false;
var search	="";
var searchLoc="";
var searchLocHA="";
var showAllLoc=false;
var fireFox=false;
var showAllLoc=false;
if (navigator.userAgent.indexOf("Firefox")>-1){fireFox=true;}
var _month = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var actType = new Array("All","wedding","Show","Transfers","SKY","Private Service","","Ground Transportation","Tour","Airport Transfers","Miscellaneous","Admission","Packages","Car Rental","Golf","Shows","Cruise","Air Ticket");
 			

function loadAct(){
searchError=false;
document.forms["form1"].elements["H_cmbNoOfRooms"].selectedIndex=0;

try{
document.forms["form1"].elements["Activity_type"].options.length=0;
	try {
		for (var imxk=0; imxk<actvArr.length; imxk++){
			try{document.forms["form1"].elements["Activity_type"].options[imxk] = new Option(actvArr[imxk][1],actvArr[imxk][0]);
			}catch(exp){}
		}
	}catch(ex){return;}
}catch(exp){}
showRooms(1);
showAgCom(0,1);
}

if (!fireFox){
var ixp_ie = (document.all)? true:false;
if (!ixp_ie) window.captureEvents(Event.CLICK)
document.onclick = getMouseXY;
}

calShown=false;
var activeDateObjNM="";
var activeDateObjIO="";
function retDate(add){
	var tmpd= new Date();
	var tmpd1= new Date(tmpd.setDate(tmpd.getDate()+add));
	return new Date(tmpd1.getFullYear(),tmpd1.getMonth(),tmpd1.getDate(),0,0,0,0);
}
var maxChis=0;
var _MouseX=0;
var _MouseY=0;

function getMouseXY(e) {
if (ixp_ie) {_MouseX=event.clientX+document.body.scrollLeft;_MouseY=event.clientY+document.body.scrollTop;
}else{if (fireFox){_MouseX = e.pageX;_MouseY = e.pageY;}}  
if (_MouseX<0){_MouseX=0}
if (_MouseY<0){_MouseY=0}  
hide_things();
return true
}

function hide_things(){
try{
	setObjPos('ixpDataFrame',0,0,0,0,'none');
}catch(ex){}
try{
	setObjPos('maskFrame',0,0,0,0,'none');
}catch(ex){}
}

var toDay = new retDate(0);
var _InDate = new retDate(2);

var _OutDate = new retDate(3);
function twoChar(val){
var tval=""+val+"";
if (tval.length<2){return "0"+val+"";}else{return ""+val+"";}
}
var numToday=Number(""+toDay.getFullYear()+""+twoChar(Number(toDay.getMonth())+1)+""+twoChar(toDay.getDate())+"");


function maxdays(mm,yy){
var maxd;
if (mm==1){
if(yy%4==0){return 29;}else{maxd=28;}
}else if (mm==0 || mm==2 || mm==4 || mm==6 || mm==7 || mm==9 || mm==11){
maxd=31;
}else{
maxd=30;
}
return maxd;
}

function dateOpts(days,date){
var ixpoptDays="";
var sel="";
	for (var ixpa=0; ixpa<days; ixpa++){
		if (date==(ixpa+1)){sel=" selected";}else{sel="";}
		if (ixpa<9){
			ixpoptDays+="<option value=\"0"+(ixpa+1)+"\""+sel+">0"+(ixpa+1)+"</option>";
		}else{
			ixpoptDays+="<option value=\""+(ixpa+1)+"\""+sel+">"+(ixpa+1)+"</option>";	
		}
	}
	return ixpoptDays;
}

function monthOpts(setmonth){
	var sel="";
	var  m_months= new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	var optMonths="";
	for (var ixpb=0; ixpb<m_months.length; ixpb++){
		if (setmonth==ixpb){sel=" selected";}else{sel="";}
			optMonths+="<option value=\""+ixpb+"\""+sel+">"+m_months[ixpb]+"</option>";
	}
    return optMonths;
}

function monthOptsNew(setmonth){
  var myDate    = new Date();
  var optMonths ="";	

  if(browser=='Netscape'){
  var new_year  = myDate.getYear() + Number(1900);
  }else{
  var new_year  = myDate.getYear();
  }
  
  var new_month = Number(setmonth);
  var new_date  = myDate.getDate();
  var  m_months= new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  var ixpb = new_month;
  var yrCnt = new_year;
  var cnt = 0;

  for(idx = ixpb; idx < 12; idx++){
        optMonths+="<option value=\""+idx+"-"+Number(yrCnt)+"\">"+m_months[idx]+" "+Number(yrCnt)+"</option>\n";  
        cnt++;
  }
  
  yrCnt = yrCnt+1;
  
  var rem = 12 - cnt;
  for(idx = 0; idx < rem; idx++){
        optMonths+="<option value=\""+idx+"-"+Number(yrCnt)+"\">"+m_months[idx]+" "+Number(yrCnt)+"</option>\n";    
  } 
    
  return optMonths;
 	
}
function dateCombo(objNm,inout,year,month,date) {
	
	retStr="";
	if (inout=="_In"){
		retStr="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"+
		"<tr>"+
		"<td><select name=\""+objNm+inout+"Date\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">"+dateOpts(maxdays(month,year),date)+
		"</select></td>"+
		"<td><img src=\"/images/s.gif\" width=\"1\" height=\"1\"></td>"+
		"<td><select name=\""+objNm+inout+"Month\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">"+monthOpts(month)+
		"</select></td>"+
		"<td><img src=\"/images/s.gif\" width=\"1\" height=\"1\"></td>"+
		"<td><select name=\""+objNm+inout+"Year\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">";	
	}else{
		retStr="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"+
		"<tr>"+
		"<td><select name=\""+objNm+inout+"Date\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">"+dateOpts(maxdays(month,year),date)+
		"</select></td>"+
		"<td><img src=\"/images/s.gif\" width=\"1\" height=\"1\"></td>"+
		"<td><select name=\""+objNm+inout+"Month\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">"+monthOpts(month)+
		"</select></td>"+
		"<td><img src=\"/images/s.gif\" width=\"1\" height=\"1\"></td>"+
		"<td><select name=\""+objNm+inout+"Year\" onChange=\"setDtOptIn('"+objNm+"','"+inout+"',this);\">";	
	}
		
	var ixpc=3;
	if (inout.indexOf("_Out")>-1){ixpc=4;}
	for (ixpd=0; ixpd<ixpc; ixpd++){
		var tmpy=""+(toDay.getFullYear()+ixpd)+"";
		if (year==tmpy){
			retStr+="<option value=\""+tmpy+"\" selected>"+tmpy+"</option>";	
		}else{
			retStr+="<option value=\""+tmpy+"\">"+tmpy+"</option>";	
		}
	}
	retStr+="</select></td>"+
	"<td><img src=\"/images/s.gif\" width=\"3\" height=\"1\"></td>"+
	"<td><a href=\"JavaScript:void(0)\" onClick=\"loadixpCal('"+objNm+"','"+inout+"');\"><img name=\""+objNm+""+inout+"\" src=\"/images/cal_new.gif\" width=\"18\" height=\"18\" border=\"0\"></a></td>"+
	"</tr>"+
	"</table>";
    return retStr;
}


function loadixpCal(nm,inout){
activeDateObjNM=nm;
activeDateObjIO=inout;
setcalPos('show',""+nm+""+inout+"");
}

function setcalPos(stat,obj){
	with(document.getElementById("calFrame")){
		if (stat=="show"){
		style.left=(getPosImg(obj,"left"))+"px";
		style.top=(getPosImg(obj,"top"))+"px";
		style.width=170+"px";
		style.height=195+"px";
		style.display="block";
		calShown=true;
		
		}else{
		style.display="none";
		style.left=0;style.top=0;style.width=0;style.height=0;
		calShown=false;
		}	
	}
}

function opts(st,end,sel){
	var retStr="";
	for (var ixpe=st; ixpe<=end; ixpe++){
		if (!isNaN(sel)){
			if (sel==ixpe){
			retStr+="<option value=\""+ixpe+"\" selected>"+ixpe+"</option>\n";
			}else{
			retStr+="<option value=\""+ixpe+"\">"+ixpe+"</option>\n";
			}		
		}else{
			retStr+="<option value=\""+ixpe+"\">"+ixpe+"</option>\n";
		}
	}
	return retStr;
}

function showRooms(num){
setTimeout("showRoomsset("+num+")",1);
}

function showRoomsset(num){
for (ixpg=1; ixpg<=6; ixpg++){
if (ixpg<=num){
try{document.getElementById("occR"+ixpg+"").style.display="block";}catch(ex){}
}else{
try{document.getElementById("occR"+ixpg+"").style.display="none";}catch(ex){}
}
}
setSelRoomOcc();
}

function getDtFromOriginalObjctsOut(type,inout){
//alert("getDtFromOriginalObjctsOut"+type+inout);
	var monthCnt =document.forms["form1"].elements[""+(type+inout)+"Month"].options[document.forms["form1"].elements[""+(type+inout)+"Month"].selectedIndex].value;
	var YearVal = document.forms["form1"].elements[""+(type+inout)+"Year"].options[document.forms["form1"].elements[""+(type+inout)+"Year"].selectedIndex].value;
	
	tmpOutDate = new Date(document.forms["form1"].elements[""+(type+inout)+"Year"].options[document.forms["form1"].elements[""+(type+inout)+"Year"].selectedIndex].value,document.forms["form1"].elements[""+(type+inout)+"Month"].options[document.forms["form1"].elements[""+(type+inout)+"Month"].selectedIndex].value,document.forms["form1"].elements[""+(type+inout)+"Date"].options[document.forms["form1"].elements[""+(type+inout)+"Date"].selectedIndex].value,0,0,0,0);
	var yearDiff = Number(tmpOutDate.getFullYear())-Number(toDay.getFullYear());
	
        if(yearDiff > 0){
		monthCnt = Number(monthCnt)+12;
		
	}
		
	var otuValue = monthCnt+"-"+YearVal;	
	
}

function getDtFromOriginalObjcts(type,inout){
//alert("222222222222"+type+"--------------"+inout);
	var monthCnt =document.forms["form1"].elements[""+(type+inout)+"Month"].options[document.forms["form1"].elements[""+(type+inout)+"Month"].selectedIndex].value;
	var YearVal = document.forms["form1"].elements[""+(type+inout)+"Year"].options[document.forms["form1"].elements[""+(type+inout)+"Year"].selectedIndex].value;
	
	tmpOutDate = new Date(document.forms["form1"].elements[""+(type+inout)+"Year"].options[document.forms["form1"].elements[""+(type+inout)+"Year"].selectedIndex].value,document.forms["form1"].elements[""+(type+inout)+"Month"].options[document.forms["form1"].elements[""+(type+inout)+"Month"].selectedIndex].value,document.forms["form1"].elements[""+(type+inout)+"Date"].options[document.forms["form1"].elements[""+(type+inout)+"Date"].selectedIndex].value,0,0,0,0);
	var yearDiff = Number(tmpOutDate.getFullYear())-Number(toDay.getFullYear());
	
        if(yearDiff > 0){
		monthCnt = Number(monthCnt)+12;
	}
		
	var otuValue = monthCnt+"-"+YearVal;	

	
}


function setDtOptIn(type,inout,obj){
var maxDates = maxdays(Number(document.forms["form1"].elements[""+(type+inout)+"Month"].options[document.forms["form1"].elements[""+(type+inout)+"Month"].selectedIndex].value),Number(document.forms["form1"].elements[""+(type+inout)+"Year"].options[document.forms["form1"].elements[""+(type+inout)+"Year"].selectedIndex].value));
var addopts=true;
try{
if (obj.name.indexOf("Date")>-1 && document.forms["form1"].elements[""+(type+inout)+"Date"].options.length==maxDates){addopts=false;}
}catch(ex){}
if (addopts){
setTimeout("loadOpts("+maxDates+",'"+type+inout+"Date')",0);
}
if (inout=="_Out"){
	setNights(type);
}else{
setOutDate(type,inout);
}
}




function setOutDate(type,inout){
var tmpOutDate;
with(document.forms["form1"]){
	tmpOutDate = new Date(elements[""+(type+inout)+"Year"].options[elements[""+(type+inout)+"Year"].selectedIndex].value,elements[""+(type+inout)+"Month"].options[elements[""+(type+inout)+"Month"].selectedIndex].value,elements[""+(type+inout)+"Date"].options[elements[""+(type+inout)+"Date"].selectedIndex].value,0,0,0,0);
//alert("ssaasas"+tmpOutDate);
tmpOutDate = new Date(tmpOutDate.setDate(tmpOutDate.getDate()+Number(elements[""+type+"_nights"].value)));
	
	elements[""+type+"_OutYear"].selectedIndex=Number(tmpOutDate.getFullYear())-Number(toDay.getFullYear());
	elements[""+type+"_OutMonth"].selectedIndex=Number(tmpOutDate.getMonth());
	var tmpmaxDates = maxdays(Number(elements[""+type+"_OutMonth"].options[elements[""+type+"_OutMonth"].selectedIndex].value),Number(elements[""+type+"_OutYear"].options[elements[""+type+"_OutYear"].selectedIndex].value));
	setTimeout("loadOpts("+tmpmaxDates+",'"+type+"_OutDate',"+(Number(tmpOutDate.getDate())-1)+")",0);
}

}


function setDtToOriginalObjcts(type,inout){

	var selValue = document.forms["form1"].elements[""+(type+inout)+"MonthYr"].options[document.forms["form1"].elements[""+(type+inout)+"MonthYr"].selectedIndex].value;

	var monthCnt = selValue.substring(0,selValue.indexOf("-"));
 
	if( monthCnt>=12){
		monthCnt =  (monthCnt-12);
	}
 
	var YearVal = selValue.substring(selValue.indexOf("-")+1);
 
	document.forms["form1"].elements[""+(type+inout)+"Month"].value = monthCnt;
	document.forms["form1"].elements[""+(type+inout)+"Year"].value = YearVal;
  
	
}


function loadOpts(opts,name,setDt){

var selInd=document.forms["form1"].elements[name].selectedIndex;
document.forms["form1"].elements[name].options.length=0;
	for (ixpk=0; ixpk<opts; ixpk++){
		if (ixpk<9){
		document.forms["form1"].elements[name].options[ixpk]= new Option("0"+(ixpk+1)+"","0"+(ixpk+1)+"");
		}else{
		document.forms["form1"].elements[name].options[ixpk]= new Option(ixpk+1,ixpk+1);
		}
	}
	if (setDt>-1){
		document.forms["form1"].elements[name].selectedIndex=setDt;
	}else{
		if (selInd>=opts){
		document.forms["form1"].elements[name].selectedIndex=opts-1;
		}else{
		document.forms["form1"].elements[name].selectedIndex=selInd;
		}
	}

	
	
}

function setOut(type){
	//alert("setOut"+type);
var tmpInDate = new Date(document.forms["form1"].elements[""+type+"_InYear"].options[document.forms["form1"].elements[""+type+"_InYear"].selectedIndex].value,document.forms["form1"].elements[""+type+"_InMonth"].options[document.forms["form1"].elements[""+type+"_InMonth"].selectedIndex].value,document.forms["form1"].elements[""+type+"_InDate"].options[document.forms["form1"].elements[""+type+"_InDate"].selectedIndex].value,0,0,0,0);
var tmpOutDate = new Date(tmpInDate.setDate(tmpInDate.getDate()+Number(document.forms["form1"].elements[""+type+"_nights"].value)));
document.forms["form1"].elements[""+type+"_OutYear"].selectedIndex=tmpOutDate.getFullYear()-toDay.getFullYear();
document.forms["form1"].elements[""+type+"_OutMonth"].selectedIndex=tmpOutDate.getMonth();
var maxDates = maxdays(Number(document.forms["form1"].elements[""+type+"_OutMonth"].options[document.forms["form1"].elements[""+type+"_OutMonth"].selectedIndex].value),Number(document.forms["form1"].elements[""+type+"_OutYear"].options[document.forms["form1"].elements[""+type+"_OutYear"].selectedIndex].value));
loadOpts(maxDates,""+type+"_OutDate");
document.forms["form1"].elements[""+type+"_OutDate"].selectedIndex=tmpOutDate.getDate()-1;
}

function setNights(type){
	//alert("setNights"+type);
	var tmpInDate = new Date(document.forms["form1"].elements[""+type+"_InYear"].options[document.forms["form1"].elements[""+type+"_InYear"].selectedIndex].value,Number(document.forms["form1"].elements[""+type+"_InMonth"].options[document.forms["form1"].elements[""+type+"_InMonth"].selectedIndex].value),document.forms["form1"].elements[""+type+"_InDate"].options[document.forms["form1"].elements[""+type+"_InDate"].selectedIndex].value,0,0,0,0);
	
	var tmpOutDate = new Date(document.forms["form1"].elements[""+type+"_OutYear"].options[document.forms["form1"].elements[""+type+"_OutYear"].selectedIndex].value,Number(document.forms["form1"].elements[""+type+"_OutMonth"].options[document.forms["form1"].elements[""+type+"_OutMonth"].selectedIndex].value),document.forms["form1"].elements[""+type+"_OutDate"].options[document.forms["form1"].elements[""+type+"_OutDate"].selectedIndex].value,0,0,0,0);
	
	var diffe=Number(get_deference(tmpInDate,tmpOutDate));
	
	if (diffe<=31 && diffe>0){
		document.forms["form1"].elements[""+type+"_nights"].value=diffe;
	}
}

function get_deference(ind,oud){
var milSec=parseInt(oud-ind);
var ret_val=milSec/86400000;
return ret_val;
}

var checkMore=0;
var checkMore=0;
function setChar(ch,img,pkgtyp){

var tmpArr = new Array();
var flag =0;
if(pkgtyp=='H'||pkgtyp=='A'){
	for (var j=0; j<cityArr.length; j++){		
		if (cityArr[j][1].toUpperCase().indexOf(ch.value.toUpperCase())==0){
			if (!showAllLoc){checkMore++;if (checkMore>10){break;}}
			tmpArr[tmpArr.length]="<tr><td class=\"stripe"+((j%2)+3)+"\" style=\"padding-left:5px;cursor:pointer;\" onMouseOver=\"altcell('ov',this)\" onMouseOut=\"altcell('ou',this,'stripe"+((j%2)+3)+"')\" onClick=\"setVal("+j+",'"+ch.name+"','N')\">"+cityArr[j][1]+" - "+cityArr[j][5]+"</td></tr>";
		}
	}
}else{	
	for (var j=0; j<airTxtArr.length; j++){		
		if (airTxtArr[j][0].toUpperCase().indexOf(ch.value.toUpperCase())==0){
			if (!showAllLoc){checkMore++;if (checkMore>10){break;}}
			tmpArr[tmpArr.length]="<tr><td class=\"stripe"+((j%2)+3)+"\" style=\"padding-left:5px;cursor:pointer;\" onMouseOver=\"altcell('ov',this)\" onMouseOut=\"altcell('ou',this,'stripe"+((j%2)+3)+"')\" onClick=\"setVal("+j+",'"+ch.name+"','Y')\">"+airTxtArr[j][0]+" - "+airTxtArr[j][1]+"</td></tr>";
			var flag =1;
		}
		if( (airTxtArr[j][1].toUpperCase().indexOf(ch.value.toUpperCase())==0) && (flag ==0)){
			if (!showAllLoc){checkMore++;if (checkMore>10){break;}}
			tmpArr[tmpArr.length]="<tr><td class=\"stripe"+((j%2)+3)+"\" style=\"padding-left:5px;cursor:pointer;\" onMouseOver=\"altcell('ov',this)\" onMouseOut=\"altcell('ou',this,'stripe"+((j%2)+3)+"')\" onClick=\"setVal("+j+",'"+ch.name+"','Y')\">"+airTxtArr[j][0]+" - "+airTxtArr[j][1]+"</td></tr>";
		}
		var flag =0;
	}
}
	
	if (!showAllLoc){
		if (checkMore>10){tmpArr[tmpArr.length]="<tr><td class=\"morebg\" style=\"padding-left:5px;cursor:pointer;\" onClick=\"showAllLoc=true;setChar(document.forms['form1'].elements['"+ch.name+"'],'"+img+"','"+pkgtyp+"')\" title=\"Show All\" align=\"center\"><img src=\"/images/more_arrow.gif\" width=\"9\" height=\"6\" border=\"0\" hspace=\"3\" alt=\"Show All\" align=\"absmiddle\">Show All</td></tr>";}
	}
	checkMore=0;
	
	var outSt="";
if (tmpArr.length==0){
	outSt="<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"3\" class=\"databorder\"><tr><td class=\"stripe4\" onClick=\"setObjPos('ixpDataFrame',0,0,180,0,'none');setObjPos('maskFrame',0,0,180,0,'none');\" align=\"center\">... No Results Available ...</td></tr></table>";
	showRes(img,outSt,1);
}else{
	outSt="<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"4\" class=\"databorder\">"+tmpArr.join("")+"</table>";
	showRes(img,outSt,tmpArr.length);
}
tmpArr.length=0;
}

function getPosImg(imgElem,ops) {
	if (ops=="top"){
		ixppos = document.images[imgElem].offsetTop;
		tempEl = document.images[imgElem].offsetParent;
				while (tempEl != null) {
					ixppos += tempEl.offsetTop;
					tempEl = tempEl.offsetParent;
				}
		return ixppos;
	}else if (ops=="left"){
		ixppos = document.images[imgElem].offsetLeft;
		tempEl = document.images[imgElem].offsetParent;
				while (tempEl != null) {
					ixppos += tempEl.offsetLeft;
					tempEl = tempEl.offsetParent;
				}

		return ixppos;
	}
}

function showRes(img,outSt,records){
setObjPos('ixpDataFrame',getPosImg(img,'left'),getPosImg(img,'top'),200,records,'block');
setObjPos('maskFrame',getPosImg(img,'left'),getPosImg(img,'top'),200,records,'block');
document.getElementById("ixpDataFrame").innerHTML=outSt;
}

function setObjPos(name,x,y,w,recs,stat,records){
	with(document.getElementById(name).style){
	left=x;top=y+5;width=w;height=recs*23;display=stat;
	}
}

function altcell(st,obj,cls){
	if (st=="ov"){
	obj.className="overclass";
	}else{
	obj.className=cls;
	}
}

function setVal(index,obj,stt){
	if(stt=='N'){
		document.forms["form1"].elements["hid_H_Loc"].value=cityArr[index].join("|");
		document.forms["form1"].elements["hid_A_Loc"].value=cityArr[index].join("|");
		document.forms["form1"].elements[obj].value=cityArr[index][1];
	}else{
		document.forms["form1"].elements["V_DepFromHid"].value=airTxtArr[index].join("|");
		document.forms["form1"].elements["hid_air_Loc_a"].value=airTxtArr[index].join("|");		
		document.forms["form1"].elements["hid_car_Loc"].value=airTxtArr[index].join("|");
		document.forms["form1"].elements[obj].value=airTxtArr[index][0];		
	}

	setObjPos('ixpDataFrame',0,0,180,0,'none');
	setObjPos('maskFrame',0,0,180,0,'none');
	showAllLoc=false;
}


function getSelVal(fr,nm){
try{
	return; 
}catch(exp){	
	return document.forms[fr].elements[nm].value;
}

}
var sel_adlts=0;
var sel_chis=0;
var set_agelist="";
function setFields(eng){
		with(document.forms["ResPkgSearchForm"]){
		cmbInMn.value=Number(getSelVal("form1",""+eng+"_InMonth"))+1;
		cmbInDt.value=getSelVal("form1",""+eng+"_InDate");
		cmbInYr.value=getSelVal("form1",""+eng+"_InYear");
		cmbOutMn.value=Number(getSelVal("form1",""+eng+"_OutMonth"))+1;
		cmbOutDt.value=getSelVal("form1",""+eng+"_OutDate");
		cmbOutYr.value=getSelVal("form1",""+eng+"_OutYear");
		
		if (eng!="A" && eng!="F" && eng!="C"){
			//alert("eng!=A");
			setAdults_Chi_Gstlst(Number(getSelVal("form1",""+eng+"_cmbNoOfRooms")));
			cmbAdlt.value=sel_adlts;
			if (document.forms["ResPkgSearchForm"].elements["accommodationType"].value=="HT"){
				cmbNoRm.value=getSelVal("form1",""+eng+"_cmbNoOfRooms");
			}else{
				cmbNoRm.value=sel_adlts;
			}
			cmbChi.value=sel_chis;
			gstLst.value=set_agelist;
		}
		cmbNgt.value=getSelVal("form1",""+eng+"_nights");
		
			try{
				searchLoc=document.forms["form1"].elements["hid_"+eng+"_Loc"].value.split("|");
				cmbCty.value=searchLoc[0];
				ctyNm.value=searchLoc[1];
				cmbSte.value=searchLoc[2];
				cmbCtry.value=searchLoc[3];
			}catch(ex){
			}
		}
}


function setAdults_Chi_Gstlst(val){	
var AccomVal=document.forms["ResPkgSearchForm"].elements["accommodationType"].value;
	with (document.forms["form1"]){
		if (AccomVal=="HT"){
			_noR = Number(elements["H_cmbNoOfRooms"].options[elements["H_cmbNoOfRooms"].selectedIndex].value);
				for (var _NOR=0; _NOR<_noR; _NOR++){
					sel_adlts+=Number(elements["R"+(_NOR+1)+"occAdults"].options[elements["R"+(_NOR+1)+"occAdults"].selectedIndex].value);
					
					sel_chis+=Number(elements["R"+(_NOR+1)+"occChi"].options[elements["R"+(_NOR+1)+"occChi"].selectedIndex].value);
				}
			
		}else if (AccomVal=="HS"){
			sel_adlts=Number(elements["H_Adults"].options[elements["H_Adults"].selectedIndex].value);
			sel_chis=0;
		}
	}
	set_agelist=document.forms["ResPkgSearchForm"].elements["gstLst"].value;
}

function printVals(){
var eleStr="";
for (var kk=0; kk<document.forms["ResPkgSearchForm"].elements.length; kk++){
eleStr+=""+document.forms["ResPkgSearchForm"].elements[kk].name+" = "+document.forms[0].elements[kk].value+"\n";
}
document.write("<xmp>"+eleStr+"</xmp>")
}

function chkDates(){
with(document.forms["ResPkgSearchForm"]){
var idtNum=Number(""+cmbInYr.value+""+twoChar(cmbInMn.value)+""+twoChar(cmbInDt.value)+"");
var odtNum=Number(""+cmbOutYr.value+""+twoChar(cmbOutMn.value)+""+twoChar(cmbOutDt.value)+"");
var tpInDate = new Date(cmbInYr.value,Number(cmbInMn.value)-1,cmbInDt.value,0,0,0,0);
var tpOutDate = new Date(cmbOutYr.value,Number(cmbOutMn.value)-1,cmbOutDt.value,0,0,0,0);
}
var diff=Number(get_deference(tpInDate,tpOutDate));
if (numToday>idtNum){
	searchError=true;
	errorMsg="Arrival Date Should be Greater Than Today's Date";
	return true;
}
if (idtNum>odtNum){
	searchError=true;
	errorMsg="Departure Date Should be Greater Than Arrival Date";
	return true;
}
if (diff>31){
	searchError=true;
	errorMsg="You Can Book Maximum of 31 Nights";
	return true;
}
return false;
}

function actStr(){
var tmpsr=actvArr.join("$");
tmpsr=tmpsr.split(",");
tmpsr=tmpsr.join("@");
document.forms["ResPkgSearchForm"].elements["actList"].value=tmpsr;
}

function showError(){
document.getElementById("errorMSG").innerHTML=errorMsg;
document.getElementById("errorTBL").style.display="block";
setTimeout("hideError()",2500);
}

function hideError(){
document.getElementById("errorMSG").innerHTML="";
document.getElementById("errorTBL").style.display="none";
errorMsg="";
searchError=false;
}

function setSelRoomOcc(){
var _noR="";
var _nChi="";
var tempOcc="";
var totAdlt=0;
var totChi=0;
var adlts=0;
var occupancyStr="";

var AccomVal=document.forms["ResPkgSearchForm"].elements["accommodationType"].value;
	if (AccomVal=="HT"){
	
		with (document.forms["form1"]){
		_noR = Number(elements["H_cmbNoOfRooms"].options[elements["H_cmbNoOfRooms"].selectedIndex].value);
		
			for (var _NOR=0; _NOR<_noR; _NOR++){
			adlts = Number(elements["R"+(_NOR+1)+"occAdults"].options[elements["R"+(_NOR+1)+"occAdults"].selectedIndex].value);			
			tempOcc+=elements["R"+(_NOR+1)+"occAdults"].options[elements["R"+(_NOR+1)+"occAdults"].selectedIndex].value+"|";
			_nChi=Number(elements["R"+(_NOR+1)+"occChi"].options[elements["R"+(_NOR+1)+"occChi"].selectedIndex].value);
			
			tempOcc+=_nChi+"|";
				if (_nChi>0){
					for (var _Nch=0; _Nch<_nChi; _Nch++){
						tempOcc+=elements["R"+(_NOR+1)+"occAge"+(_Nch+1)+""].options[elements["R"+(_NOR+1)+"occAge"+(_Nch+1)+""].selectedIndex].value;
						if ((_Nch+1)!=_nChi){tempOcc+=",";}
					}
					tempOcc+="|%|%@";
				}else{
					tempOcc+="-|%|%@";
				}
			totAdlt+=adlts;
			totChi+=_nChi;
			occupancyStr = occupancyStr+"<room"+(_NOR+1)+"Adults>"+adlts+"</room"+(_NOR+1)+"Adults>"+"<room"+(_NOR+1)+"Children>"+_nChi+"</room"+(_NOR+1)+"Children>";
			}
			
		}
		
	}else if (AccomVal=="HS"){
		tempOcc="";
		with (document.forms["form1"]){
		var HSAdults=Number(elements["H_Adults"].options[elements["H_Adults"].selectedIndex].value);
			for (var dfg=0; dfg<HSAdults; dfg++){
				tempOcc+="1|0|-|%|%@";
			}		
		}
	}
	document.forms["ResPkgSearchForm"].occupancy_Details_Hotels.value 	= occupancyStr;
	document.forms["ResPkgSearchForm"].totAdlt_Hotels.value				= totAdlt;
	document.forms["ResPkgSearchForm"].totChi_Hotels.value				= totChi;
	document.forms["ResPkgSearchForm"].elements["gstLst_Hotels"].value	= tempOcc;
}

function showAgCom_A(val,rm){
setTimeout("showAgComset_A("+val+",'"+rm+"')",1);
}


function showAgComset_A(val,rm){
if (val==0){
try{document.getElementById("R"+rm+"ageTbl_A").style.display="none";}catch(ex){}
}else{
try{document.getElementById("R"+rm+"ageTbl_A").style.display="block";}catch(ex){}
}

	for (fgh=1; fgh<=4; fgh++){
		if (fgh<=val){
			document.getElementById("R"+rm+"chAgHd"+fgh+"_A").style.display="block";
			document.getElementById("R"+rm+"occAge"+fgh+"_A").style.display="block";
		}else{
			document.getElementById("R"+rm+"chAgHd"+fgh+"_A").style.display="none";
			document.getElementById("R"+rm+"occAge"+fgh+"_A").style.display="none";
		}
	}
}

function showAgCom(val,rm){
setTimeout("showAgComset("+val+",'"+rm+"')",1);
}

function showAgComset(val,rm){
if (val==0){
try{document.getElementById("R"+rm+"ageTbl").style.display="none";}catch(ex){}
}else{
try{document.getElementById("R"+rm+"ageTbl").style.display="block";}catch(ex){}
}

	for (fgh=1; fgh<=4; fgh++){
		if (fgh<=val){
			document.getElementById("R"+rm+"chAgHd"+fgh+"").style.display="block";
			document.getElementById("R"+rm+"occAge"+fgh+"").style.display="block";
		}else{
			document.getElementById("R"+rm+"chAgHd"+fgh+"").style.display="none";
			document.getElementById("R"+rm+"occAge"+fgh+"").style.display="none";
		}
	}
}

function loadFilters(){
	with(document.forms["form1"]){
		if (hlocArr.length!=0){
			elements["hLocation"].options.length=0;
			elements["hLocation"].options[0] = new Option("All","All");
			for (var loopr=0; loopr<hlocArr.length; loopr++){
			elements["hLocation"].options[elements["hLocation"].options.length] = new Option(hlocArr[loopr][1],hlocArr[loopr][0]);
			}
		}
		if (hgrpArr.length!=0){
			elements["hGroup"].options.length=0;
			elements["hGroup"].options[0] = new Option("All","All");
			for (var loopr=0; loopr<hgrpArr.length; loopr++){
			elements["hLocation"].options[elements["hLocation"].options.length] = new Option(hlocArr[loopr][1],hlocArr[loopr][0]);
			}
		}
		if (starArr.length!=0){
			elements["hstarCat"].options.length=0;
			elements["hstarCat"].options[0] = new Option("All","All");
			for (var loopr=0; loopr<starArr.length; loopr++){
			elements["hstarCat"].options[elements["hstarCat"].options.length] = new Option(starArr[loopr][1],starArr[loopr][0]);
			}
		}
		if (attArr.length!=0){
			elements["hAtt"].options.length=0;
			elements["hAtt"].options[0] = new Option("All","All");
			for (var loopr=0; loopr<attArr.length; loopr++){
			elements["hAtt"].options[elements["hAtt"].options.length] = new Option(attArr[loopr][1],attArr[loopr][0]);
			}
		}
	}
}
function setFilter(val,objnm){
document.forms["ResPkgSearchForm"].elements[objnm].value=val;
}

loadfilt=false;

function chkFilters(chk){
if (chk){
	document.getElementById('hFilt').style.display='block';
}else{
	document.getElementById('hFilt').style.display='none';
}
if (!loadfilt){
	loadFilters();
	loadfilt=true;
}
}

function buildOcc(){
var occStr="";
var _sty="";
for (var oc=0; oc<6; oc++){
if(oc==0){_sty="block";}else{_sty="none";}
occStr+="<span id=\"occR"+(oc+1)+"\" style=\"display:"+_sty+";\"><table border=\"0\" width=\"200\"  cellpadding=\"0\" cellspacing=\"0\">\n"+
"<tr>\n"+
"<td  width=\"68\"valign='bottom' class=\"txt\">Room"+(oc+1)+"</td>\n"+
"<td width=\"69\" valign='bottom' class=\"txt\">Adults<br><select name=\"R"+(oc+1)+"occAdults\" style=\"width:37px;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,6,2)+"</select></td>\n"+
"<td  width=\"150\"valign='bottom' class=\"txt\">Children (2-11yrs)<br><select name=\"R"+(oc+1)+"occChi\" style=\"width:37px;\" onChange=\"setSelRoomOcc();showAgCom(Number(this.options[this.selectedIndex].value),"+(oc+1)+");\">\n"+opts(0,4,0)+"</select></td>\n"+
"</tr>\n"+
"<tr><td colspan=\"5\">\n"+

"<span id=\"R"+(oc+1)+"ageTbl\" style=\"display:none;\"><table width=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"+
"<tr>\n"+
"<td class=\"txt\" width=\"48\"><span id=\"R"+(oc+1)+"chAgHd1\" style=\"display:none;\">Age 1</span></td>\n"+
"<td class=\"txt\" width=\"50\"><span id=\"R"+(oc+1)+"chAgHd2\" style=\"display:none;\">Age 2</span></td>\n"+
"<td class=\"txt\" width=\"50\"><span id=\"R"+(oc+1)+"chAgHd3\" style=\"display:none;\">Age 3</span></td>\n"+
"<td class=\"txt\" width=\"40\"><span id=\"R"+(oc+1)+"chAgHd4\" style=\"display:none;\">Age 4</span></td>\n"+
"</tr>\n"+
"<tr>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge1\" name=\"R"+(oc+1)+"occAge1\" style=\"width:37px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge2\" name=\"R"+(oc+1)+"occAge2\" style=\"width:37px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge3\" name=\"R"+(oc+1)+"occAge3\" style=\"width:37px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge4\" name=\"R"+(oc+1)+"occAge4\" style=\"width:37px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"</tr>\n"+
"</table></span></td></tr>\n"+
"</table>\n";

}
return occStr;
}

// dta
function buildActivityOcc(){
var occStr="";
var _sty="";
var oc=0;
if(oc==0){_sty="block";}else{_sty="none";}
occStr+="<span id=\"occR"+(oc+1)+"_A\" style=\"display:"+_sty+";\"><table border=\"0\" width=\"255\" cellpadding=\"0\" cellspacing=\"1\">\n"+
"<tr>\n"+
"<td width=\"63\" valign='bottom' class=\"txt\">Adults<br><select name=\"R"+(oc+1)+"occAdults_A\" style=\"width:37px;\" onChange=\"\">\n"+opts(1,6,1)+"</select></td>\n"+
"<td  width=\"300\"valign='bottom' class=\"txt\">Children (2-11yrs)<br><select name=\"R"+(oc+1)+"occChi_A\" style=\"width:37px;\" onChange=\"showAgCom_A(Number(this.options[this.selectedIndex].value),"+(oc+1)+");\">\n"+opts(0,4,0)+"</select></td>\n"+
"<td class=\"txt\"></tr>\n"+
"<tr> <td colspan=\"5\">\n"+
"<span id=\"R"+(oc+1)+"ageTbl_A\" style=\"display:none;\"><table width=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"+
"<tr>\n"+
"<td class=\"txt\" width=\"51\"><span id=\"R"+(oc+1)+"chAgHd1_A\" style=\"display:none;\">Age 1</span></td>\n"+
"<td class=\"txt\" width=\"50\"><span id=\"R"+(oc+1)+"chAgHd2_A\" style=\"display:none;\">Age 2</span></td>\n"+
"<td class=\"txt\" width=\"50\"><span id=\"R"+(oc+1)+"chAgHd3_A\" style=\"display:none;\">Age 3</span></td>\n"+
"<td class=\"txt\" width=\"40\"><span id=\"R"+(oc+1)+"chAgHd4_A\" style=\"display:none;\">Age 4</span></td>\n"+
"</tr>\n"+
"<tr>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge1_A\" name=\"R"+(oc+1)+"occAge1_A\" style=\"width:37px;display:none;\" onChange=\"\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge2_A\" name=\"R"+(oc+1)+"occAge2_A\" style=\"width:37px;display:none;\" onChange=\"\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge3_A\" name=\"R"+(oc+1)+"occAge3_A\" style=\"width:37px;display:none;\" onChange=\"\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge4_A\" name=\"R"+(oc+1)+"occAge4_A\" style=\"width:37px;display:none;\" onChange=\"\">\n"+opts(1,18,1)+"</select></td>\n"+
"</tr>\n"+
"</table></span></td></tr>\n"+
"</table>\n";
"</tr>\n"+
"</table>\n";

return occStr;
}

function buildVac(){
var occStr="";
var _sty="";




for (var oc=0; oc<6; oc++){
if(oc==0){_sty="block";}else{_sty="none";}
occStr+="<span id=\"occR"+(oc+1)+"\" style=\"display:"+_sty+";\"><table width=\"255\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n"+
"<tr>\n"+
"<td width=\"40\" rowspan=\"2\" class=\"txt\" valign='bottom'style='padding-left:5px;'>Room "+(oc+1)+"&nbsp;</td>\n"+
"</tr>\n"+
"<tr>\n"+
"<td width=\"14\" nowrap=\"nowrap\"  valign='bottom'  class=\"txt\">Adults<br><select name=\"R"+(oc+1)+"occAdults\" style=\"width:40px;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,6,1)+"</select></td>\n"+
"<td width=\"15\" nowrap=\"nowrap\"  valign='bottom' style='display:none;'><select name=\"R"+(oc+1)+"occSeniors\" style=\"width:40px;\" onChange=\"setSelRoomOcc();\">\n"+opts(0,4,0)+"</select></td>\n"+
"<td width=\"14\" nowrap=\"nowrap\"  valign='bottom'  class=\"txt\">Children<br>(2-11yrs)<br><select name=\"R"+(oc+1)+"occChi\" style=\"width:40px;\" onChange=\"setSelRoomOcc();showAgCom(Number(this.options[this.selectedIndex].value),"+(oc+1)+");\">\n"+opts(0,4,0)+"</select></td>\n"+
"<td width=\"100\" nowrap=\"nowrap\"  valign='bottom'  class=\"txt\">Infants<br>(0-23 mnths)<br><select name=\"R"+(oc+1)+"occInfants\" style=\"width:40px;\" onChange=\"setSelRoomOcc();\">\n"+opts(0,4,0)+"</select></td></tr>\n"+
"</tr>\n"+
"</table>\n"+
"<span id=\"R"+(oc+1)+"ageTbl\" style=\"display:none;padding-left:6px;\"><table width=\"190\" border=\"0\"  cellpadding=\"0\" cellspacing=\"0\"><tr>\n"+
"<td width=\"40\" class=\"txt\"><span id=\"R"+(oc+1)+"chAgHd1\" style=\"display:none;\">Age 1</span></td>\n"+
"<td width=\"40\" class=\"txt\"><span id=\"R"+(oc+1)+"chAgHd2\" style=\"display:none;\">Age 2</span></td>\n"+
"<td width=\"40\"  class=\"txt\"><span id=\"R"+(oc+1)+"chAgHd3\" style=\"display:none;\">Age 3</span></td>\n"+
"<td width=\"40\"  class=\"txt\"><span id=\"R"+(oc+1)+"chAgHd4\" style=\"display:none;\">Age 4</span></td>\n"+
"</tr>\n"+
"<tr>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge1\" name=\"R"+(oc+1)+"occAge1\" style=\"width:40px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge2\" name=\"R"+(oc+1)+"occAge2\" style=\"width:40px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td><select id=\"R"+(oc+1)+"occAge3\" name=\"R"+(oc+1)+"occAge3\" style=\"width:40px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"<td ><select id=\"R"+(oc+1)+"occAge4\" name=\"R"+(oc+1)+"occAge4\" style=\"width:40px;display:none;\" onChange=\"setSelRoomOcc();\">\n"+opts(1,18,1)+"</select></td>\n"+
"</tr>\n"+
"</table>\n"+
"</span>\n";

}
return occStr;
}



function setAcType(val){
	document.forms["ResPkgSearchForm"].elements["accommodationType"].value=val;
	if (val=="HT"){
		document.getElementById("roomsCombo").style.display="block";	
		document.getElementById("adultsCombo").style.display="none";
		document.getElementById("occBox").style.display="block";
	}else if (val=="HS"){
		document.getElementById("roomsCombo").style.display="none";	
		document.getElementById("adultsCombo").style.display="block";
		document.getElementById("occBox").style.display="none";
	}
}
function setEng(id1,id2,val){
	document.getElementById(id1).style.display="block";	
	document.getElement
	ById(id2).style.display="none";
	document.forms["form1"].pkgType.value=val;
}

function befSubmit(pkgType){

	if(pkgType=='H'){
		var srhdates=""+_month[Number(document.forms["ResPkgSearchForm"].cmbInMn_Hotels.value)-1]+"-"+document.forms["ResPkgSearchForm"].cmbInDt_Hotels.value+"-"+document.forms["ResPkgSearchForm"].cmbInYr_Hotels.value+" ";
		
		var deptdate=""+_month[Number(document.forms["ResPkgSearchForm"].cmbOutMn_Hotels.value)-1]+"-"+document.forms["ResPkgSearchForm"].cmbOutDt_Hotels.value+"-"+document.forms["ResPkgSearchForm"].cmbOutYr_Hotels.value+"";
			var Child = ""+document.forms["ResPkgSearchForm"].cmbChildren_Air.value+"";
			var rooms = " "+document.forms["ResPkgSearchForm"].elements["cmbNoRm_Hotels"].value+"";
			var nignts = " "+document.forms["ResPkgSearchForm"].cmbNgt_Hotels.value+" ";
			var loc = " "+document.forms["ResPkgSearchForm"].searchCityName.value+"";
		
					
searchMessage="<table width='100%' border='0' cellpadding='0' cellspacing='4'>";
searchMessage+="<tr>";
searchMessage+="<td  height='10'  class='bold' align='center'><h2>We are processing your request. Please wait...</h2></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='48%' align='center'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='280' height='32'>       <param name='movie' value='/images/loading_bar.swf' /><param name='quality' value='high' /><embed src='/images/loading_bar.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='280' height='32'></embed></object></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='100' class='bold' align='center'>";
searchMessage+="<table width='100%' border='0' cellpadding='1' cellspacing='0' align='center'><br>";
searchMessage+="<tr valign='top'>";
searchMessage+="<td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='201' height='201'>       <param name='movie' value='/images/50off-250x250.swf' /><param name='quality' value='high' /><PARAM NAME='wmode' VALUE='transparent'><embed src='/images/50off-250x250.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='201' height='201' quality='high' wmode='transparent'></embed></object></td>";
searchMessage+="<td><fieldset style='width:400px;'>";
searchMessage+="<legend><span class='style1'><b>Your Requested Search Criteria</b></span></legend>";
searchMessage+="<table width='265 border='0' align='center' cellpadding='4' cellspacing='1' class='normal'>";
searchMessage+="<tbody>";
searchMessage+="<tr>";
searchMessage+="<td width='50' nowrap='nowrap' align='right'>Selected&nbsp;Product :</td>";
searchMessage+="<td width='50' nowrap='nowrap' align='left'>Hotels</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Location : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+loc+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Arrival Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+srhdates+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Departure Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+deptdate+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Night(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+nignts+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'>Room (s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+rooms+"</td>";
searchMessage+="</tr>";
searchMessage+="</tbody>";
searchMessage+="</table>";
searchMessage+="</fieldset></td>";
searchMessage+="</tr>";
searchMessage+="</table>";
searchMessage+="</td>";
searchMessage+="</tr>";
//searchMessage+="<tr>";
//searchMessage+="<td style='font-size:11px'>";
//searchMessage+="<span style='color:red;'>If you do not get results within 2 minutes then your internet connection may be too slow for our international suppliers to respond in time.</span><br><b>Please do the following:</b><br>";
//searchMessage+="1. Return to our home page and try again<br>";
//searchMessage+="2. Speak to a consultant on 0860 23 24 25 who can confirm your booking over the phone<br>";
//searchMessage+="3. Email us at <a href='mailto:book@flightsite.co.za'>book@flightsite.co.za</a> with your travel requirements and we will contact you</td>";
//searchMessage+="</tr>";
searchMessage+="</table>";


		
		
	}
	if(pkgType=='A'){
		var srhdates=""+_month[Number(document.forms["ResPkgSearchForm"].cmbInMn_Activities.value)-1]+"-"+document.forms["ResPkgSearchForm"].cmbInDt_Activities.value+"-"+document.forms["ResPkgSearchForm"].cmbInYr_Activities.value+"";
		
		var depdate=""+_month[Number(document.forms["ResPkgSearchForm"].cmbOutMn_Activities.value)-1]+"-"+document.forms["ResPkgSearchForm"].cmbOutDt_Activities.value+"-"+document.forms["ResPkgSearchForm"].cmbOutYr_Activities.value+"";
		
		var actTypeName = actType[Number(document.forms["ResPkgSearchForm"].actType_Activities.value)];
		var nights=""+document.forms["ResPkgSearchForm"].cmbNgt_Activities.value+"";
		var loc = ""+document.forms["ResPkgSearchForm"].searchCityName.value+"";
		
				
searchMessage="<table width='100%' height='84%' border='0' cellpadding='0' cellspacing='4'>";
searchMessage+="<tr>";
searchMessage+="<td  height='10'  class='bold' align='center'><h2>We are processing your request. Please wait...</h2></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='48%' align='center'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='280' height='32'>       <param name='movie' value='/images/loading_bar.swf' /><param name='quality' value='high' /><embed src='/images/loading_bar.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='280' height='32'></embed></object></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='100' class='bold' align='center'>";
searchMessage+="<table width='100%' border='0' cellpadding='1' cellspacing='0' align='center'><br>";
searchMessage+="<tr valign='top'>";
searchMessage+="<td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='201' height='201'>       <param name='movie' value='/images/50off-250x250.swf' /><param name='quality' value='high' /><PARAM NAME='wmode' VALUE='transparent'><embed src='/images/50off-250x250.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='201' height='201' quality='high' wmode='transparent'></embed></object></td>";
searchMessage+="<td><fieldset style='width:400px;'>";
searchMessage+="<legend><span class='style1'><b>Your Requested Search Criteria</b></span></legend>";
searchMessage+="<table width='265 border='0' align='center' cellpadding='4' cellspacing='1' class='normal'>";
searchMessage+="<tbody>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Selected Product :</td>";

searchMessage+="<td nowrap='nowrap' align='left'>Activity</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Activity Type : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+actTypeName+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Location : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+loc+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Arrival Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+srhdates+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Departure Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+depdate+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Night(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+nights+"</td>";
searchMessage+="</tr>";
searchMessage+="</tbody>";
searchMessage+="</table>";
searchMessage+="</fieldset></td>";
searchMessage+="</tr>";
searchMessage+="</table>";
searchMessage+="</td>";
searchMessage+="</tr>";
//searchMessage+="<tr>";
//searchMessage+="<td style='font-size:11px'>";
//searchMessage+="<span style='color:red;'>If you do not get results within 2 minutes then your internet connection may be too slow for our international suppliers to respond in time.</span><br><b>Please do the following:</b><br>";
//searchMessage+="1. Return to our home page and try again<br>";
//searchMessage+="2. Speak to a consultant on 0860 23 24 25 who can confirm your booking over the phone<br>";
//searchMessage+="3. Email us at <a href='mailto:book@flightsite.co.za'>book@flightsite.co.za</a> with your travel requirements and we will contact you</td>";
//searchMessage+="</tr>";
searchMessage+="</table>";


		
	}
	if(pkgType=='V'){
		var srhdates=""+document.forms["ResPkgSearchForm"].depDate_Air.value+"";
		var returndate=""+document.forms["ResPkgSearchForm"].arrDate_Air.value+"";
					   	
		var deptim = ""+document.forms["ResPkgSearchForm"].cmbDepTime_Air.value+"";
		var arrtim = ""+document.forms["ResPkgSearchForm"].cmbArrTime_Air.value+"";
		var adults = " "+document.forms["ResPkgSearchForm"].cmbAdults_Air.value+"";
		var Seniors = ""+document.forms["ResPkgSearchForm"].cmbSeniors_Air.value+"";
		var Child = ""+document.forms["ResPkgSearchForm"].cmbChildren_Air.value+"";
		var Infant = ""+document.forms["ResPkgSearchForm"].cmbInfant_Air.value+"";
		var dep = ""+document.forms["ResPkgSearchForm"].depLocName_Air.value+"";
		var arr = ""+document.forms["ResPkgSearchForm"].arrLocName_Air.value+"";
		var classtype=""+document.forms["ResPkgSearchForm"].seatClass_Air.value+""; 
		var V_rooms = " "+document.forms["ResPkgSearchForm"].elements["cmbNoRm_Hotels"].value+"";
		var depAirport=""+document.forms["ResPkgSearchForm"].depAirport_Air.value+"";
		var arrAirport=""+document.forms["ResPkgSearchForm"].arrAirport_Air.value+"";			   	
			
				
searchMessage="<table width='100%' height='84%' border='0' cellpadding='0' cellspacing='5'>";
searchMessage+="<tr>";
searchMessage+="<td  height='10'  class='bold' align='center'><h2>We are processing your request. Please wait...</h2></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='48%' align='center'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='280' height='32'>       <param name='movie' value='/images/loading_bar.swf' /><param name='quality' value='high' /><embed src='/images/loading_bar.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='280' height='32'></embed></object></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='100' class='bold' align='center'>";
searchMessage+="<table width='100%' border='0' cellpadding='1' cellspacing='0' align='center'><br>";
searchMessage+="<tr valign='top'>";
searchMessage+="<td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='201' height='201'>       <param name='movie' value='/images/50off-250x250.swf' /><param name='quality' value='high' /><PARAM NAME='wmode' VALUE='transparent'><embed src='/images/50off-250x250.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='201' height='201' quality='high' wmode='transparent'></embed></object></td>";
searchMessage+="<td><fieldset style='width:400px;'>";
searchMessage+="<legend><span class='style1'><b>Your Requested Search Criteria</b></span></legend>";
searchMessage+="<table width='265 border='0' align='center' cellpadding='4' cellspacing='1' class='normal'>";
searchMessage+="<tbody>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Selected Product :</td>";


searchMessage+="<td  nowrap='nowrap' align='left' colspan='2'>Holiday</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right' valign=\"top\">Departing From : </td>";
searchMessage+="<td align='left' colspan='2'>"+dep+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'  valign=\"top\">Return To : </td>";
searchMessage+="<td align='left' colspan='2'>"+arr+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Departing Date : </td>";
searchMessage+="<td  nowrap='nowrap' align='left' colspan='2'>"+srhdates+" (Time :"+deptim+")</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'>Return Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left' colspan='2'>"+returndate+" (Time :"+arrtim+")</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'>Room (s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left' colspan='2'>"+V_rooms+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'>Adult(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+adults+"</td>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'>Children(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left' >"+Child+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'  >Infant(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left' >"+Infant+"</td>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'></td>";
searchMessage+="<td nowrap='nowrap' align='left'></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'>Class : </td>";
searchMessage+="<td nowrap='nowrap' align='left' colspan='2'>"+classtype+"</td>";
searchMessage+="</tr>";
searchMessage+="</tbody>";
searchMessage+="</table>";
searchMessage+="</fieldset></td>";
searchMessage+="</tr>";
searchMessage+="</table>";
searchMessage+="</td>";
searchMessage+="</tr>";
//searchMessage+="<tr>";
//searchMessage+="<td style='font-size:11px'>";
//searchMessage+="<span style='color:red;'>If you do not get results within 2 minutes then your internet connection may be too slow for our international suppliers to respond in time.</span><br><b>Please do the following:</b><br>";
//searchMessage+="1. Return to our home page and try again<br>";
//searchMessage+="2. Speak to a consultant on 0860 23 24 25 who can confirm your booking over the phone<br>";
//searchMessage+="3. Email us at <a href='mailto:book@flightsite.co.za'>book@flightsite.co.za</a> with your travel requirements and we will contact you</td>";
//searchMessage+="</tr>";
searchMessage+="</table>";


	}
	if(pkgType=='F'){	
	var srhdates=""+document.forms["ResPkgSearchForm"].depDate_Air.value+"";
		var returndate=""+document.forms["ResPkgSearchForm"].arrDate_Air.value+"";
					   	
		var deptim = ""+document.forms["ResPkgSearchForm"].cmbDepTime_Air.value+"";
		var arrtim = ""+document.forms["ResPkgSearchForm"].cmbArrTime_Air.value+"";
		var adults = " "+document.forms["ResPkgSearchForm"].cmbAdults_Air.value+"";
		var Seniors = ""+document.forms["ResPkgSearchForm"].cmbSeniors_Air.value+"";
		var Child = ""+document.forms["ResPkgSearchForm"].cmbChildren_Air.value+"";
		var Infant = ""+document.forms["ResPkgSearchForm"].cmbInfant_Air.value+"";
		var dep_a = ""+document.forms["ResPkgSearchForm"].depLocName_Air.value+"";
		var arr_a = ""+document.forms["ResPkgSearchForm"].arrLocName_Air.value+"";
		var classtype=""+document.forms["ResPkgSearchForm"].seatClass_Air.value+""; 
		var depAirport=""+document.forms["ResPkgSearchForm"].depAirport_Air.value+"";
		var arrAirport=""+document.forms["ResPkgSearchForm"].arrAirport_Air.value+"";	
		var triptype =""+document.forms["ResPkgSearchForm"].tripType_Air.value+"";
		var isFlex = ""+document.forms["ResPkgSearchForm"].isFlex.value+"";
			
				
searchMessage="<table width='100%' height='84%' border='0' cellpadding='0' cellspacing='5'>";
searchMessage+="<tr>";
searchMessage+="<td  height='10'  class='bold' align='center'><h2>We are processing your request. Please wait...</h2></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='48%' align='center'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='280' height='32'>       <param name='movie' value='/images/loading_bar.swf' /><param name='quality' value='high' /><embed src='/images/loading_bar.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='280' height='32'></embed></object></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='100' class='bold' align='center'>";
searchMessage+="<table width='100%' border='0' cellpadding='1' cellspacing='0' align='center'><br>";
searchMessage+="<tr valign='top'>";
searchMessage+="<td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='201' height='201'>       <param name='movie' value='/images/50off-250x250.swf' /><param name='quality' value='high' /><PARAM NAME='wmode' VALUE='transparent'><embed src='/images/50off-250x250.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='201' height='201' quality='high' wmode='transparent'></embed></object></td>";
searchMessage+="<td><fieldset style='width:400px;'>";
searchMessage+="<legend><span class='style1'><b>Your Requested Search Criteria</b></span></legend>";
searchMessage+="<table width='265 border='0' align='center' cellpadding='4' cellspacing='1' class='normal'>";
searchMessage+="<tbody>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Selected Product :</td>";
searchMessage+="<td  nowrap='nowrap' align='left' colspan='3'>Flight</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Departing From : </td>";
searchMessage+="<td  nowrap='nowrap' align='left' colspan='3'>"+dep_a+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'>Return To : </td>";
searchMessage+="<td nowrap='nowrap' align='left' colspan='3'>"+arr_a+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Departing Date : </td>";
if(isFlex=='Y'){
	searchMessage+="<td  nowrap='nowrap' align='left' colspan='3'>"+srhdates+" ( Flexible Dates : &plusmn;"+document.forms["ResPkgSearchForm"].dep_flex.value+" )</td>";
}else{
	searchMessage+="<td  nowrap='nowrap' align='left' colspan='3'>"+srhdates+" ( Time : "+customizeTimePeriodLabel(deptim)+" )</td>";
}
searchMessage+="</tr>";
if(triptype=="R"){
	searchMessage+="<tr>";
	searchMessage+="<td width='100' nowrap='nowrap' align='right'>Return Date : </td>";
	if(isFlex=='Y'){
		searchMessage+="<td nowrap='nowrap' align='left' colspan='3'>"+returndate+" ( Flexible Dates : &plusmn;"+document.forms["ResPkgSearchForm"].ret_flex.value+" )</td>";
	}else{
		searchMessage+="<td nowrap='nowrap' align='left' colspan='3'>"+returndate+" ( Time : "+customizeTimePeriodLabel(arrtim)+" )</td>";
	}	
	searchMessage+="</tr>";
}
searchMessage+="<tr>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'>Adult(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+adults+"</td>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'>Children(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left' >"+Child+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'  >Infant(s) : </td>";
searchMessage+="<td nowrap='nowrap' align='left' >"+Infant+"</td>";
searchMessage+="<td height='20' align='right' nowrap='nowrap'></td>";
searchMessage+="<td nowrap='nowrap' align='left'></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='100' nowrap='nowrap' align='right'>Class : </td>";
searchMessage+="<td nowrap='nowrap' align='left' colspan='3'>"+classtype+"</td>";
searchMessage+="</tr>";
searchMessage+="</tbody>";
searchMessage+="</table>";
searchMessage+="</fieldset></td>";
searchMessage+="</tr>";
searchMessage+="</table>";
searchMessage+="</td>";
searchMessage+="</tr>";
//searchMessage+="<tr>";
//searchMessage+="<td style='font-size:11px'>";
//searchMessage+="<span style='color:red;'>If you do not get results within 2 minutes then your internet connection may be too slow for our international suppliers to respond in time.</span><br><b>Please do the following:</b><br>";
//searchMessage+="1. Return to our home page and try again<br>";
//searchMessage+="2. Speak to a consultant on 0860 23 24 25 who can confirm your booking over the phone<br>";
//searchMessage+="3. Email us at <a href='mailto:book@flightsite.co.za'>book@flightsite.co.za</a> with your travel requirements and we will contact you</td>";
//searchMessage+="</tr>";
searchMessage+="</table>";

		
	}
	if(pkgType=='C'){
		
		var srhdates=""+document.forms["ResPkgSearchForm"].pickupDate_Car.value+"";
		var Returndate=""+document.forms["ResPkgSearchForm"].returnDate_Car.value+"";
		
		var pictim = ""+document.forms["ResPkgSearchForm"].pickupTime_Car.value+"";		
		var rettim = ""+document.forms["ResPkgSearchForm"].retTime_Car.value+"";
		var cartype = ""+document.forms["ResPkgSearchForm"].carType_Car.value+"";
		var pick = ""+document.forms["ResPkgSearchForm"].pickupLocName_Car.value+"";
		var retto = ""+document.forms["ResPkgSearchForm"].retupLocName_Car.value+"";
		
		var pickupAirport=""+document.forms["ResPkgSearchForm"].pickupAirport_Car.value+"";
		var retupAirport=""+document.forms["ResPkgSearchForm"].retupAirport_Car.value+"";	
				
					
searchMessage="<table width='100%'  border='0' cellpadding='0' cellspacing='5'>";
searchMessage+="<tr>";
searchMessage+="<td  height='10'  class='bold' align='center'><h2>We are processing your request. Please wait...</h2></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td width='48%' align='center'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='280' height='32'>       <param name='movie' value='/images/loading_bar.swf' /><param name='quality' value='high' /><embed src='/images/loading_bar.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='280' height='32'></embed></object></td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td height='100' class='bold' align='center'>";
searchMessage+="<table width='100%' border='0' cellpadding='1' cellspacing='0' align='center'><br>";
searchMessage+="<tr valign='top'>";
searchMessage+="<td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='201' height='201'>       <param name='movie' value='/images/50off-250x250.swf' /><param name='quality' value='high' /><PARAM NAME='wmode' VALUE='transparent'><embed src='/images/50off-250x250.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='201' height='201' quality='high' wmode='transparent'></embed></object></td>";
searchMessage+="<td><fieldset style='width:400px;'>";
searchMessage+="<legend><span class='style1'><b>Your Requested Search Criteria</b></span></legend>";
searchMessage+="<table width='265 border='0' align='center' cellpadding='4' cellspacing='1' class='normal'>";
searchMessage+="<tbody>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Selected Product :</td>";
searchMessage+="<td nowrap='nowrap' align='left'>Car</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Car Type: </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+cartype+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Pickup From : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+pick+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Return To : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+retto+"</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Pickup Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+srhdates+" (Time :"+pictim+")</td>";
searchMessage+="</tr>";
searchMessage+="<tr>";
searchMessage+="<td nowrap='nowrap' align='right'>Return Date : </td>";
searchMessage+="<td nowrap='nowrap' align='left'>"+Returndate+"  (Time :"+rettim+")</td>";
searchMessage+="</tr>";
searchMessage+="</tbody>";
searchMessage+="</table>";
searchMessage+="</fieldset></td>";
searchMessage+="</tr>";
searchMessage+="</table>";
searchMessage+="</td>";
//searchMessage+="</tr>";
//searchMessage+="<tr>";
//searchMessage+="<td style='font-size:11px'>";
//searchMessage+="<span style='color:red;'>If you do not get results within 2 minutes then your internet connection may be too slow for our international suppliers to respond in time.</span><br><b>Please do the following:</b><br>";
//searchMessage+="1. Return to our home page and try again<br>";
//searchMessage+="2. Speak to a consultant on 0860 23 24 25 who can confirm your booking over the phone<br>";
//searchMessage+="3. Email us at <a href='mailto:book@flightsite.co.za'>book@flightsite.co.za</a> with your travel requirements and we will contact you</td>";
//searchMessage+="</tr>";
searchMessage+="</table>";




	
	}
	document.getElementById("searchMsg").innerHTML=searchMessage;
	//alert("searchMessage: "+searchMessage);
	document.getElementById("loading").style.display="block";
	set_to_center("loading");

}

function returnLocHide(){
	if(document.forms["form1"].elements["_ReturnCar"].checked){
		document.getElementById("retLocDisplay").style.display="none";
		document.getElementById("retLocDisplay1").style.display="none";
	}else if(document.forms["form1"].elements["_ReturnCar"]){
		document.getElementById("retLocDisplay").style.display="block";
		document.getElementById("retLocDisplay1").style.display="block";
	
	}
}

function onewayHide(){
	if(document.forms["form1"].elements["Air_TripType1"].checked){
		document.getElementById("retDateDisplay").style.display="none";
		document.getElementById('flex_table').style.display="none";
		
	}else  if(document.forms["form1"].elements["Air_TripType2"].checked){
		document.getElementById("retDateDisplay").style.display="block";
		document.getElementById('flex_table').style.display="block";
	}
	
}
function onewayHide_V(){

	if(document.forms["form1"].elements["Air_TripType1_V"].checked){
		document.getElementById("retDateDisplay_V").style.display="none";

		
	} else if(document.forms["form1"].elements["Air_TripType2_V"].checked){
		document.getElementById("retDateDisplay_V").style.display="block";

		
}}

function hidedepart(value){
	
	if (document.forms["form1"].engType.value="FP")
	{

		document.getElementById("V_departtime").style.display="none";
		document.getElementById("V_lbldeparttime").style.display="none";		
		document.getElementById("V_night").style.display="block";
		document.getElementById("V_lblnight").style.display="block";
		document.getElementById("retDateDisplay_V").style.display="none";
		document.getElementById("hideinfant").style.display="none";
		
		
	}else{
		document.getElementById("retDateDisplay_V").style.display="block";
		document.getElementById("V_night").style.display="none";
		document.getElementById("V_departtime").style.display="block";
	}
}

function showtime(){
document.getElementById("V_departtime").style.display="block";
document.getElementById("V_night").style.display="none";	
document.getElementById("V_lblnight").style.display="none";
document.getElementById("V_lbldeparttime").style.display="block";
document.getElementById("hideinfant").style.display="block";
}


function alltime(obj,stime){
var timeobj="";
timeobj+="<select name='"+obj+"'>";
timeobj+="<option value='"+stime+"' selected>Any Time</option>";
timeobj+="<option value='01:00:00'>1AM</option>";
timeobj+="<option value='02:00:00'>2AM</option>";
timeobj+="<option value='03:00:00'>3AM</option>";
timeobj+="<option value='04:00:00'>4AM</option>";
timeobj+="<option value='05:00:00'>5AM</option>";
timeobj+="<option value='06:00:00'>6AM</option>";
timeobj+="<option value='07:00:00'>7AM</option>";
timeobj+="<option value='08:00:00'>8AM</option>";
timeobj+="<option value='09:00:00'>9AM</option>";
timeobj+="<option value='10:00:00'>10AM</option>";
timeobj+="<option value='11:00:00'>11AM</option>";
timeobj+="<option value='12:00:00'>Noon</option>";
timeobj+="<option value='13:00:00'>1PM</option>";
timeobj+="<option value='14:00:00'>2PM</option>";
timeobj+="<option value='15:00:00'>3PM</option>";
timeobj+="<option value='16:00:00'>4PM</option>";
timeobj+="<option value='17:00:00'>5PM</option>";
timeobj+="<option value='18:00:00'>6PM</option>";
timeobj+="<option value='19:00:00'>7PM</option>";
timeobj+="<option value='20:00:00'>8PM</option>";
timeobj+="<option value='21:00:00'>9PM</option>";
timeobj+="<option value='22:00:00'>10PM</option>";
timeobj+="<option value='23:00:00'>11PM</option>";
timeobj+="<option value='00:00:00'>Midnight</option>";
timeobj+="</select>";
document.write(timeobj);
}


function airlineCodeList(){
var airline="";
airline+="<option value='0'>ALL</option>";
airline+="<option value='onetime'>1time</option>";
airline+="<option value='EI'>Aer Lingus</option>";
airline+="<option value='BP'>Air Botswana</option>";
airline+="<option value='AC'>Air Canada</option>";
airline+="<option value='AF'>Air France</option>";
airline+="<option value='MD'>Air Madagascar</option>";
airline+="<option value='QM'>Air Malawi</option>";
airline+="<option value='MK'>Air Mauritius</option>";
airline+="<option value='SW'>Air Namibia</option>";
airline+="<option value='NZ'>Air New Zealand</option>";
airline+="<option value='HM'>Air Seychelles</option>";
airline+="<option value='TC'>Air Tanzania</option>";
airline+="<option value='UM'>Air Zimbabwe</option>";
airline+="<option value='OS'>Austrian</option>";
airline+="<option value='BD'>bmi British Midland</option>";
airline+="<option value='BA'>British Airways</option>";
airline+="<option value='CX'>Cathay Pacific Airways</option>";
airline+="<option value='CO'>Continental Airlines</option>";
airline+="<option value='DL'>Delta Air Lines</option>";
airline+="<option value='MS'>Egyptair</option>";
airline+="<option value='LY'>El Al Israel Airlines</option>";
airline+="<option value='EK'>Emirates</option>";
airline+="<option value='ET'>Ethiopian Airlines</option>";
airline+="<option value='EY'>Etihad Airways</option>";
airline+="<option value='IB'>Iberia</option>";
airline+="<option value='KQ'>Kenya Airways</option>";
airline+="<option value='KL'>KLM Royal Dutch Airlines</option>";
airline+="<option value='kulula'>Kulula</option>";
airline+="<option value='TM'>LAM - Linhas Aereas de Mocambique</option>";
airline+="<option value='LT'>LTU</option>";
airline+="<option value='LH'>Lufthansa</option>";
airline+="<option value='MH'>Malaysia Airlines</option>";
airline+="<option value='mango'>Mango</option>";
airline+="<option value='OA'>Olympic Airlines</option>";
airline+="<option value='QF'>Qantas Airways</option>";
airline+="<option value='QR'>Qatar Airways</option>";
airline+="<option value='SQ'>Singapore Airlines</option>";
airline+="<option value='SA'>South African Airways</option>";
airline+="<option value='LX'>Swiss</option>";
airline+="<option value='DT'>TAAG - Linhas Aereas de Angola Airlines</option>";
airline+="<option value='TP'>TAP Air Portugal</option>";
airline+="<option value='TG'>Thai Airways International</option>";
airline+="<option value='TK'>Turkish Airlines</option>";
airline+="<option value='UA'>United Airlines</option>";
airline+="<option value='US'>US Airways</option>";
airline+="<option value='VS'>Virgin Atlantic Airways</option>";
document.write(airline);
}

function show_fun(id){
if (id=='show_pass_id'){
document.getElementById("show_detail").style.display="block";
document.getElementById("show_show_word").style.display="block";
document.getElementById("hide_show_word").style.display="none";
}else{

}
}

function hide_fun(id){
if (id=='hide_pass_id'){
document.getElementById("show_detail").style.display="none";
document.getElementById("hide_show_word").style.display="block";
document.getElementById("show_show_word").style.display="none";
}
}

function show_fun_V(id){
if (id=='show_pass_id_V'){
document.getElementById("show_detail_V").style.display="block";
document.getElementById("show_show_word_V").style.display="block";
document.getElementById("hide_show_word_V").style.display="none";
}else{

}
}

function hide_fun_V(id){
if (id=='hide_pass_id_V'){
document.getElementById("show_detail_V").style.display="none";
document.getElementById("hide_show_word_V").style.display="block";
document.getElementById("show_show_word_V").style.display="none";
}
}

function set_to_center(e){
  var divH = document.getElementById(e).offsetHeight;
  if(navigator.appName=='Netscape'){
   var screenH = window.innerHeight || document.body.offsetHeight;
  }else{
   var screenH = document.documentElement.clientHeight;
  }
  var scrollH = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
  var scrollW = window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft;
  var divW = document.getElementById(e).offsetWidth;
  var screenW = document.documentElement.clientWidth;

  var top = scrollH + (screenH-divH)/2;
  var left = scrollW + (screenW - divW)/2;
  document.getElementById(e).style.top = top+'px';
  document.getElementById(e).style.left = left+'px'; 
 }
 
  /*This is only for Flight & Car */
function customizeTimePeriodLabel(str){	
	var retStr=str;	
	if(str=="AnyTime"){
		retStr="Anytime";
	}else if (str=="Morning"){
		retStr="Morning";
	}else if (str=="Afternoon"){
		retStr="Afternoon";
	}else if (str=="Evening"){
		retStr="Evening";
	}
	return retStr;
}

function checkFlex(stat){
	if(stat=="Yes"){
		//alert(stat);
		document.getElementById('dep_time').style.display="none";
		document.getElementById('dep_flexx').style.display="block";
		document.getElementById('dep_time_txt').innerHTML="";
		document.getElementById('ret_time').style.display="none";
		document.getElementById('ret_flexx').style.display="block";
		document.getElementById('ret_time_txt').innerHTML="";
		document.ResPkgSearchForm.isFlex.value="Y";
	}else{
		//alert(stat);
		document.getElementById('dep_time').style.display="block";
		document.getElementById('dep_flexx').style.display="none";
		document.getElementById('dep_time_txt').innerHTML="Departing Time";
		document.getElementById('ret_time_txt').innerHTML="Return Time";
		document.getElementById('ret_time').style.display="block";
		document.getElementById('ret_flexx').style.display="none";
		document.ResPkgSearchForm.isFlex.value="N";
	}
}


function show_error_msg(e){
	document.getElementById('alertbox_msg').innerHTML=e
	document.getElementById('alertbox').style.display="block"
}

function hide_error_msg(){
	document.getElementById('alertbox_msg').innerHTML=''
	document.getElementById('alertbox').style.display="none"
}

function removetext(text){
if(text.value == 'Type & wait for menu') {
text.value = ''
text.setAttribute("class", "text_blue");
}
}
							  
function showtext(text){
 if(text.value =="" ) {
text.value='Type & wait for menu';
text.setAttribute("class", "text_ash");
}
}
