<!-- Standar image effects -->
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments;
	document.MM_sr=new Array;
	for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null) { 
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src;
			x.src=a[i+2];
		}
}
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) {
		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
	    	if (obj.style) { 
	    		obj=obj.style; 
		    	v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		    }
	    	obj.visibility=v;
	    }
	}
}
function MM_showHideLayersHiding() { //v6.0
	var i,p,v,obj,args=MM_showHideLayersHiding.arguments;
	for (i=0; i<(args.length-2); i+=3) {
		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
	    	if (obj.style) { 
	    		obj=obj.style; 
	    		if(v == 'show') {
	    			//v = 'visible';
	    			v = 'block';
	    			hideSelect();
	    		} else if(v == 'hide') {
	    			//v = 'hidden';
	    			v = 'none';
	    			unhideSelect();
	    		}
		    	//v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		    }
	    	//obj.visibility=v;
	    	obj.display=v;
	    }
	}
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
	var obj = MM_findObj(objName);
	if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
		if (theValue == true || theValue == false) eval("obj."+theProp+"="+theValue);
		else eval("obj."+theProp+"='"+theValue+"'");
	}
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
	if ((obj=MM_findObj(objName))!=null) with (obj)
		if (document.layers) {document.write(unescape(newText)); document.close();}
		else innerHTML = unescape(newText);
}

function popUpWindow(url,name) {
	newWindow = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=yes,resizable=yes,width=640,height=480');
}

function printPage() {
  if (window.print) {
	  setTimeout('window.print();',200);
  }
  else if (agt.indexOf("mac") != -1) {
	  alert("Press 'Cmd+p' on your keyboard to print article.");
  }
  else {
	  alert("Press 'Ctrl+p' on your keyboard to print article.")
  }
}
function blankDate(){
	document.placeFinder.month.options.selectedIndex=0;
	document.placeFinder.day.options.selectedIndex=0;
}

<!-- pop up code for home page -->
function newCookie(name,value,days) {
 var days = 1;   // the number at the left reflects the number of days for the cookie to last
                 // modify it according to your needs
 if (days) {
   var date = new Date();
   date.setTime(date.getTime()+(days*24*60*60*1000));
   var expires = "; expires="+date.toGMTString(); }
   else var expires = "";
   document.cookie = name+"="+value+expires+"; path=/";
}
/*function openMap(lat, lng, hotelName, hotelAddress){ //old
 	var win = window.open("/hotels/map?lat="+lat+"&lng="+lng+"&hotelName="+escape(hotelName)+"&hotelAddress="+escape(hotelAddress), "Map", "width=615,height=415,status=no,resizable=no,top=200,left=200");
 	win.focus();
}*/
function openMap(chainId,lat, lng, hotelName, hotelAddress){
 	var win = window.open("/hotels/map?chainId="+chainId+"&lat="+lat+"&lng="+lng+"&hotelName="+escape(hotelName)+"&hotelAddress="+escape(hotelAddress), "Map", "width=615,height=415,status=no,resizable=no,top=200,left=200");
 	win.focus();
}
function readCookie(name) {
   var nameSG = name + "=";
   var ca = document.cookie.split(';');
  for(var i=0; i<ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameSG) == 0) return c.substring(nameSG.length,c.length); }
    return null;
}

function eraseCookie(name) {
  newCookie(name,"",1);
}

