<!-- bookmark the page -->
function bookmark(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}
<!-- Standard iamge 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 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 swapPhoto(image) {
   document['largePhoto'].src = "../images/hotels/" + image;
   //document['largePhoto'].src = image;
   return;
}
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 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 mapit(url)
{
 window.open(url, "HotelMap", "width=620,height=500,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=no,location=no");
}

function sendP(){
	document.poi.submit();
}

function changeCheckOut() {
   if ((document.placeFinder.depart_month.selectedIndex == 0) ||
      (document.datesform.depart_month.selectedIndex < document.datesform.month.selectedIndex) ||
      ((document.datesform.depart_month.selectedIndex == document.datesform.month.selectedIndex) &&
      (document.datesform.depart_day.selectedIndex <= document.datesform.day.selectedIndex))) {
      
      if(document.datesform.month.selectedIndex != 0) {
         if (document.datesform.day.selectedIndex > 29 ) {
	    document.datesform.depart_day.selectedIndex = 1;
	    document.datesform.depart_month.selectedIndex = document.datesform.month.selectedIndex + 1;
	 }
	 else if ((document.datesform.month.selectedIndex == 29 ) &&
	    ((document.datesform.month.selectedIndex == 4) ||
	    (document.datesform.month.selectedIndex == 6)  ||
	    (document.datesform.month.selectedIndex == 9) ||
	    (document.datesform.month.selectedIndex == 11))) {
	       document.datesform.depart_day.selectedIndex = 1;
	       document.datesform.depart_month.selectedIndex = document.datesform.month.selectedIndex + 1;
	 }
	 else {
	    document.datesform.depart_day.selectedIndex = document.datesform.day.selectedIndex + 1;
	    document.datesform.depart_month.selectedIndex = document.datesform.month.selectedIndex;
	 }
      }
   }
}
function openSrpInfo(lang){
	window.open('http://reservation.choicehotels.no/hotels/srpinfo?language='+lang,'Programs','height=400,width=500,scrollbars=yes,resizable=no,status=no,screenX=100,screenY=200,top=200,left=100')
}
function openOffers(url){
	window.open(url,'Offers','height=800,width=820,scrollbars=yes,resizable=yes,status=no,screenX=100,screenY=200,top=200,left=100')
}

function changeCheckOut(form){
	m = document.getElementById('month').selectedIndex;	
	dm = document.getElementById('depart_month').selectedIndex;
	d = document.getElementById('day').selectedIndex;
	dd = document.getElementById('depart_day').selectedIndex;	
	//if the depart date is default or before arrival date
	//need to change it
	if (dm == 0 || dm < m || dm == m && dd <= d){
		if (m != 0){
			//need to check the day .. may need to go to next month
			if (d == 28 && (m==4 || m==6 || m==9 || m==11)){
				document.getElementById('depart_day').selectedIndex=1;
				if (m ==12){
					document.getElementById('depart_month').selectedIndex = 1;
				} else {
					document.getElementById('depart_month').selectedIndex = m + 1;
				}
			} else if (d > 29){
				document.getElementById('depart_day').selectedIndex=1;
				if (m ==12){
					document.getElementById('depart_month').selectedIndex = 1;
				} else {
					document.getElementById('depart_month').selectedIndex = m + 1;
				}
			} else {
				document.getElementById('depart_day').selectedIndex = d + 1;
				document.getElementById('depart_month').selectedIndex = m;
			}
		}
		
	}
}
function lite(element){
	element.style.backgroundColor ='FE0000';
}
function unlite(element){
	element.style.backgroundColor ='ffcc00';
}	
//-->

