

numdivs=6;
last_tab = 'tab1';
IE5=NN4=NN6=false
if(document.all)IE5=true
else if(document.layers)NN4=true
else if(document.getElementById)NN6=true

function init() {
	showDiv(0);
}

function getTime() {
// initialize time-related variables with current time settings
var now = new Date()
var hour = now.getHours()
var minute = now.getMinutes()
now = null
var ampm = "" 

// validate hour values and set value of ampm
if (hour >= 12) {
hour -= 12
ampm = "PM"
} else
ampm = "AM"
hour = (hour == 0) ? 12 : hour

// add zero digit to a one digit minute
if (minute < 10)
minute = "0" + minute // do not parse this number!

// return time string
return hour + ":" + minute + " " + ampm
}

function leapYear(year) {
if (year % 4 == 0) // basic rule
return true // is leap year
/* else */ // else not needed when statement is "return"
return false // is not leap year
}

function getDays(month, year) {

// create array to hold number of days in each month
var ar = new Array(12)
ar[0] = 31 // January
ar[1] = (leapYear(year)) ? 29 : 28 // February
ar[2] = 31 // March
ar[3] = 30 // April
ar[4] = 31 // May
ar[5] = 30 // June
ar[6] = 31 // July
ar[7] = 31 // August
ar[8] = 30 // September
ar[9] = 31 // October
ar[10] = 30 // November
ar[11] = 31 // December

// return number of days in the specified month (parameter)
return ar[month]
}

function getMonthName(month) {
// create array to hold name of each month
var ar = new Array(12)
ar[0] = "Jan"
ar[1] = "Feb"
ar[2] = "Mar"
ar[3] = "Apr"
ar[4] = "May"
ar[5] = "Jun"
ar[6] = "Jul"
ar[7] = "Aug"
ar[8] = "Sep"
ar[9] = "Oct"
ar[10] = "Nov"
ar[11] = "Dec"

// return name of specified month (parameter)
return ar[month]
}



function showDiv( which ) {
	for(i=0;i<numdivs;i++) {
		if(NN4) eval("document.div"+i+".visibility='hidden'")
		if(IE5) eval("document.all.div"+i+".style.visibility='hidden'")
		if(NN6) eval("document.getElementById('div"+i+"').style.visibility='hidden'")
	}
	if(NN4) eval("document.div"+which+".visibility='visible'")
	if(IE5) eval("document.all.div"+which+".style.visibility='visible'")
	if(NN6) eval("document.getElementById('div"+which+"').style.visibility='visible'")
}

function getDateString(y_obj,m_obj,d_obj) {
	var y = y_obj.value;
	var m = m_obj.options[m_obj.selectedIndex].value;
	var d = d_obj.options[d_obj.selectedIndex].value;
	if (y=="") { return null; }
	if (m=="") { m=1; }
	if (d=="") { d=1; }
	return str= y+'-'+m+'-'+d;
	}

	


	function show(layerName) {
	document.getElementById(layerName).style.display = '';
	}

	function hide(layerName) {
	document.getElementById(layerName).style.display = 'none';
	}
	function show_next(tab_name) {
	document.getElementById(last_tab).className = 'tab';
	var curr = document.getElementById(tab_name);
	curr.className='tab_hover';
	hide(last_tab+'_data');

	if (tab_name=='tab1'){
	show(tab_name+'_data');
	hide('tab2'+'_data');
	hide('tab4'+'_data');
	}
	else if (tab_name=='tab2') {
	show('tab1'+'_data');
	show(tab_name+'_data');
	hide('tab4'+'_data');
	}
	else {
	show('tab1'+'_data');
	show('tab2'+'_data');
	show('tab4'+'_data');
	show(tab_name+'_data');
	hide('tab2'+'_data');
	}
	last_tab=tab_name;
	}


	function callMes(){
		if(document.getElementById("1").checked){
			show_next('tab2');
		}else if(document.getElementById("2").checked){
			show_next('tab1');
		}else if(document.getElementById("3").checked){
			show_next('tab3')
		}
	}

	function GetXmlHttpObject()
	{
				
	var xmlHttp=null;
		try
		  {
		 
		  xmlHttp=new XMLHttpRequest();
		  }
		catch (e)
		  {
		 
		  try
		    {
		    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		    }
		  catch (e)
		    {
		    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		    }
		  }
	return xmlHttp;
	}

