function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}



function MM_checkPlugin(plugin, theURL, altURL, IEGoesToURL) { //v2.0
  if ((navigator.plugins && navigator.plugins[plugin]) || //if NS, or
      (IEGoesToURL &&  //if flag set, and MSIE browser for Win95/NT (ActiveX)
       navigator.appName.indexOf('Microsoft') != -1 &&
       navigator.appVersion.indexOf('Mac') == -1 &&
       navigator.appVersion.indexOf('3.1') == -1)) {
    if (theURL.length>2) window.location = theURL;
  } else {
    if (altURL.length>2) window.location = altURL;
  }
  document.MM_returnValue = false;
}

function MM_goToURL() { //v1.0
  for (var i=0; i< (MM_goToURL.arguments.length - 1); i+=2) //with arg pairs
    eval(MM_goToURL.arguments[i]+".location='"+MM_goToURL.arguments[i+1]+"'");
  document.MM_returnValue = false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function gotoURL(dropDown) {
URL=dropDown.options[dropDown.selectedIndex].value
  if(URL.length>0)
	self.location.href=URL;
}

function CBcheck(form,checkbox)
{
  if(checkbox.checked == true) { form.submit() } else { alert("To select this quotation,  please confirm that you understand this fare may not be refundable.") }
}

function HotelRBcheck(form)
	{var i,test;
	if (document.form.HRID==null)
    {test=false}else if(document.form.HRID.length == null)
	{document.form.HRID.checked = true;test=true}
	else if(document.form.HRID.length>1){for (i=0; i<document.form.HRID.length; i++)
	{if (document.form.HRID[i].checked==true){test=true}}}
	if(test==true){	document.form.submit()}
	else if (test==false)	{alert("Sorry, there are no rooms available.\n       Please try a new search.")}
	else if (test==test){alert("Please select one of the rooms listed.")}}

function checkPassVisa(form)
{
  if ((form.Int.value==0) ||
      (   ((form.PC[0].checked==true) || (form.PC[1].checked==true) || (form.PC[2].checked==true))
       && ((form.VC[0].checked==true) || (form.VC[1].checked==true) || (form.VC[2].checked==true)) ))
       { form.submit() }
  else { alert("Please confirm you have the required Passports and Visa's to travel") }
}

function checkPassVisaSubmit(form)
{
  if ((form.Int.value==0) ||
      (   ((form.PC[0].checked==true) || (form.PC[1].checked==true) || (form.PC[2].checked==true))
       && ((form.VC[0].checked==true) || (form.VC[1].checked==true) || (form.VC[2].checked==true)) ))
       { return true; }
  else { alert("Please confirm you have the required Passports and Visa's to travel"); return false; }
}

function post(form) 
{ 
 if (form.state.value == "0")
 { form.submit(); form.state.value=1; } else
 { alert("Your request is currently being processed..  Please wait a moment"); }
}

function CheckForm(form) 
{ 
 if (form.state.value == "0")
 { form.state.value=1; return true; } else
 { alert("Your request is currently being processed..  Please wait a moment"); return false; }
}

