 // function to close popup windows on body unload  
 var calWin;
 var mapWindow;
 function closePopup() {
   	if (calWin && calWin.open && !calWin.closed) calWin.close("cal"); //close calender
	if (mapWindow && mapWindow.open && !(mapWindow.closed)) mapWindow.close("Map"); // close piste map
 
}

function resetValues()
{
	if(isSearch)
	{
		setTimeout("resetList()",100);
	}
}
function resetList()
{
	var aList1 = document.frmSearch.activityType;
	var cList1 = document.getElementById("countryList1");
	if(aList1!=null && ""+aList1!="undefined" && cList1.options.length<2 && cList1.value=="")
	{
		aList1.value="";
		aList1.options[0].selected=true;
	}
}
function addChaletIntroText() {
	var introArea = document.getElementById('chaletIntroText');
	var p1 = document.createElement("p");
	var p2 = document.createElement("p");
	p1.innerHTML = "\"Whether you are travelling alone, with a partner or in a group, use our Chalet Search to discover which chalets are available for your ski holiday. Simply enter the number of passengers, departure date and where you would like to go for a selection of our suitable chalets.\"";
	p1.className="chaletSearchIntroText";
	p2.innerHTML = "";
	p2.className="chaletSearchIntroText";
	introArea.appendChild(p1);
	introArea.appendChild(p2);
}