function stateChanged31() 
	{ 
	
		if (xmlHttp.readyState==4)
		{ 
			 if (xmlHttp.status == 200) {

			document.getElementById("txtHint31").innerHTML=xmlHttp.responseText;
			document.getElementById('txtHint31').style.visibility = "visible";
			document.getElementById('myList31').focus();
			 xmlHTML=null;
			 }
		
		}
	}

function stateChanged21() 
	{ 
	
		if (xmlHttp.readyState==4)
		{ 
			 if (xmlHttp.status == 200) {

			document.getElementById("txtHint21").innerHTML=xmlHttp.responseText;
			 document.getElementById('txtHint21').style.visibility = "visible";
			 document.getElementById('myList21').focus();
			 xmlHTML=null;
			 }
		
		}
	}

function stateChanged1() 
	{ 
	
		if (xmlHttp.readyState==4)
		{ 
			 if (xmlHttp.status == 200) {


			 document.getElementById("txtHint1").innerHTML=xmlHttp.responseText;
			 document.getElementById('txtHint1').style.visibility = "visible";
			 document.getElementById('myList1').focus();
			 xmlHTML=null;
			 }
		
		}
	}




	function GetXmlHttpObject()
	{
				
	var xmlHttp=null;
		try
		  {
		 
		  xmlHttp=new XMLHttpRequest();
		  }
		catch (e)
		  {
		 
		  try
		    {
		    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		    }
		  catch (e)
		    {
		    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		    }
		  }
	return xmlHttp;
	}

	function stateChanged3() 
	{ 
		//alert("key1");
	
		if (xmlHttp.readyState==4)
		{ 
			
			
			 if (xmlHttp.status == 200) {

			document.getElementById("txtHint3").innerHTML=xmlHttp.responseText;
			 document.getElementById('txtHint3').style.visibility = "visible";
			 document.getElementById('myList33').focus();
			xmlHTML=null;
			 }
				
		}
	}

	function stateChanged2() 
	{ 
		
	
		if (xmlHttp.readyState==4)
		{ 
			
			
			 if (xmlHttp.status == 200) {

			document.getElementById("txtHint2").innerHTML=xmlHttp.responseText;
			 document.getElementById('txtHint2').style.visibility = "visible";
			 document.getElementById('myList22').focus();
			xmlHTML=null;
			 }
				
		}
	}

	function stateChanged() 
	{ 
		
	
		if (xmlHttp.readyState==4)
		{ 
			
			
			 if (xmlHttp.status == 200) {

			document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
			 document.getElementById('txtHint').style.visibility = "visible";
			document.getElementById('myList').focus();
			xmlHTML=null;
			 }
				
		}
	}




/////////////////////////////////////////////////////////////////////

function favBrowser22()
{
var mylist=document.getElementById("myList22");

document.getElementById("froCity2").value=mylist.options[mylist.selectedIndex].text;
}

function favBrowser33()
{
var mylist=document.getElementById("myList33");

document.getElementById("froCity3").value=mylist.options[mylist.selectedIndex].text;
}



function favBrowser21()
{
var mylist=document.getElementById("myList21");
document.getElementById("toCity2").value=mylist.options[mylist.selectedIndex].text;
//document.getElementById("rtoCity").value=mylist.options[mylist.selectedIndex].text;
}

function favBrowser31()
{
var mylist=document.getElementById("myList31");
document.getElementById("toCity3").value=mylist.options[mylist.selectedIndex].text;
//document.getElementById("rtoCity").value=mylist.options[mylist.selectedIndex].text;
}



 function HidePop()

      {

         document.getElementById('txtHint').style.visibility = "hidden";

      }
	  function HidePop1()

      {


         document.getElementById('txtHint1').style.visibility = "hidden";

      }
