/*------------------------------------------------------------------*/
/*   Search Form Radio Buttons                                      */
/*------------------------------------------------------------------*/

function jumpcombined() {
  eval("window.location='" + document.getElementById("combined").value + "'");
}
function jumpflightonly() {
  eval("window.location='" + document.getElementById("flightonly").value + "'");
}
function jumphotelonly() {
  eval("window.location='" + document.getElementById("hotelonly").value + "'");
}
function jumpcruise() {
  eval("window.location='" + document.getElementById("cruise").value + "'");
}
function jumpski() {
  eval("window.location='" + document.getElementById("ski").value + "'");
}
function jumpcitybreaks() {
  eval("window.location='" + document.getElementById("citybreaks").value + "'");
}
function jumppackage() {
  eval("window.location='" + document.getElementById("package").value + "'");
}

/*------------------------------------------------------------------*/
/*   Rotating Image Script For Large Banner On Homepage             */
/*------------------------------------------------------------------*/

/* Script taken from http://www.leemessenger.co.uk - Please do not remove this line */
function ChangeCSSBgImg() {
	if (!document.getElementById) return false;
	
	var MyElement = "specialists" //The ID of the element you want to change
	var ImgPath = "/images/www.advantage4travel.com/" //The file path to your images
	
	if (!document.getElementById(MyElement)) return false;
	
	var random_images = new Array ();
	random_images[0] = "lrg-box-specialists-1.jpg";
	random_images[1] = "lrg-box-specialists-2.jpg";
	random_images[2] = "lrg-box-specialists-3.jpg";
	random_images[3] = "lrg-box-specialists-4.jpg";
	random_images[4] = "lrg-box-specialists-5.jpg";
	random_images[5] = "lrg-box-specialists-6.jpg";
	
	var $header = document.getElementById(MyElement);
	var $backgroundurl = $header.style.backgroundImage;
	var ImgURL = "url(" + ImgPath + random_images[rand(random_images.length)] + ")";
	
	if ($backgroundurl != ImgURL) {
		$header.style.backgroundImage = ImgURL;	
	}
	
	movement = setTimeout("ChangeCSSBgImg()",10000);
}

/* random number generator */
function rand(n) {
  return ( Math.floor ( Math.random ( ) * n ) );
}

/* Custom onload function */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
/* trigger onload */
addLoadEvent(ChangeCSSBgImg);

/*------------------------------------------------------------------*/
/*   Homepage small box button rollovers                            */
/*------------------------------------------------------------------*/

function mouseOver() {
	document.getElementById("sml-box-holidays-btn").src ="btn-more-holidays.gif";
}
function mouseOut() {
	document.getElementById("sml-box-holidays-btn").src ="roll-more-holidays.gif";
}

function mouseOver() {
	document.getElementById("sml-box-hotels-btn").src ="btn-more-hotels.gif";
}
function mouseOut() {
	document.getElementById("sml-box-hotels-btn").src ="roll-more-hotels.gif";
}

function mouseOver() {
	document.getElementById("sml-box-flights-btn").src ="btn-more-flights.gif";
}
function mouseOut() {
	document.getElementById("sml-box-flights-btn").src ="roll-more-flights.gif";
}

function mouseOver() {
	document.getElementById("sml-box-cruise-btn").src ="btn-more-cruise.gif";
}
function mouseOut() {
	document.getElementById("sml-box-cruise-btn").src ="roll-more-cruise.gif";
}

function mouseOver() {
	document.getElementById("sml-box-citybreaks-btn").src ="btn-more-citybreaks.gif";
}
function mouseOut() {
	document.getElementById("sml-box-citybreaks-btn").src ="roll-more-citybreaks.gif";
}
