function flashCheck(){
	if(typeof(navigator.mimeTypes['application/x-shockwave-flash']) !== 'undefined'){flash = true}
	else{
		try {
			new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
			var flash = true
		} 
		catch(e) {
			var flash = false
		}
	}
	return flash
}


function addFlash(id, swf, w, h){
	if(flashCheck() == true){
		var block = document.getElementById(id)
		var obj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+w+'" height="'+h+'" id="flash">'+
					'<param name="wmode" value="transparent" />'+
					'<param name="movie" value="'+swf+'" />'+
					'<embed wmode="transparent" src="'+swf+'" width="'+w+'" height="'+h+'" name="flash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
				'</object>'
		block.innerHTML = obj
	}
}