///////////////////////////////////////////////////////

  function HidePop2()

      {

         document.getElementById('txtHint2').style.visibility = "hidden";

      }
	  function HidePop21()

      {


         document.getElementById('txtHint21').style.visibility = "hidden";

      }


	function HidePop3()

      {

         document.getElementById('txtHint3').style.visibility = "hidden";

      }
	  function HidePop31()

      {


         document.getElementById('txtHint31').style.visibility = "hidden";

      }

function ddam(event,x)
{
  if (event.keyCode == 13)
                {
	document.getElementById(x).style.visibility='hidden';
	var news=x.substring(6);
	 document.getElementById('txtHint'+news).style.visibility = "hidden";
}
}

function dd()
{
document.getElementById('myList').style.visibility='hidden';
HidePop();
}

function dd1()
{
document.getElementById('myList1').style.visibility='hidden';
HidePop1();
}

function dd22()
{
document.getElementById('myList22').style.visibility='hidden';
HidePop2();
}

function dd33()
{
document.getElementById('myList33').style.visibility='hidden';
HidePop3();
}
function dd21()
{
document.getElementById('myList21').style.visibility='hidden';
HidePop21();
}
function dd31()
{
document.getElementById('myList31').style.visibility='hidden';
HidePop31();
}


var availableSelectList;
function newXMLHttpRequest() {
var xmlreq = false;

if (window.XMLHttpRequest) {
xmlreq = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e1) {
try {
xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlreq = false;
}
}
}
return xmlreq;
}
function getReadyStateHandler(req, responseXmlHandler) {
return function () {
if (req.readyState == 4) {
if (req.status == 200) {
responseXmlHandler(req.responseXML);
} else {
alert("HTTP error "+req.status+": "+req.statusText);
}
}
}
}
function showtext()
{
	
var s=document.globesterForm.froCity.value.length;
if(s==0)
	{
document.globesterForm.froCity.value="Enter City or Airport";
}else{
	document.globesterForm.rtFroCity.value=document.globesterForm.froCity.value;
}
}

function hidetext()
{


var s1 = document.globesterForm.froCity.value;
if(s1=="Enter City or Airport")
	{
document.globesterForm.froCity.value="";
	}
}


function showtext1()
{
var s=document.globesterForm.toCity.value.length;
if(s==0)
	{
document.globesterForm.toCity.value="Enter City or Airport";
}else{
document.globesterForm.rtoCity.value=document.globesterForm.toCity.value;
}
}

function hidetext1()
{
var s1 = document.globesterForm.toCity.value;
if(s1=="Enter City or Airport")
	{
	
document.globesterForm.toCity.value="";
	}
}

/////////////////////////////////////////////////////////////////////////
function showtext2()
{
	
var s=document.globesterForm.froCity2.value.length;
if(s==0)
	{
document.globesterForm.froCity2.value="Enter City or Airport";
}
}

function hidetext2()
{


var s1 = document.globesterForm.froCity2.value;
if(s1=="Enter City or Airport")
	{
document.globesterForm.froCity2.value="";
	}
}


function showtext21()
{
var s=document.globesterForm.toCity2.value.length;
if(s==0)
	{
document.globesterForm.toCity2.value="Enter City or Airport";
//}else{
//document.globesterForm.rtoCity2.value=document.globesterForm.toCity2.value;
}
}

function hidetext21()
{
var s1 = document.globesterForm.toCity2.value;
if(s1=="Enter City or Airport")
	{
	
document.globesterForm.toCity2.value="";
	}
}

/////////////////////////////////////////////////////////////////
function showtext3()
{
	
var s=document.globesterForm.froCity3.value.length;
if(s==0)
	{
document.globesterForm.froCity3.value="Enter City or Airport";
}
}

