// JScript File

// wmode: transparent | opaque
// loop: 1 | 0
function InsertFlash(src, width, height, flashvars, wmode, loop) {
  // if not specified: set var to ''
  flashvars = flashvars || '';
  wmode = wmode || '';
  loop = loop || '';
  
  // check values
  if (src=='') alert('src is empty!');
  if (width<=0) alert('width <= 0!');
  if (height<=0) alert('height <= 0!');
  
  // escape qoutes in flashvars
  flashvars = flashvars.replace(/"/g, escape('\"'));
  flashvars = flashvars.replace(/'/g, escape('\''));
  
  // write flash-object
	document.write('<OBJECT codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="'+height+'" width="'+width+'" align="left" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" VIEWASTEXT>');
	document.write('<PARAM NAME="Movie" VALUE="'+src+'">');
	document.write('<PARAM NAME="Src" VALUE="'+src+'">');
  document.write('<PARAM NAME="FlashVars" value="' + flashvars + '">');
  document.write('<PARAM NAME="Play" VALUE="-1">');
  document.write('<PARAM NAME="Loop" VALUE="' + loop + '">');
  document.write('<PARAM NAME="Quality" VALUE="High">');
  document.write('<PARAM NAME="SAlign" VALUE="LT">');
  document.write('<PARAM NAME="Menu" VALUE="0">');
  document.write('<PARAM NAME="Base" VALUE="">');
  document.write('<PARAM NAME="AllowScriptAccess" VALUE="sameDomain">');
  document.write('<PARAM NAME="Scale" VALUE="NoScale">');
  document.write('<PARAM NAME="DeviceFont" VALUE="0">');
  document.write('<PARAM NAME="EmbedMovie" VALUE="0">');
  document.write('<PARAM NAME="wmode" value="'+wmode+'">');
  document.write('<PARAM NAME="SeamlessTabbing" VALUE="1">');
  document.write('<PARAM NAME="Profile" VALUE="0">');
  document.write('<PARAM NAME="ProfileAddress" VALUE="">');
  document.write('<PARAM NAME="ProfilePort" VALUE="0">');
	document.write('<embed src="'+src+'" quality="high" width="'+width+'" height="'+height+'" wmode="'+wmode+'" FlashVars="'+flashvars+'" name="menu" loop="'+loop+'" align="left" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</OBJECT>');
}




function ChangeVisibilityForClass(ClassToHide, Visibility) {
  var ToHide = document.getElementsByTagName('DIV'); 
    for(var i=0; i < ToHide.length; i++){
              if (ToHide[i].className && ToHide[i].className == ClassToHide) ToHide[i].style.visibility = Visibility;
    }
}

