﻿/* start  */
//DD Tab Menu- Script rewritten April 27th, 07: http://www.dynamicdrive.com
//**Updated Feb 23rd, 08): Adds ability for menu to revert back to default selected tab when mouse moves out of menu

//Only 2 configuration variables below:

var ddtabmenu={
	disabletablinks: false, //Disable hyperlinks in 1st level tabs with sub contents (true or false)?
	snap2original: [true, 300], //Should tab revert back to default selected when mouse moves out of menu? ([true/false, delay_millisec]

	currentpageurl: window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, ""), //get current page url (minus hostname, ie: http://www.dynamicdrive.com/)

definemenu:function(tabid, dselected){
	this[tabid+"-menuitems"]=null
	this[tabid+"-dselected"]=-1
	this.addEvent(window, function(){ddtabmenu.init(tabid, dselected)}, "load")
},

showsubmenu:function(tabid, targetitem){
	var menuitems=this[tabid+"-menuitems"]
	this.clearrevert2default(tabid)
 for (i=0; i<menuitems.length; i++){
		menuitems[i].className=""
		if (typeof menuitems[i].hasSubContent!="undefined")
			document.getElementById(menuitems[i].getAttribute("rel")).style.display="none"
	}
	targetitem.className="current"
	if (typeof targetitem.hasSubContent!="undefined")
		document.getElementById(targetitem.getAttribute("rel")).style.display="block"
},

