//<![CDATA[
function showTown(str)
{
var xmlhttp;    
if (str=="")
  {
  document.getElementById("show_down").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("show_down").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","/del_town.php?town="+str,true);
xmlhttp.send();
}

function showDay(str1)
{
var xmlhttp;    
if (str1=="")
  {
  document.getElementById("show_day").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("show_day").innerHTML=xmlhttp.responseText;
	
    }
	
  }
xmlhttp.open("GET","/del_schedule.php?day="+str1,true);
xmlhttp.send();
}

//Carousel
	$(document).ready(function () {
	  $('.infiniteCarousel').infiniteCarousel();
	});
	
	//Set equal heights
	$(document).ready(function(){		
		//set the starting bigestHeight variable
		var biggestHeight = 0;
		//check each of them
		$('.equal_height').each(function(){
			//if the height of the current element is
			//bigger then the current biggestHeight value
			if($(this).height() > biggestHeight){
				//update the biggestHeight with the
				//height of the current elements
				biggestHeight = $(this).height();
			}
		});
		//when checking for biggestHeight is done set that
		//height to all the elements
		$('.equal_height').height(biggestHeight);
	});
	
	//Fade top images
	$(document).ready(
		function(){
			$('ul#top_images').innerfade({
				speed: 1000,
				timeout: 7000,
				type: 'sequence',
				containerheight: '257px'
			});	 
		}
	);
	
	//Suppliers
	function showonlyone(thechosenone){
		var newboxes = document.getElementsByTagName("div");
		for(var x=0; x < newboxes.length; x ++){
			title = newboxes[x].getAttribute("title");
			if (title == 'newboxes'){
				if (newboxes[x].id == thechosenone){
					newboxes[x].style.display = 'block';
				}
				else{
					newboxes[x].style.display = 'none';
				}
			}
		}
	};
	
	$(document).ready(function(){
    $(".imagelink").click(function(){
       $(".imagelink").removeClass("boat_over");
       $(this).addClass("boat_over");
       return true;
     });

 });
//]]>
