var myWidth = 0;
var myHeight = 0;

function reportSize()
{
	if(typeof( window.innerWidth ) == 'number')
	{
	  myWidth = window.innerWidth;
	  myHeight = window.innerHeight;
	}
	else
	{
		if( document.documentElement &&	( document.documentElement.clientWidth || document.documentElement.clientHeight ))
		{
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}
		else
		{
			if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
			{
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		 }
	}
}

function updateembed(newsize,newcolor,newbgimage)
{
	reportSize();
	var newHeight = Number(myHeight);
	
	if(Number(newsize) > Number(myHeight))
		newHeight = newsize;
	
	swffit.fit("flash", "1000", newHeight, null, null, false, false);
	
	if(newcolor != "null")
		document.body.style.backgroundColor = ("#" + newcolor);
					
	document.body.style.backgroundImage = "url('" + newbgimage + "')";
}

function scrollToTop()
{
	jQuery(function( $ ){
	$(function scroll() {
	   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: 0}, 400 );
	   return false;
	});
	});
}

function hideShowLikeBtn(show)
{
	if(show == "true")
	{
		document.getElementById('likeBtn').style.display = 'block'; 
	}
	else
	{
		document.getElementById('likeBtn').style.display = 'none';
	}
}

function init()
{
	var params = {};
	params.allowscriptacces = "always";
	params.scale = "noscale";
	params.wmode = "transparent";
	params.seamlesstabbing = "false";
	var attributes = {};
	var flashvars = {};
	
	swffit.showScrollV();
	swfobject.embedSWF("site.swf","flash", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}
