// JavaScript Document
function corporateHistoryVideo(){
	var oHeight = $(document).height();
	var oWidth = $(document).width();
	var videoHeight = 400;
	var videoWidth = 640;
	var videoBoxHeight = videoHeight + 10;
	var videoBoxWidth = videoWidth + 10;
	var overlayTitleHeight = 25;
	var overlayHeight = videoBoxHeight + overlayTitleHeight;
	var overlayWidth = videoBoxWidth;
	var overlayLeft = ($(window).width() / 2) - (overlayWidth / 2);
	var overlayTop = ($(window).height() / 2) - (overlayHeight / 2);
	
	if($('#opacity').length == 1){
		$('#opacity').toggle();
		$('#overlay').toggle();
	}
	else {
		$(document.body).append('<div id="opacity" style="height:' + oHeight + 'px; width:' + oWidth + 'px;"></div>');
		$(document.body).append('<div id="overlay" style="height:' + overlayHeight + 'px; left:' + overlayLeft + 'px; top:' + overlayTop + 'px; width:' + videoBoxWidth + 'px;"><div style="height:' + overlayTitleHeight + 'px; text-align:right; width:' + videoBoxWidth + 'px;"><a href="javascript:void(0);" onclick="$(\'#overlay\').toggle();$(\'#opacity\').toggle();" style="color:#FFF; font-size:14px; font-weight:bold;">Close [X]</a></div><div style="background-color:#FFF; height:' + videoBoxHeight + 'px; padding:10px 0 0 10px; width:' + videoBoxWidth + 'px;"><div id="historyFlash"><p style="margin:0px;"><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p></div></div></div>');
		var flashvars = {};
		var params = {
			quality: "high",
			wmode: "transparent",
			devicefont: "false",
			allowFullScreen: "false",
			allowScriptAccess: "sameDomain"
		};
		var attributes = {};
		
		swfobject.embedSWF("/resource/corporate/flash/Untitled-1.swf", "historyFlash", "640", "400", "9.0.0", "", flashvars, params, attributes);
	}
}

$('#historyFlash').ready(function(){
});