function hidetext3()
{


var s1 = document.globesterForm.froCity3.value;
if(s1=="Enter City or Airport")
	{
document.globesterForm.froCity3.value="";
	}
}


function showtext31()
{
var s=document.globesterForm.toCity3.value.length;
if(s==0)
	{
document.globesterForm.toCity3.value="Enter City or Airport";
//}else{
//document.globesterForm.rtoCity3.value=document.globesterForm.toCity3.value;
}
}

function hidetext31()
{
var s1 = document.globesterForm.toCity3.value;
if(s1=="Enter City or Airport")
	{
	
document.globesterForm.toCity3.value="";
	}
}

 function hideCoupon()
    {
     document.getElementById('adStrip').style.display = "none";
	 document.getElementById('dataCalenderbg').style.display = "";
      }
  
  function hideCalendar()
      {
         document.getElementById('dataCalenderbg').style.display = "none";
		  document.getElementById('adStrip').style.display = "";
		 
      }
  
function dayDiffe()
  {   
  date1 = new Date();
  date2 = new Date();
  diff  = new Date();

  date1temp = new Date(document.globesterForm.depDateRT.value);
        date1.setTime(date1temp.getTime());
        date2temp = new Date(date2);
        date2.setTime(date2temp.getTime());
        diff.setTime(date1.getTime() - date2.getTime());
        timediff = diff.getTime();
        dayDiff = Math.floor(timediff / (1000 * 60 * 60 * 24 ));
  return dayDiff;
}

function favBrowser()
{
var mylist=document.getElementById("myList");

document.getElementById("froCity").value=mylist.options[mylist.selectedIndex].text;
document.getElementById("rfroCity").value=mylist.options[mylist.selectedIndex].text;

dataCalender(document.getElementById("toCity").value);
var toCity=document.getElementById("toCity").value;
var froCity=document.getElementById("froCity").value;
if(froCity !="Enter City or Airport" && toCity !="Enter City or Airport")
{
hideCoupon();
}

}

function favBrowser1()
{

var mylist=document.getElementById("myList1");
document.getElementById("toCity").value=mylist.options[mylist.selectedIndex].text;
document.getElementById("toCity1").value=mylist.options[mylist.selectedIndex].text;
dataCalender(document.getElementById("toCity").value);
document.getElementById("rtoCity").value=mylist.options[mylist.selectedIndex].text;


search(document.getElementById("toCity").value);
var toCity=document.getElementById("toCity").value;
var froCity=document.getElementById("froCity").value;
if(toCity !="Enter City or Airport" && froCity !="Enter City or Airport" && froCity.length>3) 
{
hideCoupon();
}

}

