var protocol = "http"
if (document.location.toString().indexOf("https://") > -1) protocol += 's'

function EmbedFlashInDivWithVersionCheck(divName, flashFile, width, height, reqMajorVer, reqMinorVer, reqRevision) {

	if (DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)) {
		
		var delimiter = '?'
		if (flashFile.indexOf('?') > -1) delimiter = '&'
		
		var flashHTML = null
		var divObj = null
	
		if (document.getElementById) {
			
			divObj = document.getElementById(divName)
	
			if(navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
				flashHTML = '\
					<embed src="' + flashFile + '" quality="high" pluginspage="' + protocol + '://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" wmode="transparent" allowScriptAccess="sameDomain" allowFullScreen="false" loop="false" menu="false" scale="noscale"></embed>'
			} else {
				flashHTML = '\
					<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" \
						codebase=' + protocol + '://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" \
						width="' + width + '" height="' + height + '">\
						<param name="movie" value="' + flashFile + '" />\
						<param name="quality" value="high" />\
						<param name="wmode" value="transparent" />\
						<param name="allowFullScreen" value="false" />\
						<param name="loop" value="false" />\
						<param name="menu" value="false" />\
						<param name="scale" value="noscale" />\
					</object>'
		}
			divObj.innerHTML = flashHTML
		}
	}
}

