﻿function embedFlash (DivID, classID, codebase, ObjectID, width, height, align,
			scriptAccess, movieURL, quality, bgcolor, scale, salign) {
    
    var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    
	var d = document.getElementById(DivID);
	if(hasRightVersion){
	
	    d.innerHTML = ' \
		    <object \
			    classid="' + classID + '" \
			    codebase="' + codebase + '" \
			    width="' + width + '" \
			    height="' + height + '" \
			    id="' + ObjectID + '" \
			    align="' + align + '" swLiveConnect="true"> \
			    \
			    <param name="allowScriptAccess" value="' + scriptAccess + '"/> \
			    <param name="movie" value="' + movieURL + '"/> \
			    <param name="quality" value="' + quality + '"/> \
			    <param name="bgcolor" value="' + bgcolor + '"/> \
			    <param name="scale" value="' + scale + '"/> \
			    <param name="salign" value="' + salign + '"/> \
			    \
			    <embed src="' + movieURL + '" \
				    quality="' + quality + '" \
				    scale="' + scale + '" \
				    salign="' + salign + '" \
				    bgcolor="' + bgcolor + '" \
				    width="' + width + '" \
				    height="' + height + '" \
				    name="' + ObjectID + '" \
				    align="' + align + '" \
				    allowScriptAccess="' + scriptAccess + '" \
				    type="application/x-shockwave-flash" \
				    pluginspage="http://www.macromedia.com/go/getflashplayer" /> \
				    \
		    </object> \
	    ';
	   }
	   else
	   {
	       d.innerHTML = 'This content requires Flash Player 8.'
	    + '<a href=http://www.macromedia.com/go/getflash/>To Get Flash, click here.</a>';
        
        }
}

function embedApplet (DivID, classID, codeBase, appletClass, appletID, 
			height, width, scriptable, mayscript) {
	
	var d = document.getElementById(DivID);
	
	d.innerHTML = ' \
		<!--[if !IE]> Firefox and others will use outer object --> \
			<object classid="java:' + appletClass + '.class" \
				id="' + appletID + '" \
				type="application/x-java-applet" \
				height="' + height + '" width="' + width + '"> \
				<param name="scriptable" value="' + scriptable + '"> \
				<param name="mayscript" value="' + mayscript + '"> \
		<!--<![endif]--> \
		<!-- MSIE (Microsoft Internet Explorer) will use inner object --> \
			<object classid="' + classID + '" \
				id="' + appletID + '" \
				codebase="' + codeBase + '" \
				height="' + height + '" width="' + width + '"> \
				<param name="code" value="' + appletClass + '" /> \
				<param name="scriptable" value="' + scriptable + '"> \
				<param name="mayscript" value="' + mayscript + '"> \
			</object> \
		<!--[if !IE]> close outer object --> \
			</object> \
		<!--<![endif]--> \
	';

/* d.innerHTML = '<applet code="' + appletClass + '.class" height="' + height + '" width="' + width + '" name="' + appletID + '" > </applet>'; */
}