/* index.js - Functions specific to Index.html */

function f_PlaceText(ipResponse) {
	// Place the text on the page
	var vText = ipResponse.text;	
	$('SiteText').innerHTML = vText; 
	// Check any links in the text
	f_CheckLinks();
	// Do we need a Captcha image
	f_CheckCaptcha();
	// Google Maps image - Mouseover to Hand
	f_MapsMouseoverHand();
}

Event.observe(window,'load',function(){
	// Redirect if not on the base href page
	var vBase=document.getElementsByTagName('base')[0].href;
	if(window.location.href!=vBase){
		window.location.href=vBase;
	}

	// Get the viewport width & apply to body
	document.body.style.width=document.viewport.getWidth();
	
	// Start the video
	flowplayer("player", "flash/flowplayer-3.1.5.swf"); 

	// Fetch the Menu Bar & Page Text
	f_FetchMenuBar('menubar');

	// Get the Facebook Like button
	(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	
}); // observe load 



