// JavaScript Document

window.onload = init;
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// set height
var mvHeight = "100%"
// set width
var mvWidth = "100%"
// filename/path
var fileName = "mother"
// -----------------------------------------------------------------------------
// -->

	// Version check based upon the values entered above in "Globals"
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

function init() { 
	
	<!--
	
	// Check to see if the version meets the requirements for playback
	if (hasReqestedVersion) {
		
		  var ni = document.getElementById('body');
		  var newdiv = document.createElement('div');
		  var divIdName = 'mother';
		  newdiv.setAttribute('id',divIdName);
		  newdiv.innerHTML = 'This is odd.. you should be seeing the flash version ot the site.  Try refreshing the page. If you still see this message check your javascript settings.';
		  ni.appendChild(newdiv);


   var so = new SWFObject("mother.swf", "mymovie", "100%", "100%", "8", "#000000");
   so.write("mother");
		
		/*
		document.getElementById("html").htmlText = '
		   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
				   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
				   width="100%" height="100%">
			<param name="movie" value="mother.swf"> 
			<param name="quality" value="high">
			<param name="bgcolor" value="#FFFFFF">
			<!--[if !IE]> <-->
			<object data="mother.swf"
					width="100%" height="100%" type="application/x-shockwave-flash">
			 <param name="quality" value="high">
			 <param name="bgcolor" value="#FFFFFF">
			 <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
			 This is odd.. you should be seeing the flash version ot the site.  Try refreshing the page. If you still see this message check your javascript settings 
			</object>
			<!--> <![endif]-->
		   </object>';
		*/
		
		
		/*
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
					"src", "mother",
					"width", "100%",
					"height", "100%",
					"align", "middle",
					"id", "mother",
					"quality", "high",
					"bgcolor", "#999999",
					"name", "mother",
					"allowScriptAccess","sameDomain",
					"type", "application/x-shockwave-flash",
					'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
					"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
		*/
		document.getElementById("mother").style.padding = "0";
		document.getElementById("mother").style.margin = "0";
	} else {  // flash is too old or we can't detect the plugin
		//alert(document.getElementById("html").innerHTML);
		document.getElementById("html").style.display = "block";
		var str = document.location.href;
		var URL = str.slice(str.indexOf("#")+1,str.length);
		//alert(URL); 
		//return anchorUrl;
		if (URL == "mission") {
			mission();
		} else if (URL == "calendar") {
			calendar();
		} else if (URL == "booking") {
			booking();
		} else if (URL == "mailinglist") {
			mailinglist();
		} else if (URL == "lovekungfu") {
			lovekungfu();
		} else if (URL == "loveyourmama") {
			loveyourmama();
		} else if (URL == "links") {
			outbound();
		} else {
			mission();
		}  // insert non-flash content
	}
	// -->
}

function mission() 
{
	document.getElementById("mission").style.display = "block";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission_on.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
	
}
function calendar() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "block";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar_on.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
}
function booking() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "block";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking_on.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
}
function mailinglist() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "block";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist_on.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
}
function lovekungfu() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "block";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu_on.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
}
function loveyourmama() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "block";
	document.getElementById("outbound").style.display = "none";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama_on.gif"
	document.getElementById("outbound_bttn").src = "images/html/links.gif"
}
function outbound() 
{
	document.getElementById("mission").style.display = "none";
	document.getElementById("calendar").style.display = "none";
	document.getElementById("booking").style.display = "none";
	document.getElementById("mailinglist").style.display = "none";
	document.getElementById("lovekungfu").style.display = "none";
	document.getElementById("loveyourmama").style.display = "none";
	document.getElementById("outbound").style.display = "block";
	document.getElementById("mission_bttn").src = "images/html/mission.gif"
	document.getElementById("calendar_bttn").src = "images/html/calendar.gif"
	document.getElementById("booking_bttn").src = "images/html/booking.gif"
	document.getElementById("mailinglist_bttn").src = "images/html/mailinglist.gif"
	document.getElementById("lovekungfu_bttn").src = "images/html/lovekungfu.gif"
	document.getElementById("loveyourmama_bttn").src = "images/html/loveyourmama.gif"
	document.getElementById("outbound_bttn").src = "images/html/links_on.gif"
}
