function url(link)
{
	window.open(link);
}
var hasFlash = function(){
	var nRequiredVersion = 6;	
	
	if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1){
		document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + nRequiredVersion + '))) \n</script\> \n');
		/*	If executed, the VBScript above checks for Flash and sets the hasFlash variable. 
			If VBScript is not supported it's value will still be undefined, so we'll run it though another test
			This will make sure even Opera identified as IE will be tested */
		if(window.hasFlash != null){
			return window.hasFlash;
		};
	};
	if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
		var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
		return parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1)) >= nRequiredVersion;
	};
	return false;
}();

function buildLeftHeader(obj,title,subTitle)
{
	if(hasFlash)
	{
		obj = document.getElementById(obj);
		if(obj)
		{
			theHeight = obj.offsetHeight;
			obj.style.display = "none";
			var myFlashObject = new FlashObject("swf/left_panel_header.swf", "flash-"+obj.id, "130", "24", 7, "#FFFFFF","flash");
			myFlashObject.addParam("wmode", "transparent");
			myFlashObject.addVariable("titleText", title);
			myFlashObject.addVariable("sub", subTitle);
			myFlashObject.write();
		}
	}
}
function buildBanner(obj,src,title)
{

//alert('hi');
	//if(hasFlash)
	//{
	//alert('hi');
		//obj = document.getElementById(obj);
		//if(obj)
		//{
			//obj.style.display = "none";
			var myFlashObject = new FlashObject("swf/banner.swf", "flash-"+obj, "530", "170", 7, "#FFFFFF","flashBanner");
			myFlashObject.addParam("wmode", "transparent");
			myFlashObject.addVariable("imagePath", src);
			myFlashObject.write();
		//}
	//}
}
function buildHeader(obj,title,subTitle)
{

	if(hasFlash)
	{
		//obj = document.getElementById(obj);
		//if(obj)
		//{
			//theHeight = obj.offsetHeight;
			//obj.style.display = "none";
			var myFlashObject = new FlashObject("swf/header.swf", "flash-"+obj,"500","24", 7, "#FFFFFF","flash");
			myFlashObject.addParam("wmode", "transparent");
			myFlashObject.addVariable("titleText", title);
			myFlashObject.addVariable("sub", subTitle);
			myFlashObject.write();
		//}
	}
}

function buildRightHeader(obj,title,subTitle)
{
	if(hasFlash)
	{
		obj = document.getElementById(obj);
		if(obj)
		{
			theHeight = obj.offsetHeight;
			obj.style.display = "none";
			var myFlashObject = new FlashObject("swf/right_panel_header.swf", "flash-"+obj.id, "130", "24", 7, "#FFFFFF","flash");
			myFlashObject.addParam("wmode", "transparent");
			myFlashObject.addVariable("titleText", title);
			myFlashObject.addVariable("sub", subTitle);
			myFlashObject.write();
			
		}
	}
}

function buildNavHeader(obj,title,subTitle)
{
	if(hasFlash)
	{
		obj = document.getElementById(obj);
		if(obj)
		{
			theHeight = obj.offsetHeight;
			obj.style.display = "none";
			var buildNavHeader = new FlashObject("swf/navigation_header.swf", "flash-"+obj.id, "130", "24", 7, "#FFFFFF","flash");
			buildNavHeader.addParam("wmode", "transparent");
			buildNavHeader.addVariable("titleText", title);
			buildNavHeader.addVariable("sub", subTitle);
			buildNavHeader.write();

		}
	}
}

function buildImage(obj,src,title,width,height,offsetX,offsetY)
{
	if(hasFlash)
	{
		obj = document.getElementById(obj);
		if(obj)
		{
			obj.style.display = "none";
			var myFlashObject = new FlashObject("swf/image.swf", "img" + obj.id,width, height, 7, "#FFFFFF","flashBanner");
			myFlashObject.addParam("wmode", "transparent");
			myFlashObject.addVariable("src", src);
			myFlashObject.addVariable("xPos", offsetX);
			myFlashObject.addVariable("yPos", offsetY);
			myFlashObject.write();
		}
	}
}