function amt() {
  var num = readCookie('sancookie1')
  if (num < 1) { 
  newCookie('sancookie1','testcookie1');
  //SW=window.open('../action/newzealand','NewWin','toolbar=no,status=no,width=350,height=135,scrollbars')
  SW=window.open('../action/newzealand','NewZealand','toolbar=no,location=0,directories=0,status=0,scrollbars=no,resizable=yes,width=406,height=330');
  SW.moveTo(190,240); 
  }
}
function showHotelSearchTab() {
	MM_changeProp('mapSearchMain','','style.display','none');
	MM_changeProp('hotelSearchMain','','style.display','block');
	MM_swapImage('mapSearch','','../../images/map_search_off_en.gif',1);
	MM_swapImage('hotelSearch','','../../images/book_hotel_on_en.gif',1);
	MM_changeProp('mapSearchTab','','style.zIndex','1','DIV');
	MM_changeProp('hotelSearchTab','','style.zIndex','4','DIV');
}
function showMapSearchTab() {
	MM_changeProp('mapSearchMain','','style.display','block');
	MM_changeProp('hotelSearchMain','','style.display','none');
	MM_swapImage('mapSearch','','../../images/map_search_on_en.gif',1);
	MM_swapImage('hotelSearch','','../../images/book_hotel_off_en.gif',1);
	MM_changeProp('mapSearchTab','','style.zIndex','4','DIV');
	MM_changeProp('hotelSearchTab','','style.zIndex','1','DIV');
}
function showMiniMapSearchTab() {
	MM_changeProp('miniMapSearchMain','','style.display','block');
	MM_changeProp('bookWide','','style.display','none');
	MM_swapImage('mapSearch','','../../images/map_search_on_en.gif',1);
	MM_swapImage('hotelSearch','','../../images/book_hotel_off_en.gif',1);	
	MM_changeProp('mapSearchTab','','style.zIndex','4','DIV');
	MM_changeProp('hotelSearchTab','','style.zIndex','1','DIV');
}
function showMiniHotelSearchTab() {
	MM_changeProp('miniMapSearchMain','','style.display','none');
	MM_changeProp('bookWide','','style.display','block');
	MM_swapImage('mapSearch','','../../images/map_search_off_en.gif',1);
	MM_swapImage('hotelSearch','','../../images/book_hotel_on_en.gif',1);
	MM_changeProp('mapSearchTab','','style.zIndex','1','DIV');
	MM_changeProp('hotelSearchTab','','style.zIndex','4','DIV');
}
function showHideSpecialOffersList() {
	var obj, display, image;
	obj=document.getElementById('specialOffersList');
	if( obj != null ) {
		if( obj.style.display=='none' || obj.style.display=='' ) {	//expand
			display='block';
		} else if(obj.style.display=='block') {	//contract
			display='none';
		}
		MM_changeProp('specialOffersList','','style.display',display);
	}
}
function showHideLanguageSelector() {
	var obj, display, image;
	obj=document.getElementById('languageSelector');
	if( obj != null ) {
		if( obj.style.display=='none' || obj.style.display=='' ) {	//expand
			display='block';
			image='../../common/images/dropdown_arrow_up.gif';
		} else if(obj.style.display=='block') {	//contract
			display='none';
			image='../../common/images/dropdown_arrow_down.gif';
		}
		MM_swapImage('languageDropdown','',image,1);
		MM_changeProp('languageSelector','','style.display',display);
	}
}

