// JavaScript Document
function displayFlash(fileName, width, height)
{
  flashvars="section="+window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1).toLowerCase();
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+fileName+'">');
  if(flashvars!="") document.write('<param name="FlashVars" VALUE="'+flashvars+'">');
  document.write('<param name="quality" value="high"><param name="bgcolor" value="white"><param name="wmode" value="transparent"><embed src="'+fileName+'"');
  if(flashvars!="") document.write(' FlashVars="'+flashvars+'" ');
  document.write('wmode="transparent" quality="high" bgcolor="white" width="'+width+'" height="'+height+'" name="menu" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>');
}

function hideLayerDiv()
{
  document.getElementById("a").style.display="none";
}

function displayHomeFlash(fileName, width, height)
{
  if(readCookie("flashintro")!="yes")
  {
    flashvars="section="+window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1).toLowerCase();
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+fileName+'">');
    if(flashvars!="") document.write('<param name="FlashVars" VALUE="'+flashvars+'">');
    document.write('<param name="quality" value="high"><param name="bgcolor" value="white"><param name="wmode" value="transparent"><embed src="'+fileName+'"');
    if(flashvars!="") document.write(' FlashVars="'+flashvars+'" ');
    document.write('wmode="transparent" quality="high" bgcolor="white" width="'+width+'" height="'+height+'" name="menu" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>');
    createCookie("flashintro", "yes");
  }
  else
  {
    hideLayerDiv();
  }
}


function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}
