// Flash Judge
function validFlash(){
if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]){
var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-2))>=reqVersion)
return true;
}else if(navigator.appName && navigator.appName.indexOf("Microsoft")!=-1 && navigator.userAgent.indexOf("Windows")!=-1 && navigator.userAgent.indexOf("Windows 3.1")==-1){
return true;
}else{
return false;
}
}

// no flash player
function writeFlashMAIN(){
if(!validFlash()){
document.write('<img src="./img/flasherror.gif" width="820" height="580" border="0" alt="" usemap="#map_flasherror">')
document.write('<map name="map_flasherror"><area shape="rect" alt="" coords="198,278,621,315" href="http://www.macromedia.com/go/getflashplayer/" target="_blank"></map>')
}
else {
// ok
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"')
document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"')
document.write(' width="' + swfWidth + '" height="' + swfHeight + '" id="' + swfID + '" align="' + swfAlign + '">')
document.write('<param name="allowScriptAccess" value="' + swfAllowScriptAccess + '" />')
document.write('<param name="movie" value="' + swfFile + '" />')
document.write('<param name="quality" value="' + swfQuality + '" />')
document.write('<param name="bgcolor" value="' + swfBgcolor + '" />')
document.write('<embed src="' + swfFile + '" quality="' + swfQuality + '" bgcolor="' + swfBgcolor + '" width="' + swfWidth + '" height="' + swfHeight + '" name="' + swfID + '" align="' + swfAlign + '" allowScriptAccess="' + swfAllowScriptAccess + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
document.write('</object>')
}
}