window.___gcfg = {lang: 'en-GB'};

var siteName = "Bluebird Electric Trucks";
var hostName = "http://www.BluebirdAutomotive.com";
var hostServer = "http://www.BluebirdAutomotive.com/"
var facebookID = "1173524527"

function PrelaunchTitle()
{
 		document.write("<div id=Header>");
		document.write("</div>");
		document.write("<div id=Content>");
		
		document.write("<img src=" + hostServer + "images/logo1.jpg align=left hspace=20 border=0 alt=Bluebird Electric Trucks and Vans>");
		document.write("<div id=headline>");
		document.write("		 Bluebird Electric Trucks<br />");
		document.write("		 Delivering The Future<br /><br />");
		document.write("		 &nbsp;");
		document.write("</div>");
		}

function Menu()
{
 		document.write("<div id=Header>");
		document.write("</div>");
		document.write("<div id=Content>");
		
		document.write("<img src=" + hostServer + "images/logo1.jpg align=left hspace=20 border=0 alt=Bluebird Electric Trucks and Vans>");
		document.write("<div id=headline>");
		document.write("		 Bluebird Electric Trucks<br />");
		document.write("		 Delivering The Future<br /><br />");
		document.write("		 0845 000 0000");
		document.write("</div>");
		
		document.write("<div id=menu>");
		document.write("<a href=" + hostServer + "index.html>Bluebird Electric Trucks</a>");
		document.write("<a href=" + hostServer + "electric-truck-configuration.html>Bluebird Configurations</a>");
		document.write("<a href=" + hostServer + "electric-vehicle-technology.html>Electric Vehicle Technology</a>");
		document.write("<a href=" + hostServer + "electric-vehicle-advantages.html>Electric Vehicle Advantages</a>");
		document.write("<a href=http://www.owningelectriccar.com/Electric-Vehicle-Emissions.aspx>Electric Vehicle<br />emissions</a>");
		document.write("<a href=" + hostServer + "electric-vehicle-demonstration.html>Book a Demonstration</a>");
		document.write("<a href=" + hostServer + "contact-bluebird-electric.html>Contact<br />Us</a>");
		document.write("</div>");	
}

function RandomTopImage()
{
		var now = new Date();
		var randomSeed = now.getSeconds();
		if (randomSeed > 9) randomSeed -= 10;
		if (randomSeed > 9) randomSeed -= 10;
		if (randomSeed > 9) randomSeed -= 10;
		if (randomSeed > 9) randomSeed -= 10;
		if (randomSeed > 9) randomSeed -= 10;
		if (randomSeed > 9) randomSeed -= 10;

		// We now have a random number between 0 and 9.
		// This means we can show ten different images
		// if we want to.
		
		document.write("<p>");

		switch (randomSeed)
		{
			case 1:
			case 2:
						 document.write("<img src=" + hostServer + "images/main.jpg border=1 alt=Bluebird Electric Truck>");
						 break;
			case 3:
			case 4:
						document.write("<img src=" + hostServer + "images/box-van.jpg border=1 alt=Bluebird Electric Truck>");
						 break;
			case 5:
			case 6:
						document.write("<img src=" + hostServer + "images/top-image-truck.jpg border=0 alt=Bluebird Electric Truck>");
						 break;
			case 7:
			case 8:
						 document.write("<img src=" + hostServer + "images/top-image-truck.jpg border=0 alt=Bluebird Electric Truck>");
						 break;
			case 9:
		    case 0:
						document.write("<img src=" + hostServer + "images/top-montage.jpg border=0 alt=Bluebird Electric Truck>");
						 break;
		}
		document.write("</p>");
}

function Footer()
{
 		document.write("</div>");							 /* Closing down the 'Content' div opened in the Menu() function */
		document.write("<div id=Footer>");
		document.write("		 <p>");
		document.write("					 Bluebird Automotive, The Bluebird Centre, The Old Market, Melville Street, Pembroke Dock, Pembrokeshire. SA72 6XR.");
		document.write("					 <br />");
		document.write("		 			 The Bluebird Electric Truck website is &copy; copyright 2011 by Bluebird Automotive.");
		document.write("					 <br />");
		document.write("					 All rights reserved.  <a href=" + hostServer + "disclaimer.html>Use of this web site is subject to our terms and conditions.</a>");
		document.write("		 </p>");
		document.write("</div>");
		document.write("<br />");
}

/* Social Media functions */
function FacebookSetup(title, image)
{
		GooglePlusOne();
 		var url=window.location.host + window.location.pathname;
		document.write("<meta property='og:title' content='" + title + "' />");
		document.write("<meta property='og:type' content='article' />");
		document.write("<meta property='og:url' content='" + url + "' />");
		document.write("<meta property='og:image' content='" + hostName + "/images/" + image + "' />");
		document.write("<meta property='og:site_name' content='" + siteName + "' />");
		document.write("<meta property='fb:admins' content='" + facebookID + "' />");
}

function SocialMedia(tweetMessage)
{
		var url=window.location.host + window.location.pathname;
		var facebook="http://www.facebook.com/plugins/like.php?href=" + url + "&amp;layout=standard&amp;show_faces=false&amp;width=250&amp;action=like&amp;font&amp;colorscheme=light&amp;height=35";
		
		document.write("<p>");
		document.write("  <center>");
		document.write("		<a href='http://twitter.com/home/?status=" + tweetMessage + "' target='_new'><img src=" + hostServer + "images/tweet-this.jpg border=0 alt='Tweet This' hspace=30></a>");
		document.write("		<iframe src=" + facebook + " scrolling=no height=35 frameborder=0 style=border:none; overflow:hidden; width:250px; height:35px; allowTransparency=true></iframe>");
		document.write("		<br />");
		document.write("		<g:plusone></g:plusone>");
		document.write("	</center>");
		document.write("</p>");
}

function GooglePlusOne() 
{
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
}

function FacebookButton()
{
 		var url=window.location.host + window.location.pathname;
    document.write("<iframe src='http://www.facebook.com/plugins/like.php?href=" + url + "&amp;layout=standard&amp;show_faces=false&amp;width=300&amp;action=like&amp;font&amp;colorscheme=light&amp;height=35' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:300px; height:35px;' allowTransparency='true'></iframe>");
}

function YouTube( videoID )
{
 		document.write("<object>");
 		document.write("		<param name='movie' value='http://www.youtube.com/v/" + videoID + "&hl=en_GB&amp;fs=1&amp;' />");
 		document.write("		<param name='allowFullScreen' value='true' />");
 		document.write("		<param name='allowscriptaccess' value='always' />");
 		document.write("		<embed src='http://www.youtube.com/v/" + videoID + "&amp;hl=en_GB&amp;fs=1&amp;' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' align='right' width='290' height='240' />");
 		document.write("</object>");
}

function YouTubeLarge( videoID )
{
 		document.write("<object>");
 		document.write("		<param name='movie' value='http://www.youtube.com/v/" + videoID + "&hl=en_GB&amp;fs=1&amp;' />");
 		document.write("		<param name='allowFullScreen' value='true' />");
 		document.write("		<param name='allowscriptaccess' value='always' />");
 		document.write("		<embed src='http://www.youtube.com/v/" + videoID + "&amp;hl=en_GB&amp;fs=1&amp;' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='600' height='475' />");
 		document.write("</object>");
}									 
									 
