// JavaScript Document
// Draws the flash after extensive detection
	//		Parameters:
	//		0 - DOM node to draw flash object to (ex: 'myFlashDiv')
	//		1 - flash path (ex: 'fla/my.swf')
	//		2 - flash object width
	//		3 - flash object height
	//		4 - flash quality (ex: 'high')
	//		5 - boolean play
	//		6 - boolean swLiveConnect
	//		7 - boolean loop  	
	//		8 - background color (!!! Must be in hex value w/0 # symbol   ex:000000) 

	
function js_DrawFlashPlugin(pNode,pSwfPath,pWidth,pHeight,pQuality,pPlay,pLiveConn,pLoop,pBGColor)
{
	// Version check based upon the values entered above in "Globals"
	var hasReqestedVersion = DetectFlashVer(8,8,8);
	
	if(document.getElementById(pNode) != null)
	{
	//alert('hasReqestedVersion = ' + hasReqestedVersion);
	
		// Check to see if the version meets the requirements for playback
		if (hasReqestedVersion) {  // if we've detected an acceptable version
		
		
		
			var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'width='+pWidth+' height='+pHeight+''
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" VIEWASTEXT>'
			+ '<param name="movie" value='+pSwfPath+' /><param name="quality" value='+pQuality+' />'
			+ '<param name="wmode" value="transparent" />'
			+ '<embed src='+pSwfPath+' quality="high" '
			+ 'width='+pWidth+' height='+pHeight+' name="advert" aligh="middle"'
			+ 'play='+"\""+pPlay+"\""+''
			+ 'swLiveconnect='+"\""+pLiveConn+"\""+''
			+ 'loop='+"\""+pLoop+"\""+''
			+ 'quality='+"\""+pQuality+"\""+''
			+ 'bgcolor='+"\""+pBGColor+"\""+''
			+ 'allowScriptAccess="sameDomain"'
			+ 'type="application/x-shockwave-flash"'
			+ 'name="wmode" value="transparent"'
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '<\/embed>'
			+ '<\/object>';
			document.getElementById(pNode).innerHTML = oeTags;   // embed the Flash Content SWF when all tests are passed
		} else {  // flash is too old or we can't detect the plugin
		
			var alternateContent = 'You need to download the latest Flash Player to view this site. &nbsp;'
  			+ '<a href=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash><img src=\"img/download_now.gif\" alt=\"download\" title=\"download\" /></a>';
			document.getElementById(pNode).innerHTML = alternateContent;  // insert non-flash content
		}
	}else{
		return
	}
}

  