//insert video
function insertVideo(targetDiv,width,height,playerUrl,skinUrl,flvUrl,autoPlay,autoRewind){
	//error checking
	//check if the target div's supplied by user match
	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>';
}
