//-------------------------------------------------------------------------------------
// File        : GF Embedding.js
// Description : Code for embedding menus and flash elements
//
//--------------------- GeckoFoot Limited COPYRIGHT © 2006 ----------------------------
// The  information  contained here-in is the property of GeckoFoot Limited and
// is not to be copied, altered or used without prior permission. All rights reserved. 
//-------------------------------------------------------------------------------------

function gfembedflash ( src, width, height )
{
	flashStr = new String ( "<object  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"" + width + "\" height=\"" + height + "\" class=\"leftObject\"><param name=\"movie\" value=\"" ) ;
	flashStr += src ;
	flashStr += "\"<param name=\"quality\" value=\"high\" /><embed src=\"" ;
	flashStr += src ;
	flashStr += "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed></object>" ;
	document.write ( flashStr ) ;
}

function gfembedpaddedflash ( src, width, height )
{
	flashStr = new String ( "<object  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"" + width + "\" height=\"" + height + "\" class=\"paddedObject\"><param name=\"movie\" value=\"" ) ;
	flashStr += src ;
	flashStr += "\"<param name=\"quality\" value=\"high\" /><embed src=\"" ;
	flashStr += src ;
	flashStr += "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed></object>" ;
	document.write ( flashStr ) ;
}

function gfembedtopmenu ( img, tint, head, url, i1, u1, i2, u2, i3, u3 )
{
	gfembedflash ( "Multimedia/GF Pic Top Menu.swf?imgSrc=" + img + "&tint=" + tint + "&headline=" + head + "&mainURL=" + url + "&item1text=" + i1 + "&item1URL=" + u1 + "&item2text=" + i2 + "&item2URL=" + u2 + "&item3text=" + i3 + "&item3URL=" + u3, 140, 110 ) ;
}

function gfembedmenu ( img, tint, head, url, i1, u1, i2, u2, i3, u3, rootDir )
{
	gfembedflash ( rootDir + "Multimedia/GF Pic Menu.swf?imgSrc=" + img + "&tint=" + tint + "&headline=" + head + 
				  "&mainURL=" + url + "&item1text=" + i1 + "&item1URL=" + u1 + "&item2text=" + i2 + 
				  "&item2URL=" + u2 + "&item3text=" + i3 + "&item3URL=" + u3,
				  140, 110 ) ;
}

function gfembednews ( img, tint, headline, detail, urlLink, rootDir )
{
	gfembedpaddedflash ( rootDir + "Multimedia/GF News.swf?imgSrc=" + img + "&tint=" + tint + 
		"&headline=" + headline + "&detail=" + detail + "&urlLink=" + urlLink, 
		140, 140 ) ;
}


function gfembednewsnopad ( img, tint, headline, detail, urlLink, rootDir )
{
	gfembedflash ( rootDir + "Multimedia/GF News.swf?imgSrc=" + img + "&tint=" + tint + 
		"&headline=" + headline + "&detail=" + detail + "&urlLink=" + urlLink, 
		140, 140 ) ;
}

function gfembedrss ( rssURL, tint, rootDir, img )
{
	gfembedpaddedflash ( rootDir + "Multimedia/GF News XML.swf?rssURL=" + rssURL + 
		"&rootDirectory=" + rootDir + "&tint=" + tint + "&imgSrc=" + img, 140, 140 ) ;
}

function GFEmbedRSS ( rssURL, tint, backCol, img )
{
	gfembedpaddedflash ( "http://www.GeckoFoot.com/Multimedia/GF News XML.swf?rssURL=" + rssURL + 
		"&rootDirectory=http://www.GeckoFoot.com/&backCol=" + backCol + "&tint=" + tint +
		"&imgSrc=" + img, 140, 140 ) ;
}

function gfembedrssnopad ( rssURL, tint, rootDir, img )
{
	gfembedflash ( rootDir + "Multimedia/GF News XML.swf?rssURL=" + rssURL + 
		"&rootDirectory=" + rootDir + "&tint=" + tint + "&imgSrc=" + img, 140, 140 ) ;
}

function gfembedsidemenu ( rootDir )
{	
	document.write ( "<img src='" + rootDir + "Images/Menu Top.jpg' alt='' name='MenuTop' width='140' height='140' " +
					  "border='0' align='top' usemap='#m_Menu20Top' id='MenuTop' />    " +
				"<map name='m_Menu20Top' id='m_Menu20Top'>       " +
					"<area shape='circle' coords='14,85,14' href='javascript:;' " +
				  		"alt='Switch to HTML' />" +
					"<area shape='circle' coords='15,61,14' " +
						"href='javascript:if (history.length &gt; 0){history.back()};' alt='Back' />" +
					"<area shape='circle' coords='14,35,14' href='" + rootDir + "index.html' alt='Home' />     </map>" ) ;

	gfembedmenu ( rootDir + "Images/Lyme Harb Small.jpg", "0x000055",
				  "Home",                rootDir + "index.html",
				  "Maps",        	     rootDir + "Maps.html",
				  "Contact Information", rootDir + "Contact.html",
				  "Links",        		 rootDir + "Links.html", rootDir ) ;
	document.write ( "<img src=\"" + rootDir + "Images/Menu Middle.jpg\" width=\"140\" height=\"15\" />" ) ;

	gfembedmenu ( rootDir + "Images/Weather.jpg",     "0x330033",
				  "Latest Information",     rootDir + "Latest.html",
				  "News", 	                rootDir + "News.html", 
				  "Tide Times",     		rootDir + "Tides.html",
				  "Weather Forecast", 		"http://www.bbc.co.uk/weather/5day.shtml?id=1742", rootDir ) ;

	document.write ( "<img src=\"" + rootDir + "Images/Menu Middle.jpg\" width=\"140\" height=\"15\" />" ) ;

	gfembedmenu ( rootDir + "Images/Lyme Beach Small.jpg",     "0x003333",
				  "Photography", 			"http://www.flickr.com/photos/tags/lymeregis/",
				  "Coming Soon", 		    rootDir + "#",
				  "Coming Soon",     		rootDir + "#",
				  "Coming Soon", 		    rootDir + "#", rootDir ) ;

    document.write ( "<img src='" + rootDir + "Images/Menu%20Empty%20Search.jpg' " +
						"width='140' height='47' border='0' alt='' />" +
    				 "<img name='MenuBottom' src='" + rootDir + "Images/Menu%20Bottom.jpg' " +
						"width='140' height='126' border='0' id='MenuBottom' " +
						"usemap='#m_Menu20Bottom' alt='' /> " +
					"<map name='m_Menu20Bottom' id='m_Menu20Bottom'> " +
						"<area shape='circle' coords='15,17,14' " +
							"href='mailto:info@LymeHarbour.com' alt='E-mail Us' /> " +
					"<area shape='circle' coords='15,46,14' href='http://www.GeckoFoot.com/Help.html' " + 
					"alt='Website Help' /> " +
					"<area shape='circle' coords='15,75,14' href='http://www.GeckoFoot.com/Copyright.html' " +
					"alt='&copy; 2007 GeckoFoot Limited' /> </map>" ) ;	
}
