/* Credits: http://www.alistapart.com/articles/dropdowns/ */

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;

function disableoptions()
{	
	var box1 = document.forms['bookingform'].destination;
	var number = box1.options[box1.selectedIndex].value;
	classname = "";	
	classname = "dest"+number;
	z=1;
	box2.options.length = 0;
	box2.options[0] = new Option ("", "0");		
	for(i=0; i<setofoptions.length; i+=3){
		if (setofoptions[i+2] == classname) {
			if (setofoptions[i+1] == selectedvalue) {		
				box2.options[z] = new Option (setofoptions[i], setofoptions[i+1], false, true);	
			} else {
				box2.options[z] = new Option (setofoptions[i], setofoptions[i+1], false, false);
			}	
		z++;						
		} 		
	}
	if (selectedvalue != box2.options[box2.selectedIndex].value) {
		box2.selectedIndex++;
	}	
}

function promotionalcode()
{
	var element = document.forms['bookingform'].heard;
	var selected = element.options[element.selectedIndex].value;
	if (selected == 1) {		
		document.getElementById("promotionalCode").style.display = "block";
	} else {
		document.getElementById("promotionalCode").style.display = "none";
	}
}