function showHideTelephoneSelector() {
	var objen, objde, display, image;
	objen=document.getElementById('headerTelephoneSelector_en');
	objde=document.getElementById('headerTelephoneSelector_de');
	if( objen != null ) {
		if( objen.style.display=='none' || objen.style.display=='' ) {	//expand
			display='block';
			image='../../common/images/dropdown_arrow_up.gif';
		} else if(objen.style.display=='block') {	//contract
			display='none';
			image='../../common/images/dropdown_arrow_down.gif';
		}
		MM_swapImage('telephoneDropdown','',image,1);
		MM_changeProp('headerTelephoneSelector_en','','style.display',display);
	}
	if( objde != null ) {
		if( objde.style.display=='none' || objde.style.display=='' ) {	//expand
			display='block';
			image='../../common/images/dropdown_arrow_up.gif';
		} else if(objde.style.display=='block') {	//contract
			display='none';
			image='../../common/images/dropdown_arrow_down.gif';
		}
		MM_swapImage('telephoneDropdown','',image,1);
		MM_changeProp('headerTelephoneSelector_de','','style.display',display);
	}
}
function openCalendar(str_ctrl,str_month,str_day,str_form){
	var vWinCal = window.open("/hotels/calendar?ctrl="+str_ctrl+"&month="+str_month+"&day="+str_day+"&form="+str_form, "Calendar", "width=350,height=250,status=no,resizable=yes,top=200,left=200");
	vWinCal.focus();
}
function openCalendarssl(str_ctrl,str_month,str_day,str_form){
	var vWinCal = window.open("/hotels/calendarssl?ctrl="+str_ctrl+"&month="+str_month+"&day="+str_day+"&form="+str_form, "Calendar", "width=350,height=250,status=no,resizable=yes,top=200,left=200");
	vWinCal.focus();
}
function checkDates(ctrl, formName){
	//get the values of these dates so we can validate
	var myform = document.getElementById(formName);
	var ONE_DAY = 1000 * 60 * 60 * 24;
	var today = new Date();
	var arrivalDate = new Date(today.getFullYear(),myform.month.options.selectedIndex-1,myform.day.options.selectedIndex);
	var departDate = new Date(today.getFullYear(),myform.depart_month.options.selectedIndex-1,myform.depart_day.options.selectedIndex);
	if(myform.month.options.selectedIndex < today.getMonth()){
		arrivalDate.setFullYear(today.getFullYear()+1);
	}	
	if(myform.depart_month.options.selectedIndex < today.getMonth()){
		departDate.setFullYear(today.getFullYear()+1);
	}	
	if(ctrl == 'arrival'){
	   if (arrivalDate.getTime() >= departDate.getTime()){
	      departDate.setTime(arrivalDate.getTime()+ONE_DAY);			
	   }        
	}else if(ctrl == 'depart'){
	   if (departDate.getTime() <= arrivalDate.getTime()){
	      arrivalDate.setTime(departDate.getTime()-ONE_DAY);
	   }
	}
	myform.day.options.selectedIndex=eval(arrivalDate.getDate());
	myform.month.options.selectedIndex=eval(arrivalDate.getMonth()+1);
	myform.depart_day.options.selectedIndex=eval(departDate.getDate());
	myform.depart_month.options.selectedIndex=eval(departDate.getMonth()+1);
}
function validateDates(formName){
	//get the values of these dates so we can validate
	var myform = document.getElementById(formName);
	var today = new Date();
	var arrivalDate = new Date(today.getFullYear(),myform.month.options.selectedIndex-1,myform.day.options.selectedIndex);
	var departDate = new Date(today.getFullYear(),myform.depart_month.options.selectedIndex-1,myform.depart_day.options.selectedIndex);

	//if selected arrival date is earlier than the current date, add 1 year to the arrival date
	if (myform.month.options.selectedIndex < today.getMonth()){
	  arrivalDate.setFullYear(today.getFullYear()+1);
	}	
	//if selected departure date is earlier than the current month, add 1 year to the departure date
	if (myform.depart_month.options.selectedIndex < today.getMonth()){
	  departDate.setFullYear(today.getFullYear()+1);
	}
	if (arrivalDate.getTime() > departDate.getTime()){	
		return 1;
	}
	//if arrival departure booking is more than 51 weeks(357 days) in advance inform the
	//user this isn't possible to book
	//Call the weeks_between function
	var days_left = daysBetween(today, arrivalDate)
	if (days_left > 357){
		return 2;
	}
	
	// Call the weeks_between function
	days_left = daysBetween(today, departDate)
	if (days_left > 357){	
		return 5; 
	}
}
function daysBetween(date1, date2) {
    // The number of milliseconds in one day
    var ONE_DAY = 1000 * 60 * 60 * 24
    // Convert both dates to milliseconds
    var date1_ms = date1.getTime()
    var date2_ms = date2.getTime()
    // Calculate the difference in milliseconds
    var difference_ms = Math.abs(date1_ms - date2_ms)
    // Convert back to days and return
    return Math.round(difference_ms/ONE_DAY)
}
function mapit(url) {
	var win = window.open(url, "HotelMap", "width=620,height=550,screenX=" + (screen.availWidth/2 -(620/2)) + ",left=" + (screen.availWidth/2 -(620/2)) +",screenY=" + (screen.availHeight/2 - (500/2)) +",top=" + (screen.availHeight/2 - (500/2)) +",resizable=yes,scrollbars=yes,location=no");
	win.focus();
}
function openPicture(hotelName, hotelId) {
 	var win = window.open("/hotels/picture?hotelName="+hotelName+"&hotel="+hotelId+"&crs=true", "Picture", "width=650,height=500,resizable=yes,top=200,left=200,scrollbars=2");
 	win.focus();
}
function loadPhotos(hotelName, photourl, thumbnailurl, hotelId) {
 	var win = window.open("/hotels/picture?hotelName="+hotelName+'&photourl='+photourl+'&hotel='+hotelId+'&crs=true', "Picture", "width=650,height=500,resizable=yes,top=200,left=200,scrollbars=2");
 	win.focus();
}
function popSeal(url) {
  sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=550,height=500');
  self.name = "mainWin"; 
}
function showMainCountryTab() {
	MM_changeProp('mainCountryTabOn','','style.display','block');//makes the tab visible or invisible
	MM_changeProp('mainEuropeTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainWorldTabOn','','style.display','none');//makes the tab visible or invisible
	
	MM_changeProp('mainCountryTabOff','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainEuropeTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainWorldTabOff','','style.display','block');//brings the main div map forward/back
	
	MM_changeProp('mainCountryFrame','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainEuropeFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainWorldFrame','','style.display','none');//brings the main div map forward/back
}
function showMainEuropeTab() {
	MM_changeProp('mainCountryTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainEuropeTabOn','','style.display','block');//makes the tab visible or invisible
	MM_changeProp('mainWorldTabOn','','style.display','none');//makes the tab visible or invisible
	
	MM_changeProp('mainCountryTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainEuropeTabOff','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainWorldTabOff','','style.display','block');//brings the main div map forward/back
	
	MM_changeProp('mainCountryFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainEuropeFrame','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainWorldFrame','','style.display','none');//brings the main div map forward/back
}
function showMainWorldTab() {
	MM_changeProp('mainCountryTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainEuropeTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainWorldTabOn','','style.display','block');//makes the tab visible or invisible
	
	MM_changeProp('mainCountryTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainEuropeTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainWorldTabOff','','style.display','none');//brings the main div map forward/back
	
	MM_changeProp('mainCountryFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainEuropeFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainWorldFrame','','style.display','block');//brings the main div map forward/back
}
function showMainBookTab() {
	MM_changeProp('mainBookTabOn','','style.display','block');//makes the tab visible or invisible
	MM_changeProp('mainViewTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainCCTabOn','','style.display','none');//makes the tab visible or invisible
	
	MM_changeProp('mainBookTabOff','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainViewTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainCCTabOff','','style.display','block');//brings the main div map forward/back
	
	MM_changeProp('mainBookFrame','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainViewFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainCCFrame','','style.display','none');//brings the main div map forward/back
}
function showMainViewTab() {
	MM_changeProp('mainBookTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainViewTabOn','','style.display','block');//makes the tab visible or invisible
	MM_changeProp('mainCCTabOn','','style.display','none');//makes the tab visible or invisible
	
	MM_changeProp('mainBookTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainViewTabOff','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainCCTabOff','','style.display','block');//brings the main div map forward/back
	
	MM_changeProp('mainBookFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainViewFrame','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainCCFrame','','style.display','none');//brings the main div map forward/back
}
function showMainCCTab() {
	MM_changeProp('mainBookTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainViewTabOn','','style.display','none');//makes the tab visible or invisible
	MM_changeProp('mainCCTabOn','','style.display','block');//makes the tab visible or invisible
	
	MM_changeProp('mainBookTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainViewTabOff','','style.display','block');//brings the main div map forward/back
	MM_changeProp('mainCCTabOff','','style.display','none');//brings the main div map forward/back
	
	MM_changeProp('mainBookFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainViewFrame','','style.display','none');//brings the main div map forward/back
	MM_changeProp('mainCCFrame','','style.display','block');//brings the main div map forward/back
}
//used for the index and mini seach forms to 'hide' the specific drop boxes when the info div is open
function hideSelect(){
	for (j=0; j<document.forms.length; j++) {
		var theForm = document.forms[j];
		if (theForm.id=='placeFinder') {
			theForm.nchild.style.visibility = 'hidden';
			theForm.xbed.style.visibility = 'hidden';
		}
		//if (theForm.id=='miniPlaceFinder') {
			//theForm.srp.style.visibility = 'hidden';
			//theForm.nroom.style.visibility = 'hidden';
			//theForm.nadult.style.visibility = 'hidden';
			//theForm.nchild.style.visibility = 'hidden';
			//theForm.xbed.style.visibility = 'hidden';
		//}	
		if (theForm.id=='sortSelect') {
			theForm.sort.style.visibility = 'hidden';
		}
		//if (theForm.id=='availability') {
			//theForm.nroom.style.visibility = 'hidden';
			//theForm.nights.style.visibility = 'hidden';
		//}
	}
} 
//used for the index and mini seach forms to 'unhide' the drop boxes when the info div is closed
function unhideSelect(){
	for (j=0; j<document.forms.length; j++) {
		var theForm = document.forms[j]
		for(i=0; i<theForm.elements.length; i++){
			theForm.elements[i].style.visibility = 'visible';
		}
	}
}
function checkGoogle(searchMsg) {
	var google = document.getElementById('google');
	if( google.q.value == searchMsg ) {
		return false;
	}
	return true;
}
//-->