function drawMy(firstDay) {
 
               var froCity=document.globesterForm.froCity.value;
               froCity=froCity.substring(froCity.indexOf("(")+1,froCity.indexOf(")"));

                var toCity=document.globesterForm.toCity.value;
               toCity=toCity.substring(toCity.indexOf("(")+1,toCity.indexOf(")"));
 

              var firstDay=firstDay.value;

              var test=document.globesterForm.simpleclassOW;
			  var countries=test.getElementsByTagName("cities")[0];
			  var country = countries.getElementsByTagName("city");
 			  var date = countries.getElementsByTagName("date");
			  var month = countries.getElementsByTagName("month");

     
              var now = new Date();

              var dates = now.getDate()

              var todaymonth =firstDay;

              var todayYear =now.getYear();
			  

              if (todayYear < 1000)

                        todayYear+=1900

      var months =parseInt(firstDay);

              var monthName = getMonthName(months)

      var lastDate = getDays(months, todayYear)

              var finalMont=parseInt(firstDay)

    

              var firstDayInstance = new Date(todayYear, finalMont, 1)

              var firstDayvalue = firstDayInstance.getDay()

                firstDayvalue=firstDayvalue+1;

              

              firstDayInstance = null

            

 

 // constant table settings

                        var headerHeight = 35 // height of the table's header cell

                        var width = 385 // solid height of table's border

                        var border = 1    // solid of table's border

                        var cellspacing = 0 // width of table's border

                        var headerColor = "midnightblue" // color of table's header

                        var bgcolor = "#f7f6f6" // color of table's header

                        var headerSize = "+3" // size of tables header font

                        var colWidth = 60 // width of columns in table

                        var dayCellHeight = 25 // height of cells containing days of the week

                        var dayColor = "#000000" // color of font representing week days

                        var cellHeight = 36 // height of cells representing dates in the calendar

                        var todayColor = "red" // color specifying today's date in the calendar

                        var timeColor = "purple" // color of font representing current time

        this.months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

                        var text = "" 

                        text += '<CENTER>'

                        text += '<TABLE WIDTH=' + width + ' CELLSPACING=' + cellspacing + ' BORDER=' + border + '>' // table settings

                        text += '<TH COLSPAN=7 HEIGHT=' + headerHeight + ' BGCOLOR='+ bgcolor +'>' // create table header cell
						text +='<div style="align:left; float:left; padding:5px 0 0 10px;">Lowest Fares : '+froCity+' to '+toCity+'</div>';

                        text += '<FONT COLOR="' + headerColor + '" SIZE=' + headerSize + '>' // set font for table header

                        text +='<div style="float:left; padding-left:15px;"><select class="month" name="month" onchange="drawMy(this);">';

       

                        for (var i=0;i<this.months.length;i++){
								 text += '<option value="' + i + '"' 

                          if (i == firstDay) text += ' selected';

                          text += '>' + this.months[i] +'  '+todayYear+'</option>';

                }

                        text += '</select></div>';

						text +='<div style="float:right; padding:0px 0 0 10px;"><a href="javascript:void(0);" onclick="javascript:hideCalendar()"; ><img src="/globester/images/close.png" border="0"></a></div>';
                        text += '</FONT>' // close table header's font settings
                        text += '</TH>' // close header cell

 						  

// variables to hold constant settings

                        var openCol = '<TD WIDTH=' + colWidth + ' HEIGHT=' + dayCellHeight + '>'

                        openCol += '<FONT COLOR="' + dayColor + '">'

                        var closeCol = '</FONT></TD>'

 

// create array of abbreviated day names

                        var weekDay = new Array(7)

                        weekDay[0] = "Sun"

                        weekDay[1] = "Mon"

                        weekDay[2] = "Tues"

                        weekDay[3] = "Wed"

                        weekDay[4] = "Thu"

                        weekDay[5] = "Fri"

                        weekDay[6] = "Sat"

 

     // create first row of table to set column width and specify week day

                        text += '<TR ALIGN="center" VALIGN="center"  bgcolor="#e6e5e5">'

                        for (var dayNum = 0; dayNum < 7; ++dayNum) {

                        text += openCol + weekDay[dayNum] + closeCol 

                        }

                        text += '</TR>'

 

                        var digit = 1

                        var curCell = 1

                        var myvalue=0;

     

                        for (var row = 1; row <= Math.ceil((lastDate + firstDayvalue - 1) / 7); ++row)

                                    {

                            text += '<TR ALIGN="right" VALIGN="top" bgcolor="#ffffff">'

                            

                                    for (var col = 1; col <= 7; ++col) {

                                      if (digit > lastDate)

                                        break

                                    

                                    if (curCell < firstDayvalue) {

                                        text += '<TD></TD>';

                                       curCell++

                                                } 

                        else {

                                    

                           for (var i = 0; i < country.length ; i++)

                                    {

                                    var monthValue = month[i].firstChild.nodeValue;

                                    

 

                                    if((digit==date[i].firstChild.nodeValue)&&((months+1)==monthValue))

                                    {

                                     text += '<TD HEIGHT=' + cellHeight + '><strong><font color="#000000">' + digit +'</font></strong><CENTER><a href="#">$ '+country[i].firstChild.nodeValue+ '+</a></CENTER></TD>'

             myvalue=digit;

                                     break

                                     }

                                    }

            if(digit!=myvalue)

                                    {

                                    text += '<TD HEIGHT=' + cellHeight + '><strong><font color="#000000">' + digit+'</font></strong></TD>'
                                    }
                            digit++
                          }
}

text += '</TR>'
}
text += '</TABLE>'
text += '</CENTER>'
text +='<div style="width:373px; _margin-bottom:17px; padding:5px; text-align:justify; border-bottom:1px solid #000039; border-left:1px solid #000039; border-right:1px solid #000039;"> <span style="font-weight:bold">Note:</span> Pricing calendar shows the lowest airfares for your search (searched on Globester in last few days). As airline prices & seat availability changes instantly, these prices may not be available now</div>';
document.getElementById("dataCalender").innerHTML=text;
}

