function setContainerHeight()
{
	     var maxheight="";
          var leftpanelheight = document.getElementById("leftpanel").offsetHeight;
          var midpanelheight = document.getElementById("rightpanel").offsetHeight;
          var rightpanelheight = document.getElementById("innerhome-mid-bloc").offsetHeight;

					
          if(leftpanelheight>=midpanelheight && leftpanelheight>=rightpanelheight){maxheight = leftpanelheight;}
          else if(midpanelheight>=leftpanelheight && midpanelheight>=rightpanelheight){maxheight = midpanelheight;}
          else
          {
		      maxheight = rightpanelheight;
		      document.getElementById("leftpanel").style.height = maxheight+"px";
	        document.getElementById("rightpanel").style.height =  maxheight+"px";
          document.getElementById("innerhome-mid-bloc").style.height = maxheight+77+"px";
          }

		 if(maxheight!= rightpanelheight)
          {
             document.getElementById("leftpanel").style.height = maxheight+"px";
             document.getElementById("rightpanel").style.height =  maxheight+"px";
             document.getElementById("innerhome-mid-bloc").style.height = maxheight+77+"px";
		  }
}

function goToURL(url){
newWin = window.open(url,'_self');
}

function openViriSignPopup(){
myWindow = window.open('http://www.verisign.com/ssl/index.html?sl=t31290225400000002&gclid=CM7q9J_wrYsCFQmJTAodG1sROg','myWindow','menubar=no,width=800,height=700,toolbar=no,directories=no,resizable=no,scrollbars=no,location=no,status=yes');
}

function redirectURL(){
self.location.href="http://www.makemytrip.com/flights/";
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
  	var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
        	curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y){curtop += obj.y;}
    return curtop;
  }
  
  function findHeight(obj)
  {
  	var currntheight =0;
  	if(obj.offsetHeight)
  			currntheight+=obj.offsetHeight;
		return currntheight;  			
	}

 function setTopPos(obj,setpix)
 {
 	if(obj)
 		obj.style.marginTop= setpix-280+"px";		
 }
 
function setTitlePos()
{
	var titleObj=document.getElementById("middle-box");
	var titlecurrentTop = findPosY(titleObj);
	if(titleObj.offsetHeight)
	{
		var titlecurrentHeight= titleObj.offsetHeight;
	}	
	var exactPos=titlecurrentTop+titlecurrentHeight+"px";
	
	if(document.getElementById("block7"))
	{
		document.getElementById("block7").style.top=exactPos;
	}
	
	if(document.getElementById("block-fcca"))	
	{
		document.getElementById("block-fcca").style.top=exactPos;
	}
	
	if(document.getElementById("block-fcc"))
	{
		document.getElementById("block-fcc").style.top=exactPos;
	}	
}



/* GOOGLE Map Code */
var geocoder, location1, location2;
function initialize() {	geocoder = new GClientGeocoder();}

function showLocation(getfromCity,gettoCity) {
	var fromCity = getfromCity;
	var toCity = gettoCity;

	alert(fromCity+"--"+toCity);
	geocoder.getLocations(fromCity, function (response) {
		if (!response || response.Status.code != 200){alert("Sorry, we were unable to geocode the first address");}
		else
		{
			location1 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};
			geocoder.getLocations(toCity, function (response) {
				if (!response || response.Status.code != 200)
				{
					alert("Sorry, we were unable to geocode the second address");
				}
				else
				{
					location2 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};
					showMap();
				}
			});
		}
	});
}

function showMap(){
 var map = new GMap2(document.getElementById("map_area"));
map.setCenter(new GLatLng((location1.lat+location2.lat)/2, (location1.lon+location2.lon)/2), 2);

// Create GPolylineOptions argument as an object literal.
// Note that we don't use a constructor.

var polyOptions = {geodesic:true};
var polyline = new GPolyline([
  new GLatLng(location1.lat, location1.lon),
  new GLatLng(location2.lat, location2.lon)
  ], "#033", 4, 1, polyOptions);
  map.addOverlay(polyline);
}
/* GOOGLE Map Code */


