function writeFlash(path, width, height, id){
					if(flashInstalled()) {
							document.write('<OBJECT id="'+id+'" type="application/x-shockwave-flash" height="'+height+'" width="'+width+'" data="'+path+'.swf">');
							document.write('<param NAME="Movie" VALUE="'+path+'.swf" />');
							document.write('<param NAME="Quality" VALUE="best" />');
							document.write('<param name="play" value="true" />');
							document.write('<param name="loop" value="true" />');
							document.write('<param name="wmode" value="opaque">');
							document.write('<\/OBJECT>');
							
					} else {
							document.write('<img class="flash_elem" src="'+path+'.jpg" alt="Flash Object" />');
					}
}
function flashInstalled() {
	var installed = 0;
	var version = 0;
	var currenthigh = 7;

	// Standard Flash Detection
	if (navigator.plugins && navigator.plugins.length) {
	
		x = navigator.plugins["Shockwave Flash"];
		if (x) {
			installed = 1;			
		} else {
			installed = 0;
		}
	} else {
	// IE flash detection
		currenthigh = currenthigh + 1;
		for(var i=currenthigh; i>0; i--){
			version = 0;
			installed = 0;
			try{
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				version = i;
				installed = 1;
				break;
			} catch(e){
				// We really don't do anything with this.
				// It is here to keep IE from throwing
				// an error.
			}
		}
	}

	if (installed == 1) {
		return true;
	} else {
		return false;
	}
}