//Goolge maps
function initializemap(){
	var latlng = new google.maps.LatLng( 57.64200 , -3.32091 );//57.56169,-3.138614 );
	var myOptions = {
	  zoom: 13,
	  center: latlng,
	  mapTypeId: google.maps.MapTypeId.HYBRID
	};
	var map = new google.maps.Map(document.getElementById("map_canvas"),
		myOptions);

	var myLatlng = new google.maps.LatLng( 57.633000 , -3.32970 );

	var marker = new google.maps.Marker({
		  position: myLatlng,
		  title:"Mayne House"
	});
	
	marker.setMap(map); 
} 

function showDropdown( drpdn , btn ){
	var dropdown = document.getElementById( drpdn );
	var button = document.getElementById( btn );
	if( dropdown.style.display == "none" ){
		dropdown.style.display = "inline";
		button.innerHTML = "[less info]";
	}
	else{
		dropdown.style.display = "none";
		button.innerHTML = "[more info]";
	}
}

var monthlabels = new Array("January","Ferbruary","March","April","May","June","July","August","September","October","November","December");

function nextMonth(){
	var cal = document.getElementById( "date-" + curmonth + "-" + curyear );
	var monthlabel = document.getElementById( "month" );
	if ( curmonth == 12 ){
		var nextCal = document.getElementById( "date-1-" + (curyear+1) );
		curmonth = 1;
		curyear += 1;
		var yearlabel = document.getElementById( "year" );
		yearlabel.innerHTML = curyear;
	}
	else{
		curmonth += 1;
		var nextCal = document.getElementById( "date-" + curmonth + "-" + curyear );		
	}
	
	monthlabel.innerHTML = monthlabels[curmonth-1];
	cal.style.display = "none";
	nextCal.style.display = "";	
	
	if( curmonth == month && curyear == year+1 ){
		document.getElementById( "next" ).style.display = "none";
		document.getElementById( "nextend" ).style.display = "inline";
	}
	document.getElementById( "prev" ).style.display = "inline";
	document.getElementById( "prevstart" ).style.display = "none";
}

function prevMonth(){
	var cal = document.getElementById( "date-" + curmonth + "-" + curyear );
	var monthlabel = document.getElementById( "month" );
	if ( curmonth == 1 ){
		var prevCal = document.getElementById( "date-12-" + (curyear-1) );
		curmonth = 12;
		curyear -= 1;
		var yearlabel = document.getElementById( "year" );
		yearlabel.innerHTML = curyear;
	}
	else{
		curmonth -= 1;
		var prevCal = document.getElementById( "date-" + curmonth + "-" + curyear );		
	}
	
	monthlabel.innerHTML = monthlabels[curmonth-1];
	cal.style.display = "none";
	prevCal.style.display = "";	
	
	if( curmonth == month && curyear == year ){
		document.getElementById( "prev" ).style.display = "none";
		document.getElementById( "prevstart" ).style.display = "inline";
	}
	document.getElementById( "next" ).style.display = "inline";
	document.getElementById( "nextend" ).style.display = "none";
}