/* GOOGLE City Map */
    var map = null;
    var geocoder = null;

    function initializeCityMap() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("city_map"));
        geocoder = new GClientGeocoder();
      }
    }

    function showCityMap(address) {
		
     if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
/* GOOGLE City Map */




function headerCall(){
	document.write('<table border="0" width="100%" cellspacing="0" cellpadding="0" class="topbg"><tr><td align="left" height="100" valign="top" width="255"><div id="header"><div id="cat"><a href="http://us.makemytrip.com/"> <img alt="MakeMyTrip India Travel Specialist" src="http://us.makemytrip.com/images/mmt-logo.gif" border="0" height="78" width="196"></a> </div>      </div></td>    <td align="left" height="100" valign="top" width="733"><div id="header"><span class="register" style="padding-right:20px;"> <a href="http://www.makemytrip.com"> <img src="http://us.makemytrip.com/international/img/us/26x16-indiaflag-footer.jpg" border="0" style="text-decoration: none" />India site</a></span><br><br><img src="http://us.makemytrip.com/images/tollfree2.gif" border="0" height="31" width="222"><br><span><a href="https://hc2.humanclick.com/hc/24449606/?cmd=file&file=visitorWantsToChat&site=24449606&byhref=1" target="_blank"> <img src="http://us.makemytrip.com/images/chat.gif" border="0"></a> </span> <img alt="" src="http://us.makemytrip.com/images/seperator.gif" height="16" width="7"> <span><a href="http://us.makemytrip.com/packages/wkform-email.jsp"> <img src="http://us.makemytrip.com/images/email.gif" align="bottom" border="0"></a> </span> </div></td>  </tr>  <tr>    <td colspan="2"><div style="padding-left: 82px;"><img src="http://us.makemytrip.com/images/select.gif" align="absbottom"></div>      <div id="menu" style="height:15px;"> <span class="mtext"><a class="linktop" href="http://us.makemytrip.com">Home</a></span> <span class="mtext"><a class="linktop" href="http://us.makemytrip.com/international/jsp/international-flights/flight_landing.jsp">Flights</a></span> <span class="mtext"><a class="linktop" href="http://www.makemytrip.com/hotels/">Hotels</a></span> <span class="mtextsel"> <span class="linktop" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, \'anylinkmenu1\')" style="cursor:pointer;">Holidays</span>        <div id="anylinkmenu1" class="anylinkcss"> <a href="http://us.makemytrip.com/india-holidays">Holidays in India</a> <a href="http://us.makemytrip.com/international-holidays">Holidays outside India</a> </div>        </span> <span class="mtext"><a class="linktop" href="http://us.makemytrip.com/destination/destination.htm">Destination Guide</a></span> <span class="mtextsel"><a href="http://us.makemytrip.com/corporate/home.html" class="linktop">Corporate Travel</a></span><span class="mtext" style="margin-left:200px"><a class="linktop" href="#" onClick="javascript:overlayopen(\'http://us.makemytrip.com/international/getDetails.jsp?inOverlay=true&width=520&height=290&frame=yes\',\'overlaycontents\',\'blackoverlay\');"><span class="hotspot1" onmouseover="tooltip.show(\'Now view/ print your air E-Ticket instantly! Simply enter your contact number and MakeMyTrip Booking ID. It&amp;apos;s that easy.\');" onmouseout="tooltip.hide();">View / Print your E-Ticket</span></a></span></div></td></tr></table><div style="height:7px; overflow:hidden;"></div>');
}


function footerCall()
{
	document.write('<table cellspacing="0" cellpadding="0" border="0" align="center" width="969" class="tab" style="background: #fff url(http://us.makemytrip.com/international/img/us/footer-bg.gif) repeat-x;"><tbody><tr><td valign="top" class="footer-styleblack"><div id="footer"><span><a href="http://us.makemytrip.com" class="linkfoot">Travel to India</a> | </span> <span><a class="linkfoot" href="http://www.makemytrip.com/hotels/"/></span> <span><a href="http://us.makemytrip.com/international/jsp/international-flights/flight_landing.jsp" class="linkfoot">Flights to India</a> | </span> <span><a href="http://www.makemytrip.com/hotels/" class="linkfoot">Hotels in India</a> | </span> <span><a href="http://us.makemytrip.com/india-holidays" class="linkfoot">India Vacation Packages</a> | </span> <span><a href="http://us.makemytrip.com/international-holidays" class="linkfoot">International Travel</a> | </span> <span><a class="linkfoot" href="http://us.makemytrip.com/destination/destination.htm"/></span> <span><a href="http://us.makemytrip.com/destination/destination.htm" class="linkfoot">Travel Destinations</a> </span> <br/><br/>            <span><a href="http://us.makemytrip.com/india-holidays/rajasthan-travel-packages.html" class="linkfoot2">Rajasthan Tours</a> | </span> <span><a href="http://us.makemytrip.com/india-holidays/kerala-travel-packages.html" class="linkfoot2">Kerala Travel Packages</a> | </span> <span><a href="http://us.makemytrip.com/india-holidays/goa-travel-packages.html" class="linkfoot2">Goa Beach Packages</a> | </span> <span><a href="http://us.makemytrip.com/india-holidays/golden_triangle-travel-packages.html" class="linkfoot2">Golden Triangle</a> | </span> <span><a href="http://us.makemytrip.com/airlines-to-india/air-india.jsp" class="linkfoot2">Air India</a> | </span> <span><a href="http://us.makemytrip.com/airlines-to-india/airlines.jsp" class="linkfoot2">Cheap Flights to India</a> | </span> <span><a href="http://us.makemytrip.com/airlines-to-india/jet-airways.jsp" class="linkfoot2">Jet Airways </a></span> <br/>            <span><a href="http://us.makemytrip.com/packages/holidays_in_india.htm" class="linkfoot2">Holidays in India</a> | </span> <span><a class="linkfoot2" href="http://us.makemytrip.com/corporatemicrosite/air-fares-india-usa.asp"/></span> <span><a href="http://us.makemytrip.com/packages/US-MMT-In-India/search-to-Pilgrimage.cms" class="linkfoot2">Pilgrimage in India</a> | </span> <span><a href="http://us.makemytrip.com/corporatemicrosite/air-fares-india-usa.jsp" class="linkfoot2">Corporate Travel</a> | </span> <span><a class="linkfoot2" href="http://us.makemytrip.com/airindia.asp"/></span> <span><a href="http://us.makemytrip.com/various/pay_security.htm" class="linkfoot2">Payment Security</a> | </span> <span><a href="http://us.makemytrip.com/travelbag/forex.htm " class="linkfoot2">Foreign Exchange</a> |</span> <span><a href="http://us.makemytrip.com/travelbag/passport.htm" class="linkfoot2">Indian Passport</a> | </span> <span><a href="http://us.makemytrip.com/traveltips/visa.htm" class="linkfoot2">Indian Visa </a> </span> <span>| </span> <span><a href="http://us.makemytrip.com/traveltips/default.htm" class="linkfoot2">Travel Tips India</a> | </span> <span><a href="http://us.makemytrip.com/various/Online-Travel-Company-India.htm" class="linkfoot2">About Us</a> </span> <br/><span><a href="http://us.makemytrip.com/international/packages/wkform-email.jsp" class="linkfoot2">Contact Us</a> | </span> <span><a href="http://us.makemytrip.com/various/faq_main.htm" class="linkfoot2">FAQ\'s</a></span> <span>| <a href="http://us.makemytrip.com/various/affiliate_programme.htm" class="linkfoot2">Travel Affiliate Program</a> | </span> <span><a href="http://us.makemytrip.com/various/search.htm" class="linkfoot2">Travel Sites</a> | </span> <span><a href="http://us.makemytrip.com/various/sitemap.htm" class="linkfoot2">Sitemap</a> | </span> <span><a href="http://us.makemytrip.com/various/flight-sitemap.htm" class="linkfoot2">Flight Sitemap</a> | </span> <span><a href="http://us.makemytrip.com/various/disclaimer.htm" class="linkfoot2">Disclaimer</a> | </span> <span><a href=" http://us.makemytrip.com/various/privacy-policy.htm" class="linkfoot2">Privacy Policy</a></span> | </span> <span><a href=" http://us.makemytrip.com/india-holidays/sitemap.html" class="linkfoot2">Holidays Sitemap</a> | </span><span><a class="linkfoot2" href="http://us.makemytrip.com/cwg2010/commonwealth-games-delhi.html">CommonWealth Games 2010</a></span><br/>            <br/>            <span class="footer">&copy; MakeMyTrip.com Your India travel specialist. Book             online flight tickets, airlines, hotels, travel and tour packages to India</span> <br/><br/><br/><table cellspacing="0" cellpadding="0" border="0" width="100%">              <tbody><tr>                  <td align="right" width="80%" rowspan="2"><img align="baseline" alt="IAAI, IATA, ASTA, IOTA, Ministry of Tourism India, MakeMyTrip.com" src="http://us.makemytrip.com/images/mmt_footer_new.gif"/></td>                  <td height="20" align="left" valign="bottom" style="color: rgb(0, 0, 0);" class="linkfoot2">International site</td>                </tr>                <tr>                  <td align="left" valign="top" style="padding-top: 7px;"><a onclick="javascript:writePersistentCookie(\'Location\',\'India\',\'days\',30);javascript:writePersistentCookie(\'div\',\'no\',\'days\',30);" href="http://www.makemytrip.com/?usrfrm=US"><img height="16" border="0" width="26" src="http://us.makemytrip.com/images/26x16-indiaflag-footer.jpg"/></a> <a onclick="javascript:writePersistentCookie(\'Location\',\'India\',\'days\',30);javascript:writePersistentCookie(\'div\',\'no\',\'days\',30);" href="http://www.makemytrip.com/?usrfrm=US" class="linkfoot2" style="text-decoration: none;">India</a></td></tr> </tbody></table></div></td></tr></tbody></table></div>');
}



