function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

function setOptionSelected(mySelectId, myOption)
{
	var myOptions = document.getElementById(mySelectId).getElementsByTagName("option");

	for (var i = 0; i < myOptions.length; i++)
	{
		if ((myOptions[i].getAttribute("selected") == "selected") && (myOptions[i].getAttribute("value") != myOption))
		{
			myOptions[i].removeAttribute("selected");
		}
		else if (myOptions[i].getAttribute("value") == myOption)
		{
			myOptions[i].setAttribute("selected", "selected");
		}
	}
}

addLoadEvent(function () {setOptionSelected("destination", "1159")});

function TeaserRouter(){
  var hotelid = document.getElementById("destination").value;
  if (hotelid === "none")
  { 
	alert("Please Select A Hotel"); 
	return false; 
  }
  else 
  {
	var myformaction = "https://www.reservations-page.com/c00245/h0" + hotelid + "/be.ashx"
	document.getElementById("dezerteaser").setAttribute("action",myformaction);
	return true;
  }
}