isSelected:function(menuurl){
	var menuurl=menuurl.replace("http://"+menuurl.hostname, "").replace(/^\//, "")
	return (ddtabmenu.currentpageurl==menuurl)
},

isContained:function(m, e){
	var e=window.event || e
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

revert2default:function(outobj, tabid, e){
	if (!ddtabmenu.isContained(outobj, tabid, e)){
		window["hidetimer_"+tabid]=setTimeout(function(){
			ddtabmenu.showsubmenu(tabid, ddtabmenu[tabid+"-dselected"])
		}, ddtabmenu.snap2original[1])
	}
},

clearrevert2default:function(tabid){
 if (typeof window["hidetimer_"+tabid]!="undefined")
		clearTimeout(window["hidetimer_"+tabid])
},

addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

init:function(tabid, dselected){
	var menuitems=document.getElementById(tabid).getElementsByTagName("a")
	this[tabid+"-menuitems"]=menuitems
	for (var x=0; x<menuitems.length; x++){
		if (menuitems[x].getAttribute("rel")){
			this[tabid+"-menuitems"][x].hasSubContent=true
			if (ddtabmenu.disabletablinks)
				menuitems[x].onclick=function(){return false}
			if (ddtabmenu.snap2original[0]==true){
				var submenu=document.getElementById(menuitems[x].getAttribute("rel"))
				menuitems[x].onclick=function(e){ddtabmenu.revert2default(submenu, tabid, e)}
				submenu.onclick=function(){ddtabmenu.clearrevert2default(tabid)}
				submenu.onclick=function(e){ddtabmenu.revert2default(this, tabid, e)}
			}
		}
		else //for items without a submenu, add onclick effect
			menuitems[x].onclick=function(e){this.className=""; if (ddtabmenu.snap2original[0]==true) ddtabmenu.revert2default(this, tabid, e)}
		menuitems[x].onclick=function(){ddtabmenu.showsubmenu(tabid, this)}
		if (dselected=="auto" && typeof setalready=="undefined" && this.isSelected(menuitems[x].href)){
			ddtabmenu.showsubmenu(tabid, menuitems[x])
			this[tabid+"-dselected"]=menuitems[x]
			var setalready=true
		}
		else if (parseInt(dselected)==x){
			ddtabmenu.showsubmenu(tabid, menuitems[x])
			this[tabid+"-dselected"]=menuitems[x]
		}
	}
}
}
/* end */


var today = new Date();

function getObj(objID)
{
    if (document.getElementById) {return document.getElementById(objID);}
    else if (document.all) {return document.all[objID];}
    else if (document.layers) {return document.layers[objID];}
}

function checkClick(e) {
	e?evt=e:evt=event;
	CSE=evt.target?evt.target:evt.srcElement;
	if (getObj('fc'))
		if (!isChild(CSE,getObj('fc')))
			getObj('fc').style.display='none';
}

function isChild(s,d) {
	while(s) {
		if (s==d) 
			return true;
		s=s.parentNode;
	}
	return false;
}

function Left(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function Top(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

document.write('<div id="fc" style="position:absolute; width:160px; height:170px; display:none;z-index:998;"><iframe id="framediv" src="" frameborder="0" scrolling="no" style="position: absolute; left:0px; top:0px; width: 160px; height: 170px; z-index:999;"></iframe><div style="position:absolute; left:0px; top:0px; width:160px; height:170px; border:1px solid #73c0ce; background:#d5ecf0; z-index:1000"><table id="fc2" style="position:absolute; left:4px; top:0px; width:150px; height:165px; border-collapse:collapse; background:#d5ecf0; z-index:1001;" cellpadding="2">');
document.write('<tr><td colspan="6" align="left" style="font:bold 11px Arial; background:#D5ECF0;">Select date:</td><td align="right" style="background:#d5ecf0;"><img src="www.discountcityhotels.com/images/cross-close.gif" style="cursor:pointer" onclick="getObj(\'fc\').style.display=\'none\';"></td></tr>');
document.write('<tr><td style="background:#666666;"><img id="imgLeft" src="http://www.discountcityhotels.com/images/callt.gif" alt="<" title="Previous Month" style="cursor:pointer; width:6px; height:12px;" onclick="csubm();"></td><td colspan=5 id="mns" align="center" style="font:bold 11px Arial;background:#666666; color:#ffffff;"></td><td align="right" style="background:#666666;"><img id="imgRight" src="http://www.discountcityhotels.com/images/calrt.gif" alt=">" title="Next Month" style="cursor:pointer; width:6px; height:12px;" onclick="caddm();"></td></tr>');
document.write('<tr><td align="center" style="background:#d5ecf0;font:12px Arial">S</td><td align="center" style="background:#D5ECF0;font:11px Arial">M</td><td align="center" style="background:#D5ECF0;font:11px Arial">T</td><td align="center" style="background:#D5ECF0;font:11px Arial">W</td><td align="center" style="background:#D5ECF0;font:11px Arial">T</td><td align="center" style="background:#d5ecf0;font:11px Arial">F</td><td align="center" style="background:#D5ECF0;font:11px Arial">S</td></tr>');
for(var kk=1;kk<=6;kk++) {
	document.write('<tr>');
	for(var tt=1;tt<=7;tt++) {
		num=7 * (kk-1) - (-tt);
		document.write('<td id="v' + num + '" style="width:18px;">&nbsp;</td>');
	}
	document.write('</tr>');
}
document.write('</table></div></div>');

document.all?document.attachEvent('onclick',checkClick):document.addEventListener('click',checkClick,false);

// Calendar script
var now = new Date();
var sccm=today.getMonth();
var sccy=today.getFullYear();
var ccm=today.getMonth();
var ccy=today.getFullYear();

var updobj;
    
function lcs(ielem) {
    updobj=ielem;

	var left=Left(ielem);
	var top=Top(ielem)+ielem.offsetHeight;
	//if (navigator.appName == "Microsoft Internet Explorer")
	//{left += 9; top+=15;}
	getObj('fc').style.left=left+"px";
	getObj('fc').style.top= top+"px";
	getObj('fc').style.display='';
		
	// First check date is valid
	curdt=ielem.value;
	curdtarr=curdt.split('/');
	isdt=true;
	for(var k=0;k<curdtarr.length;k++) {
		if (isNaN(curdtarr[k]))
			isdt=false;
	}
	if (isdt&(curdtarr.length==3)) {
		ccm=curdtarr[1]-1;
		ccy=curdtarr[2];
		prepcalendar(curdtarr[0],curdtarr[1]-1,curdtarr[2]);
	}
}

function evtTgt(e)
{
	var el;
	if(e.target)el=e.target;
	else if(e.srcElement)el=e.srcElement;
	if(el.nodeType==3)el=el.parentNode; // defeat Safari bug
	return el;
}
function EvtObj(e){if(!e)e=window.event;return e;}
function cs_over(e) {
    if (evtTgt(EvtObj(e)).style.background.toString().toLowerCase() == "#fff799")
        return;
	evtTgt(EvtObj(e)).style.background='#FFCC66';
}
function cs_out(e) {
    if (evtTgt(EvtObj(e)).style.background.toString().toLowerCase() == "#fff799")
        return;
	evtTgt(EvtObj(e)).style.background='#ffffff';
}
function cs_click(e) {
  var sDate=calvalarr[evtTgt(EvtObj(e)).id.substring(1,evtTgt(EvtObj(e)).id.length)].split('/');
	updobj.value=(sDate[0].length==1?"0"+sDate[0]:sDate[0])+"/"+(sDate[1].length==1?"0"+sDate[1]:sDate[1])+"/"+sDate[2];
	getObj('fc').style.display='none';

	if (updobj.name.indexOf("fromDate") != -1)
	    CheckDate('dep');
	if (updobj.name.indexOf("toDate") != -1)
	    CheckDate('ret');
}

var mn=new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
var mnn=new Array('31','28','31','30','31','30','31','31','30','31','30','31');
var mnl=new Array('31','29','31','30','31','30','31','31','30','31','30','31');
var calvalarr=new Array(42);

function f_cps(obj) {
	obj.style.background='#ffffff';
	obj.style.font='10px Arial';
	obj.style.color='#333333';
	obj.style.textAlign='center';
	obj.style.textDecoration='none';
	obj.style.border='1px solid #73C0CE';
	obj.style.cursor='pointer';
}

function f_cpps(obj) {
	obj.style.background='#ffffff';
	obj.style.font='10px Arial';
	obj.style.color='#ABABAB';
	obj.style.textAlign='center';
//	obj.style.textDecoration='line-through';
	obj.style.border='1px solid #73C0CE';
	obj.style.cursor='default';
}

function f_hds(obj) {
	obj.style.background='#FFF799';
	obj.style.font='bold 10px Arial';
	obj.style.color='#333333';
	obj.style.textAlign='center';
	obj.style.border='1px solid #73C0CE';
	obj.style.cursor='pointer';
}

// day selected
function prepcalendar(hd,cm,cy) {
    var _d = today.getDate();
    var _m = today.getMonth();
    var _y = today.getFullYear();
    
    if (_m == ccm && _y == ccy)
        getObj("imgLeft").style.display = 'none';
    else
        getObj("imgLeft").style.display = 'block';

    if (_d == 1)
        _m--;
    if (_m == -1)
        _m = 12;
    
	sd=today.getDate();
	td=new Date(today.getFullYear(),today.getMonth(),today.getDate());
	td.setDate(1);
	td.setFullYear(cy);
	td.setMonth(cm);
	cd=td.getDay();
	getObj('mns').innerHTML=mn[cm]+ ' ' + cy;
	marr=((cy%4)==0)?mnl:mnn;
	for(var d=1;d<=42;d++) {
		f_cps(getObj('v'+parseInt(d)));
		if ((d >= (cd -(-1))) && (d<=cd-(-marr[cm]))) {
			dip=((d-cd < sd)&&(cm==sccm)&&(cy==sccy));
			if (!dip)
			    dip=((_d != 1) && (d-cd >= _d)&&(cm==_m)&&(cy==_y+1));
			htd=((hd!='')&&(d-cd==hd));
			if (dip)
				f_cpps(getObj('v'+parseInt(d)));
			else if (htd)
				f_hds(getObj('v'+parseInt(d)));
			else
				f_cps(getObj('v'+parseInt(d)));

			getObj('v'+parseInt(d)).onmouseover=(dip)?null:cs_over;
			getObj('v'+parseInt(d)).onmouseout=(dip)?null:cs_out;
			getObj('v'+parseInt(d)).onclick=(dip)?null:cs_click;
			
			getObj('v'+parseInt(d)).innerHTML=d-cd;	
			calvalarr[d]=''+(d-cd)+'/'+(cm-(-1))+'/'+cy;
		}
		else {
			getObj('v'+d).innerHTML='&nbsp;';
			getObj('v'+parseInt(d)).onmouseover=null;
			getObj('v'+parseInt(d)).onmouseout=null;
			getObj('v'+parseInt(d)).style.cursor='default';
			}
	}
                
    if (_m == ccm && (_y+1) == ccy)
        getObj("imgRight").style.display = 'none';
    else
        getObj("imgRight").style.display = 'block';
}

prepcalendar('',ccm,ccy);
//getObj('fc'+cc).style.visibility='hidden';

function caddm() {
	marr=((ccy%4)==0)?mnl:mnn;
	
	ccm+=1;
	if (ccm>=12) {
		ccm=0;
		ccy++;
	}
	cdayf();
	prepcalendar('',ccm,ccy);
}

function csubm() {
	marr=((ccy%4)==0)?mnl:mnn;
	
	ccm-=1;
	if (ccm<0) {
		ccm=11;
		ccy--;
	}
	cdayf();
	prepcalendar('',ccm,ccy);
}

function cdayf() {
if ((ccy>sccy)|((ccy==sccy)&&(ccm>=sccm)))
	return;
else {
	ccy=sccy;
	ccm=sccm;
//	cfd=scfd;
	}
}

document.onkeyup = function (evt)
{
    var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode;

    if (keyCode == 27)
    {
        if (document.getElementById("fc"))
            document.getElementById("fc").style.display = "none";
    }
 }

function ValidateDate(StartDate,EndDate)
{           
           
     var dayfrom=StartDate.substring(0,2);
     var monthfrom=StartDate.substring(3,5);
     var yearfrom=StartDate.substring(6,10);
     var FromDate=new Date(yearfrom,monthfrom-1,dayfrom);
     var dayTo=EndDate.substring(0,2);
     var monthTo=EndDate.substring(3,5);
     var yearTo=EndDate.substring(6,10);
     var ToDate=new Date(yearTo,monthTo-1,dayTo);
     if(FromDate >= ToDate)
     {
        return false;
     }
     else
     {
        return true;
     }
}
function Valid()
{  
	 var CN=document.getElementById('dCn');
         var iCN=document.getElementById('dCn').selectedIndex;
         var CC="";
	 var CT=document.getElementById('dCt');
         var iCT=document.getElementById('dCt').selectedIndex;
	if(iCN!=null && CN.options[iCN].value.indexOf("|")== -1)
	 {
	    alert('Please Select Country.');
	    CN.focus();
	    return false;
	 }
	 if(iCT!=null && CT.options[iCT].value.indexOf("|")== -1 && iCT==0)
	   {
	    alert('Please Select City.');
	    CT.focus();
	    return false;
	    }
        if(document.getElementById('txtHotelArrivalDate').value=='')
        {
            alert('Specify valid Arrival Date.');
            document.getElementById('txtHotelArrivalDate').focus();
            return false;
        }
        else if(document.getElementById('txtHotelDeptDate').value=='')
        {
            alert('Specify valid Departure Date.');
            document.getElementById('txtHotelDeptDate').focus();
            return false;
        }
        else if(document.getElementById('txtHotelArrivalDate').value!='' && document.getElementById('txtHotelDeptDate').value!='')
        {
            var HArrivaldt =document.getElementById('txtHotelArrivalDate').value;
            var HDeptdt =document.getElementById('txtHotelDeptDate').value;
            var bValid= ValidateDate(HArrivaldt,HDeptdt);
           if(bValid==false)
           {
                alert('Departure Date should be greater than Arrival Date.');
                document.getElementById('txtHotelDeptDate').focus();
                return false;
           }
        }
   routeParent();
} 
function routeParent()
   { 
	 var HA =document.getElementById('txtHotelArrivalDate').value;
	 var HD =document.getElementById('txtHotelDeptDate').value;
	 var CN=document.getElementById('dCn');
         var iCN=document.getElementById('dCn').selectedIndex;
         var CC="";
	 var CT=document.getElementById('dCt');
         var iCT=document.getElementById('dCt').selectedIndex;
	 var CiC="";
	 var CiN="";
	 var CiP="";
	
         if(iCN!=null && CN.options[iCN].value.indexOf("|")!= -1)
	 {
	    CC=CN.options[iCN].value.split("|")[0];
	 }
	 else
	 {
	    alert('Please Select Country.');
	    CN.focus();
	    return;
	 }
	
	    
	 if(iCT!=null && CT.options[iCT].value.indexOf("|")!= -1 && iCT!=0)
	  {
	    CiC=CT.options[iCT].value.split("|")[0];
	    CiP=CT.options[iCT].value.split("|")[1];
	    CiN=CT.options[iCT].text;
	  }
	 else
           {
	    alert('Please Select City.');
	    CT.focus();
	    return;
	    }
	 var StrLocation='http://www.discountcityhotels.net/hotels/processrequest.aspx?checkindate='+HA+'&checkoutdate='+HD+'&country='+CC+'&cityIATACode='+CiC+'&city='+CiN+'&cityId='+CiP+'&propertyXID=9&contractType=Commissionable Rate';
parent.location=StrLocation;

   }
function ValidateC()
{
	 var CT=document.getElementById('dHCt');
         var iCT=document.getElementById('dHCt').selectedIndex; 
 	if(iCT!=null && CT.options[iCT].value.indexOf("|")== -1 && iCT==0)
	  {
	    alert('Please Select City.');
	    CT.focus();
	    return false;
	    }
        if(document.getElementById('txtHotelArr').value=='')
        {
            alert('Specify valid Arrival Date.');
            document.getElementById('txtHotelArr').focus();
            return false;
        }
        else if(document.getElementById('txtHotelDept').value=='')
        {
            alert('Specify valid Departure Date.');
            document.getElementById('txtHotelDept').focus();
            return false;
        }
        else if(document.getElementById('txtHotelArr').value!='' &&	document.getElementById('txtHotelDept').value!='')
        {
            var HArrivaldt =document.getElementById('txtHotelArr').value;
            var HDeptdt =document.getElementById('txtHotelDept').value;
            var bValid= ValidateDate(HArrivaldt,HDeptdt);
           if(bValid==false)
           {
                alert('Departure Date should be greater than Arrival Date.');
                document.getElementById('txtHotelDept').focus();
                return false;
           }
        }
   routeParentC();
}


function routeParentC()
   { 
	 var HA =document.getElementById('txtHotelArr').value;
	 var HD =document.getElementById('txtHotelDept').value;
	 var CT=document.getElementById('dHCt');
         var iCT=document.getElementById('dHCt').selectedIndex;
	 var CiC="";
	 var CiN="";
	 var CiP="";
	 var countryISOCode ="";
     	 if(iCT!=null && CT.options[iCT].value.indexOf("|")!= -1 && iCT!=0)
	  {
	    CiC=CT.options[iCT].value.split("|")[0];
	    CiP=CT.options[iCT].value.split("|")[1];
	    countryISOCode = CT.options[iCT].value.split("|")[2];
	    CiN=CT.options[iCT].text;
	  }
	 else
           {
	    alert('Please Select City');
	    CT.focus();
	    return;
	    }
	 var StrLocation='http://www.discountcityhotels.net/hotels/processrequest.aspx?checkindate='+HA+'&checkoutdate='+HD+'&country='+countryISOCode+'&cityIATACode='+CiC+'&city='+CiN+'&cityId='+CiP+'&propertyXID=3&contractType=Commissionable Rate';
parent.location=StrLocation;
   }

function controlAdd()
{
var obj = document.getElementById("divDCHBooking");
var  apt="<table cellpadding='0' cellspacing='2' width='194' style='background-color:#faede7;'><tr><td></td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>Country</td> </tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'><select style='font-size:11px; color:666666; width:140px;' name=' dCn' id='dCn' onChange='fCt();'>"+fC()
apt=apt+"</select></td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>City</td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'><select style='font-size:11px; color:666666; width:140px;' name='dCt' id='dCt'><option>City</option></select></td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>Arrival Date</td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'><input name='txtHotelArrivalDate' id='txtHotelArrivalDate' style='padding-left:3px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#666666;' type='text' onFocus='this.select();lcs(this);' onClick='event.cancelBubble=true;this.select();lcs(this);return false;' value='' readonly='readonly' /> ";
apt=apt+"<a href='javascript:void(0)' onClick=";
apt=apt+"\"event.cancelBubble=true;lcs(document.getElementById('"+"txtHotelArrivalDate"+"'));return false;\" title='Select Date'> <img id='dateLink1' src='http://www.discountcityhotels.com/images/calendar_icon.gif' alt='Select Date' border='0' style='margin-bottom: -4px;'/></a> </td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>Departure Date</td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-family:Arial;font-size:85%;color:#333;'><input name='txtHotelDeptDate' id='txtHotelDeptDate' style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#666666;' type='text' onFocus='this.select();lcs(this);' onClick=' ;event.cancelBubble=true;this.select();lcs(this);return false;' value='' readonly='readonly' /> <a href='javascript:void(0)' onClick=";
apt=apt+ "\"event.cancelBubble=true;lcs(document.getElementById('txtHotelDeptDate'));return false;\" title='Select Date'> <img id='Img1' src='http://www.discountcityhotels.com/images/calendar_icon.gif' alt='Select Date' border='0' style='margin-bottom: -4px;' /></a> </td></tr>";
apt=apt+"<tr><td style='padding-left:3px; font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>";
apt=apt+"<input name='button' type='Button' id='button' style='font-face:verdana; font-size:10px; border:1px solid #fdbc85; background-color:#cc6633; color:#fff; font-weight:bold; width:110px; cursor:pointer;' value='Check Availability' onClick='return Valid();'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>";

var  ht="<table cellpadding='0' cellspacing='0' width='194' style='background-color:#faede7;'><tr><td style='font-family:Arial;color:#fff;font-size:11px;font-stretch:extra-expanded; font-weight:bold; text-align:center;'></td></tr>";
ht=ht+"<tr><td  colspan='2' style='padding-left:3px;'><table width='100%' border='0'  cellspacing='2' cellpadding='0' style='z-index:999;'><tr><td style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'></td></tr><tr></tr>";
ht=ht+"<tr><td  colspan='2' style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>City</td></tr>";
ht=ht+"<tr><td  colspan='2' style='font-face:verdana; font-size:11px; color:#fff;'><select style='font-size:11px; color:666666; width:140px;' name='dHCt' id='dHCt'>"+fCi()+"</select></td></tr>";
ht=ht+"<tr><td style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>Arrival Date</td></tr>";
ht=ht+"<tr><td colspan='2'><input name='txtHotelArr' id='txtHotelArr' style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#666666;' type='text' onFocus='this.select();lcs(this);' onClick='event.cancelBubble=true;this.select();lcs(this);return false;' value='' readonly='readonly' /> ";
ht=ht+"<a href='javascript:void(0)' onClick=";
ht=ht+"\"event.cancelBubble=true;lcs(document.getElementById('"+"txtHotelArr"+"'));return false;\" title='Select Date'> <img id='dateLink1' src='http://www.discountcityhotels.com/images/calendar_icon.gif' alt='Select Date' border='0' style='margin-bottom: -4px;'/></a> </td></tr>";
ht=ht+"<tr><td  colspan='2' style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>Departure Date</td></tr>";
ht=ht+"<tr><td  colspan='2' style='font-family:Arial;font-size:100%;color:#333;'><input name='txtHotelDept' id='txtHotelDept' style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#666666;' type='text' onFocus='this.select();lcs(this);' onClick=' ;event.cancelBubble=true;this.select();lcs(this);return false;' value='' readonly='readonly' /> <a href='javascript:void(0)' onClick=";
ht=ht+ "\"event.cancelBubble=true;lcs(document.getElementById('txtHotelDept'));return false;\" title='Select Date'> <img id='Img2' src='http://www.discountcityhotels.com/images/calendar_icon.gif' alt='Select Date' border='0' style='margin-bottom: -4px;' /></a> </td> </tr> ";
ht=ht+"<tr><td width='48%' style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'>No. of Guest</td>";
ht=ht+"<td width='53%' style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'><select name='select' style='font-size: 11px;font-family:Verdana, Arial, Helvetica, sans-serif;color:#666666;'><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option>";
ht=ht+"</select></td></tr>";
ht=ht+"<tr> <td style='' colspan='2'><input name='button' type='Button' id='button' style='font-face:verdana; font-size:10px; border:1px solid #fdbc85; background-color:#cc6633; color:#fff; font-weight:bold; width:110px; cursor:pointer;' value='Check Availability' onClick='return ValidateC();'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> </tr></table></td></tr></table>"; 

obj.innerHTML=apt;
var main="<table style='width: 100%;' border='0' cellpadding='0' cellspacing='0' align='center'><tr><td><div id='ddtabs4' class='dchcolortabs'><ul><li><a rel='Hotels' style='cursor: pointer;'><span>Hotels</span></a></li><li><a rel='Apartments' style='cursor: pointer;'><span>Apartments</span></a></li></ul></div></td></tr><tr><td><div style='width: 98%; border: 1px solid #d1430e;' align='left'><div id='Hotels' class='tabcontent' style='padding:0px;'>";
main=main+ht;
main=main+"</div><div id='Apartments' class='tabcontent' style='padding:0px;'>";
main=main+apt;
main=main+"</div></div></td></tr></table>"; 
obj.innerHTML=main;
}