// INDEX PAGE FASTBOOKING VS PEGASUS FIX

function hhotelJJWFormUpdateHotelnames(myForm){
	menuNum = myForm.HotelList.selectedIndex;
	if (menuNum == null){
		return;
	}
	var newref = myForm.HotelList.options[menuNum].value;
	myForm.Hotelnames.value = newref;

	// reset list of regions
	myForm.region.length = 0;
	myForm.region.options[0] = new Option('', '');
	myForm.region.length = 0;

	if (newref == "All") {
		lst = 0;
		myForm.region.options[lst++] = new Option('Region / City', '');
		myForm.region.options[lst++] = new Option('Almancil');
		myForm.region.options[lst++] = new Option('Beaune - Dijon');
		myForm.region.options[lst++] = new Option('Bordeaux');
		myForm.region.options[lst++] = new Option('Cote d Azur - French Riviera');
		myForm.region.options[lst++] = new Option('Dreux');
		myForm.region.options[lst++] = new Option('Evian - Geneve');
		myForm.region.options[lst++] = new Option('Lille');
		myForm.region.options[lst++] = new Option('Lyon');
		myForm.region.options[lst++] = new Option('Marseille');
		myForm.region.options[lst++] = new Option('Montpellier');
		myForm.region.options[lst++] = new Option('Nantes');
		myForm.region.options[lst++] = new Option('Paris');
		myForm.region.options[lst++] = new Option('Reims');
		myForm.region.options[lst++] = new Option('Rennes');
		myForm.region.options[lst++] = new Option('Rouen');
		myForm.region.options[lst++] = new Option('Tours');
		myForm.region.options[lst++] = new Option('Vienna');
	}
}

var nbm = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];

function hhotelJJWDispoprice(myForm){
	if(document.idForm.fromday.selectedIndex > nbm[document.idForm.frommonth.selectedIndex] - 1){
		document.idForm.fromday.selectedIndex = nbm[document.idForm.frommonth.selectedIndex] - 1;
	}
	
	var newref = myForm.Hotelnames.value;
	var newrefHot = myForm.HotelList.value;
	//alert("newref="+newref)
	myForm.method = "GET";
	
	pageFrom = location.href;
	//urchinTracker('/fastbooking/link/'+pageFrom+'/02');

	if (newref.substring(0, 7) == "http://") {
		//window.open(newref,"dispoprice");
		window.location = newref;
	} else if (newrefHot == 'All'){
		myForm.target = "dispoprice";
		hhotelFormValidation(myForm, 0);
	} else {
	  	hhotelFormUpdateHotelnames(myForm)
		myForm.target = "dispoprice";
		hhotelFormValidation(myForm, 0);
	}
	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  width = 800;
  height = 800;
  window.moveTo((screen.availWidth/2)-(width/2), (screen.availHeight/2)-(height/2));
  window.open(theURL,winName,features);
}


// =======================================================================
///// JUMP MENU - START
///// Used in the hotel dropdown
// =======================================================================

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//

function jumpto(x){
	if (document.form1.jumpmenu.value != "null") {
		document.location.href = x
	}
}



// =======================================================================
///// Footer Icon Fucntions
// =======================================================================

function printPage() {
	window.print();
}

function bookmarkPage(title, url){
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(url,title);
	} else if (navigator.appName == "Netscape") {
		window.sidebar.addPanel(title,url,"");
	} else {
		alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	}
}