function checkforFlash(flash,width,height,Img){	
	var agt = navigator.userAgent.toLowerCase();
	fh = 0;
		if (navigator.appName == "Netscape" && navigator.plugins){
			intPlugins = navigator.plugins.length;
			if (intPlugins > 4) {//net 4.5 default flash return 3
				for (i = 0; i < intPlugins; i++){
					plugin = navigator.plugins[i];
					//if (plugin.description.indexOf("Flash 3") != -1 || plugin.description.indexOf("Flash 4") != -1) {
					if (intPlugins > 4){
						intTypes = plugin.length;
						for (j = 0; j < intTypes; j++){
							mimetype = plugin[j];
            				if (mimetype){
								if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1))
									fh = 1;// Mac wierdness
					  			if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
									fh = 0;
							}
						}
					}
				}
	    	}
					if (fh == 1){
						document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs../flash/swflash.cab#version=4,0,2,0' width='"+width+"' height='"+height+"'>");
						document.writeln("<param name=movie value='"+flash+"'>");
						document.writeln("<param name=quality value=high>");
						document.writeln("<embed src='"+flash+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'>");
						document.writeln('</embed></object>');	
					}else{
						document.writeln("<img src='"+Img+"'><br>");
						document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs../flash/swflash.cab#version=4,0,2,0' width='"+width+"' height='"+height+"'>");
						document.writeln("<param name=movie value='"+flash+"'>");
						document.writeln("<param name=quality value=high>");
						document.writeln("<embed src='"+flash+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'>");
						document.writeln('</embed></object>');		
					}
		}
	var mac = (agt.indexOf("mac")!=-1);
	var ie  = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	var firefox = (agt.indexOf("firefox") != -1);
	//document.writeln("here it is<h1>"+firefox+"</h1>");
	if (ie && mac){
		document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs../flash/swflash.cab#version=4,0,2,0' width='"+width+"' height='"+height+"'>");
		document.writeln("<param name=movie value='"+flash+"'>");
		document.writeln("<param name=quality value=high>");
		document.writeln("<embed src='"+flash+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'>");
		document.writeln('</embed></object>');	
	}	
	
}