var doc;
var isFlash = false;

if(swfobject.hasFlashPlayerVersion("9.0.115.0") && location.search.indexOf("noflash") == -1)
{
	showFlash();
}
else
{
	
}

function showFlash()
{
	document.getElementById("main").style.display = "none";
	document.getElementById("warning").style.display = "none";
	
	var flashvars = {
	home: "http://hsklegal.com/wordpress",
	styleSheet: "style/wordpress.css"
	};
	
	var params = {
		
	};
	
	var attributes = {
	  id: "index",
	  name: "index"
	};
	
	doc = document.body.innerHTML;
	
	swfobject.embedSWF("flash/index.swf", "main", "100%", "100%", "9.0.115.0", "", flashvars, params, attributes);
	swffit("index", 800, 1);
	
	document.body.style.margin = 0;
	document.body.style.padding = 0;
	document.styleSheets[0].disabled = true;
	
	isFlash = true;
}

function showHTML()
{
	document.body.innerHTML = doc;
	document.styleSheets[0].disabled = false;
	document.getElementById("main").style.display = "block";
	document.getElementById("main").style.visibility = "visible";

	isFlash = false;
}

function toggleFlash()
{
	if(isFlash)
	{
		showHTML();
	}
	else
	{
		showFlash();
	}
}

function setFlashHeight(newHeight)
{
	swffit("index", 800, newHeight);
}

