
function regUrlCall(regUrl) {
    if(regUrl!=''){
       new Ajax.Request(regUrl, { method:'get' });
    }
}

//Script for the TT HotelInfoBox
function  openWin(regUrl, popupUrl)
{
// theName: Name den das PopUp erhalten soll. Sollte beim Aufruf von 2 Infoboxen
// jeweils anders lauten.
        // theParameter: Parameter zum Aufruf der Hotel-Infobox
        regUrlCall(regUrl);
        theFeatures='toolbar=0,status=0,menubar=0';
        theFeatures +=',scrollbars=1,resizable=0,copyhistory=1';
        theFeatures +=',Height=650,Width=790';

        window.open(popupUrl,'Info',theFeatures);
}

function registerToLastVisited(regUrl) {
	regUrlCall(regUrl);
}

/* Toggles the height of the extended searchForm for package/hotel*/
function toggleFormHeight() {
  if($('hotelRatings')) {
    if($('childAgeContainer').style.display != "none") {
    	if($("linkGenerator") == undefined){
	      $("searchContainer").style.height = "800px";
	      $("searchContainerBG").style.height = "850px";
	    }
    }
    else {
    	if($("linkGenerator") == undefined){
	      $("searchContainer").style.height = "740px";
	      $("searchContainerBG").style.height = "790px";
	    }
    }
    
  }
}

/* 
  Hides extended search form borders, when used in DW-context, such as "Luxusurlaub".
*/
function hideBorders(externalContainer){
  if($(externalContainer)){
    var theHeader = $("searchHeaderPic").src;
    
    theHeader = theHeader.replace(/newSearchHeader/, "searchFormHeader");
    $("searchHeaderPic").src = theHeader;
    $("searchFormBottom").style.display = "none";
    $("searchFormTop").style.display = "none";
    $("searchContainerBG").style.backgroundImage = "none";
    $("searchContainerBG").style.paddingLeft= "0px";
  }
}
