FlashClass = {
	getFlashVersion:
		function (){ 
		  // ie 
		  try { 
			try {
			  var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); 
			  try { axo.AllowScriptAccess = 'always'; } 
			  catch(e) { return '6,0,0'; } 
			} catch(e) {} 
			return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; 
		  // other browsers 
		  } catch(e) { 
			try { 
			  if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; 
			  } 
			} catch(e) {} 
		  } return '0,0,0'; 
		},
	flash:
		function (getid,getmovie,get_w,get_h,getversion,getwmode)
		// function  (getid for display , getmovie.swf ,get_w,get_h, require version , [wmode1,wmode2,wmode3] )
		// wmode => transparent,opaque, xxxxxx...
		{
			var wmode=getwmode.split(',');
			var embed_params="";

			flashdisplay="<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=\""+get_w+"\" height=\""+get_h+"\">";
			flashdisplay+="<param name=\"movie\" value=\""+getmovie+"\">";
			flashdisplay+="<param name=\"quality\" value=\"high\">";
			var i=0;
			while(i<=wmode.length-1){
				flashdisplay+="<param name=\"wmode\" value=\""+wmode[i]+"\">";
				embed_params+=" wmode=\""+wmode[i]+"\" ";
				i++;
			}
			flashdisplay+="<embed src=\""+getmovie+"\" "+embed_params+" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"type=\"application/x-shockwave-flash\" width=\""+get_w+"\" height=\""+get_h+"\"></embed></object>";

			var checkversion = this.getFlashVersion().split(',').shift();
			if(checkversion >= getversion){
			  document.getElementById(getid).innerHTML=flashdisplay;
			}else{
				document.getElementById(getid).innerHTML="Your Flash Player is Old Version Please <a href=\"#\" onclick=\"window.open('http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&amp;promoid=BUIGP'); return false;\" rel=\"nofollow\">Download New Version Here</a>";
			}
		}
};
