	var mygallery=new fadeSlideShow({
		wrapperid: "fadebanner", //ID of blank DIV on page to house Slideshow
		dimensions: [750, 225], //width/height of gallery in pixels. Should reflect dimensions of largest image
		imagearray: [
			["images/fadebanner/taka.jpg", "", "", ""],
			["images/fadebanner/cod_light.jpg", "", "", ""],
			["images/fadebanner/sharkfeed.jpg", "", "", ""],
			["images/fadebanner/greenturtle.jpg", "", "", ""],
			["images/fadebanner/sharkfeed_cam.jpg", "../5day_coralsea.html", "", "Up close and personal during a shark feed"],
			["images/fadebanner/cod2.jpg", "", "", ""],
			["images/fadebanner/divers.jpg", "", "", ""], //img, url, target, desc
			["images/fadebanner/cod.jpg", "../4day_codhole.html", "", "Cod Feed at the Cod Hole- Close encounters with the Famous Potato Cod!"]//<--no trailing comma after very last image element!
		],
		displaymode: {type:'auto', pause:5000, cycles:0, wraparound:false},
		persist: false, //remember last viewed slide and recall within same session?
		fadeduration: 1000, //transition duration (milliseconds)
		descreveal: "ondemand",
		togglerid: ""
	})

window.onload=function(){
	Nifty("div.red_bar","big");
	Nifty("div.blue_bar","big");
	Nifty("div.green_bar","big");
}

function goToByScroll(id){
	jQuery('html,body').animate({scrollTop: jQuery("#"+id).offset().top},'slow');
}

function launchAvail(host_id, product_id, currentDate) {
if (!currentDate) {
       var currentDate = new Date ();
   } else {
       var currentDate = new Date (currentDate);
   } 
     var fromdate = currentDate.getFullYear() + "-" + (currentDate.getMonth()+1) + "-" + currentDate.getDate();

   window.open('http://tourdesk.respax.com.au/section/public/dispatch.php?file=product_availability&anonuser=dsdd_avail&host_id='+host_id+"&product_id="+ product_id+"&fromdate="+fromdate, '_blank', 'width=600,height=400,toolbar=0,resizable=0,scrollbars=1,status=0');
}

function agreeterms_sb()
{
  document.frmchstandby.chbook.disabled=true;
  if(document.frmchstandby.chk.checked==true)
  {
    document.frmchstandby.chbook.disabled=false;
  }
  if(document.frmchstandby.chbook.checked==false)
  {
    document.frmchstandby.chbook.enabled=false;
  }

  document.frmcsstandby.csbook.disabled=true;
  if(document.frmcsstandby.chk.checked==true)
  {
    document.frmcsstandby.csbook.disabled=false;
  }
  if(document.frmcsstandby.chk.checked==false)
  {
    document.frmcsstandby.csbook.enabled=false;
  }

}

function bookstandbych()
{
    document.frmchstandby.action = "https://secure2.respax.com.au/DSDD/netwizard/bin/dispatch.php?file=info.runStep&action=new&site=TAKA&strTourCode=TAKA4D3NS&config=live&locale=eng"
    document.frmchstandby.target = "_blank";    // Open in a new window
	document.frmchstandby.submit();             // Submit the page
    return true;
}


function bookstandbycs()
{
    document.frmcsstandby.action = "https://secure2.respax.com.au/DSDD/netwizard/bin/dispatch.php?file=info.runStep&action=new&site=TAKA&strTourCode=TAKA5D4NS&config=live&locale=eng"
    document.frmcsstandby.target = "_blank";    // Open in a new window
	document.frmcsstandby.submit();             // Submit the page
    return true;
}


function agreeterms() // nb. checks must match the number in the form
{
// document.frm.cs2010.disabled=true;
// if(document.frm.chk.checked==true)
// {
//    document.frm.cs2010.disabled=false;
//  }
// if(document.frm.chk.checked==false)
//  {
//   document.frm.cs2010.enabled=false;
//  }

//  document.frm.ch2010.disabled=true;
//  if(document.frm.chk.checked==true)
//  {
//    document.frm.ch2010.disabled=false;
//  }
//  if(document.frm.chk.checked==false)
//  {
//    document.frm.ch2010.enabled=false;
//  }

//  document.frm.chcs2010f.disabled=true;
//  if(document.frm.chk.checked==true)
//  {
//    document.frm.chcs2010f.disabled=false;
//  }
//  if(document.frm.chk.checked==false)
//  {
//    document.frm.chcs2010f.enabled=false;
//  }

//  document.frm.chcs2010t.disabled=true;
//  if(document.frm.chk.checked==true)
//  {
//    document.frm.chcs2010t.disabled=false;
//  }
//  if(document.frm.chk.checked==false)
//  {
//    document.frm.chcs2010t.enabled=false;
//  }

  document.frm.cs2011.disabled=true;
  if(document.frm.chk.checked==true)
  {
    document.frm.cs2011.disabled=false;
  }
  if(document.frm.chk.checked==false)
  {
    document.frm.cs2011.enabled=false;
  }

  document.frm.ch2011.disabled=true;
  if(document.frm.chk.checked==true)
  {
    document.frm.ch2011.disabled=false;
  }
  if(document.frm.chk.checked==false)
  {
    document.frm.ch2011.enabled=false;
  }

  document.frm.chcs2011f.disabled=true;
  if(document.frm.chk.checked==true)
  {
    document.frm.chcs2011f.disabled=false;
  }
  if(document.frm.chk.checked==false)
  {
    document.frm.chcs2011f.enabled=false;
  }

  document.frm.chcs2011t.disabled=true;
  if(document.frm.chk.checked==true)
  {
    document.frm.chcs2011t.disabled=false;
  }
  if(document.frm.chk.checked==false)
  {
    document.frm.chcs2011t.enabled=false;
  }
}


function bookcs()
{
    document.frm.action = "bookingrequest.php?Code=TAKA05&CodeName=taka&DBTable=taka"
    document.frm.target = "";    // Open in a new window
	document.frm.submit();             // Submit the page
    return true;
}

function bookch()
{
    document.frm.action = "bookingrequest.php?Code=TAKA04&CodeName=taka&DBTable=taka"
    document.frm.target = "";    // Open in a new window (ex. _blank)
	document.frm.submit();             // Submit the page

    return true;
}

function bookchcsf()
{
    document.frm.action = "bookingrequest.php?Code=TAKA06&CodeName=taka&DBTable=taka"
    document.frm.target = "";    // Open in a new window
	document.frm.submit();             // Submit the page

    return true;
}
function bookchcst()
{
    document.frm.action = "bookingrequest.php?Code=TAKA06&CodeName=taka&DBTable=taka"
    document.frm.target = "";    // Open in a new window
	document.frm.submit();             // Submit the page

    return true;
}