var destinationMenuId  = 'destinationsMenu';
var destinationInputId = 'txtDestinationNameId';
var cityInputId = 'txtLocationNameId';

function showDestinationsMenu(element)
{
    var divObject = document.getElementById( destinationMenuId );
    divObject.style.display  = 'block';
    divObject.style.position = 'absolute';
    
  //  divObject.style.left     = (findPosX(element)+ 210) + 'px'; 
   // divObject.style.top      = (findPosY(element)- 200) + 'px';    
}

function hideDestinations() {
    if (document.getElementById("IMAGESLIDE") != null) { document.getElementById("IMAGESLIDE").style.visibility = 'visible';}
    if (document.getElementById("_ctl1_ddlDepartureAirport") != null) {document.getElementById("_ctl1_ddlDepartureAirport").style.visibility = 'visible';}
    document.getElementById( destinationMenuId ).style.display  = 'none';
    
    //
	//	Turn on all 'drop downs' if not visible
	//
	// works for IE ONLY
	//*********************************
	var objectid;
	var ix;
	if (document.all) {
		for(ix=0; ix <document.all.length; ix++) {
			objectid = document.all[ix].id;
			if (objectid.indexOf("cmb") > 0) {
				document.all[ix].style.visibility = 'visible';
	
			}
		}
	}
}

function setDestination( destVal ) {

   
    if (document.getElementById( txtDestinationNameId ) != null){
        document.getElementById( txtLocationNameId ).style.visibility='hidden';
        document.getElementById( txtLocationNameId ).value = '';
        document.getElementById( txtDestinationNameId ).value = destVal;
    }
    hideDestinations();
}

function setGroupDestination( groupVal ) {
    location.href='http://lastminute.easymarketcrs.it/vacation/result.aspx?groupId='+groupVal;
}

function setDestinationCity( destVal, cityVal ) {
   

    if(document.getElementById( txtDestinationNameId ) != null){
	    document.getElementById( txtLocationNameId ).style.visibility='visible';
        document.getElementById( txtDestinationNameId ).value = destVal;
	    document.getElementById( txtLocationNameId ).value = cityVal;
     
    }
    
    hideDestinations();
}