//insert swf
function insertswf(targetDiv,width,height,src){
var alternativeContent = "<p style='text-align:center;display:block;border:1px solid black;padding:10px;'>You need to install flash player to see this element. Click <a href='http://get.adobe.com/flashplayer/' target='_blank'>here</a> to visit Adobe's Flash Player Site</p>";
document.getElementById(targetDiv).innerHTML = '<!--[if !IE]> --> <object type="application/x-shockwave-flash"  data="'+src+'" width="'+width+'" height="'+height+'"> <!-- <![endif]--> <!--[if IE]> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  width="'+width+'" height="'+height+'"> '+alternativeContent+' <param name="movie" value="'+src+'" /> <!--><!--dgx-->  <param name="loop" value="true" />  <param name="menu" value="false" />   </object> <!-- <![endif]-->';
}
/*
Usage: insertVideo('div id','width in pxls','height in pxls','location of player.swf','location of skin','location of flv.flv','play on load(boolean)','rewind when finished(boolean)')
*/
function insertVideo(targetDiv,width,height,playerUrl,skinUrl,flvUrl,autoPlay,autoRewind){
	//error checking
	if (document.getElementById(targetDiv) == null){
	alert("The ID given in the javascript paramater doesn't match the ID in your document\n\nplease check your target div id's");
	}	
	//function innards
	document.getElementById(targetDiv).innerHTML = '<object style="width:'+width+'px;height:'+height+'px;" type="application/x-shockwave-flash" data="'+playerUrl+'" width="' +width + '" + height="' +width + '"' + 'id=""> <param name="movie" value="'+playerUrl+'" /> <param name="allowScriptAcess" value="sameDomain" /> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff" /> <param name="scale" value="noScale" /> <param name="salign" value="TL" /> <param name="wmode" value="transparent" /> <param name="FlashVars" value="&MM_ComponentVersion=1&skinName='+skinUrl+'&streamName='+flvUrl+'&autoPlay='+autoPlay+'&autoRewind='+autoRewind+'" /> </object>';
	}
