var embedded = false;

// flas embed
var SITE_ID = "app";

var MINIMUM_HEIGHT = 667;
var MINIMUM_WIDTH = 1024;

var width = "100%";
var height = "100%";

var version = "9.0.115.0"; // min version required to display
var path = "site.swf";
var id = "site";
var bg_color = "#0c0c0c";

var params = {
	quality: "high",
	menu: "false",
	scale: "noscale",
	allowFullScreen: "true",
	bgcolor: "#0c0c0c"
}

// params["wmode"] = "opaque"; // causes a lot of bugs in ff http://groups.google.com/group/swfobject/msg/412f90e9a96694ec

var flashvars = {};
var attributes = { id: SITE_ID, name: SITE_ID };

function embed(){
	
	if ( embedded ){ return; }

	embedded = true;

	// alternate content for flash
	var flashcontent = document.getElementById('flashcontent');
	flashcontent.innerHTML = 'div align="center"><div id="holder"><div class="vine"><img src="assets/html/nokia-vine.gif" alt="Nokia Vine" width="276" height="600" /></div><div class="hand"><img src="assets/html/no-flash.gif" alt="To view this page you need to have the latest version of Flash Player installed on your machine. If you don�t have it installed, you can download the latest version of Flash Player" width="414" height="303" usemap="#flash" /></div></div><map name="flash" id="flash"><area coords="66,187,132,206" href="http://www.adobe.com/products/flashplayer/" title="Flash Player" alt="Flash Player" /><area coords="112,68,178,87" href="http://www.adobe.com/products/flashplayer/" title="Flash Player" alt="Flash Player" /><area coords="63,254,127,273" href="http://www.adobe.com/products/flashplayer/" title="Flash Player" alt="Flash Player" /><area coords="263,119,335,141" href="http://www.adobe.com/products/flashplayer/" title="Flash Player" alt="Flash Player" /></map>';

	swfobject.embedSWF( path, "flashcontent", width, height, version, "", flashvars, params, attributes );
	swffit( SITE_ID, MINIMUM_WIDTH, MINIMUM_HEIGHT );

}


// ONLOAD

//onload function
function loadHandler(){
	embed();
}


//setup onload function
if( typeof window.addEventListener != 'undefined'){
	//.. gecko, safari, konqueror and standard
	window.addEventListener('load', loadHandler, false);
}
else if( typeof document.addEventListener != 'undefined' ){
	//.. opera 7
	document.addEventListener('load', loadHandler, false);
}
else if( typeof window.attachEvent != 'undefined' ){
	//.. win/ie
	window.attachEvent('onload', loadHandler);
}

//** remove this condition to degrade older browsers
else {
	//.. mac/ie5 and anything else that gets this far
	window.onload = loadHandler;
}