function drawCal(firstDay) {
	
     var froCity=document.globesterForm.froCity.value;
   froCity=froCity.substring(froCity.indexOf("(")+1,froCity.indexOf(")"));
   var toCity=document.globesterForm.toCity.value;
   toCity=toCity.substring(toCity.indexOf("(")+1,toCity.indexOf(")"));
   
              var test=document.globesterForm.simpleclassOW;
			  var countries=test.getElementsByTagName("cities")[0];

              var country = countries.getElementsByTagName("city");

              var date = countries.getElementsByTagName("date");

              var month = countries.getElementsByTagName("month");
     var myValue=countries.getElementsByTagName("MyValue");
     var check=myValue[0].firstChild.nodeValue;
	  var depDate=document.globesterForm.depDateRT.value;
   
    if(check=="No")
     {
      document.getElementById('adStrip').style.display = "";
     document.getElementById('dataCalenderbg').style.display = "none";
     }
 

              var item = country[0].firstChild.nodeValue;

              var datevalue = date[0].firstChild.nodeValue;

             

              var now = new Date(depDate);

              var dates = now.getDate()
			  now.setDate(dates);
              var todaymonth = now.getMonth()+1;

              var todayYear =now.getYear();

              if (todayYear < 1000)

 

                   todayYear+=1900

      var months = now.getMonth();

              var monthName = getMonthName(months)

      var lastDate = getDays(months, todayYear)

            

 

      // constant table settings

                        var headerHeight = 35 // height of the table's header cell

                        var width = 385 // solid height of table's border

                        var border = 1    // solid of table's border

                        var cellspacing = 0 // width of table's border

                        var headerColor = "midnightblue" // color of table's header

                        var bgcolor = "#f7f6f6" // color of table's header

                        var headerSize = "+3" // size of tables header font

                        var colWidth = 60 // width of columns in table

                        var dayCellHeight = 25 // height of cells containing days of the week

                        var dayColor = "#000000" // color of font representing week days

                        var cellHeight = 36 // height of cells representing dates in the calendar

                        var todayColor = "red" // color specifying today's date in the calendar

                        var timeColor = "purple" // color of font representing current time

						
        this.months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

                        var text = "" 

                        text += '<CENTER>'

                        text += '<TABLE WIDTH=' + width + ' CELLSPACING=' + cellspacing + ' BORDER=' + border + '>' // table settings

                        text += '<TH COLSPAN=7 HEIGHT=' + headerHeight + ' BGCOLOR='+ bgcolor +' BORDER=' + border + '>' // create table header cell
						
						text +='<div style="align:left; float:left; padding:5px 0 0 10px;">Lowest Fares : '+froCity+' to '+toCity+'</div>';
						
                        text += '<FONT COLOR="' + headerColor + '" SIZE=' + headerSize + '>' // set font for table header
						
                        text +='<div style="float:left; padding-left:15px;"><select class="month" name="month" onchange="drawMy(this);">';
						

                        for (var i=0;i<this.months.length;i++){

                  		text += '<option value="' + i + '"' 

                          if (i == todaymonth-1) text += ' selected';

                          text += '>' + this.months[i] +'  '+todayYear+'</option>';

                }

                text += '</select></div>';
				
                        text += '</FONT>' // close table header's font settings
						text +='<div style="float:right; padding:0px 0 0 10px;"><a href="javascript:void(0);" onclick="javascript:hideCalendar()"; ><img src="/globester/images/close.png" border="0"></a></div>';
                        text += '</TH>' // close header cell

 

// variables to hold constant settings

                        var openCol = '<TD WIDTH=' + colWidth + ' HEIGHT=' + dayCellHeight + ' BORDER=' + border + '>'

                        openCol += '<FONT COLOR="' + dayColor + '">'

                        var closeCol = '</FONT></TD>'

 

// create array of abbreviated day names

                        var weekDay = new Array(7)

                        weekDay[0] = "Sun"

                        weekDay[1] = "Mon"

                        weekDay[2] = "Tue"

                        weekDay[3] = "Wed"

                        weekDay[4] = "Thu"

                        weekDay[5] = "Fri"

                        weekDay[6] = "Sat"

 

// create first row of table to set column width and specify week day

                        text += '<TR ALIGN="center" VALIGN="center" bgcolor="#e6e5e5">'

                        for (var dayNum = 0; dayNum < 7; ++dayNum) {

                        text += openCol + weekDay[dayNum] + closeCol 

                        }

                        text += '</TR>'

                        var digit = 1

                        var curCell = 1

                        var myvalue=0;

        for (var row = 1; row <= Math.ceil((lastDate + firstDay - 1) / 7); ++row)

                                    {

                        text += '<TR ALIGN="right" VALIGN="top" bgcolor="#ffffff">'

                        for (var col = 1; col <= 7; ++col) {

                                    if (digit > lastDate)

                                    break

                                    

                                    if (curCell < firstDay) {

                                        text += '<TD></TD>';

                                       curCell++

                                                } 

                                    else {

                                       for (var i = 0; i < country.length ; i++)

                                                {

                                                var monthValue = month[i].firstChild.nodeValue;

                                                

                                                if((digit==date[i].firstChild.nodeValue)&&(todaymonth==monthValue))

                                                {

                                                text += '<TD HEIGHT=' + cellHeight + '><strong><font color="#666666">' + digit +'</font></strong><CENTER><a href="#">$ '+country[i].firstChild.nodeValue+ '+</a></CENTER></TD>'

                                                myvalue=digit;

                                                break

                                                }

                                    }

            if(digit!=myvalue)

                                    {

                                    text += '<TD HEIGHT=' + cellHeight + '><strong><font color="#666666">' + digit+'</font></strong></TD>'

                                    }

                            digit++

                          

   }

}

text += '</TR>'

}

 

text += '</TABLE>'

text += '</CENTER>'
text +='<div style="width:373px; _margin-bottom:17px; padding:5px; text-align:justify; border-bottom:1px solid #000039; border-left:1px solid #000039; border-right:1px solid #000039;"> <span style="font-weight:bold">Note:</span> Pricing calendar shows the lowest airfares for your search (searched on Globester in last few days). As airline prices & seat availability changes instantly, these prices may not be available now</div>';


document.getElementById("dataCalender").innerHTML=text;

}

function updateme(cartXML)

{ 

    document.globesterForm.simpleclassOW=cartXML;

    var now = new Date()

    var year = now.getYear()

            if (year < 1000)

            year+=1900

            var month = now.getMonth();

            var monthName = getMonthName(month)

            

            var date = now.getDate()

            now = null

            var firstDayInstance = new Date(year, month, 1)

            var firstDay = firstDayInstance.getDay()

            firstDayInstance = null

            var days = getDays(month, year)

            drawCal(firstDay + 1)

}
function update(cartXML)
{
 var countries = cartXML.getElementsByTagName("cities")[0];
 var country = countries.getElementsByTagName("city");
 var item = country[0].firstChild.nodeValue;
 document.globesterForm.isShow=item;
}