function CreateControl(div_id, class_id, obj_id, width, height, path, auto, controller, type) {
	if(type=='windows'){
		var str = '<object type="video/x-ms-wmv" data="'+path+'" width="'+width+'" height="'+height+'"><param name="src" value="'+path+'" /><param name="autostart" value="'+auto+'" /><param name="controller" value="'+controller+'" /></object>';
	}else if(type=='quicktime'){
		var str = '<object classid="'+class_id+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+width+'" height="'+height+'"><param name="src" value="'+path+'" /><param name="autoplay" value="'+auto+'" /><param name="kioskmode" value="true" /><param name="controller" value="'+controller+'" /><!--[if !IE]>--><object type="video/quicktime" data="'+path+'" width="'+width+'" height="'+height+'"><param name="kioskmode" value="true" /><param name="autoplay" value="'+auto+'" /><param name="controller" value="'+controller+'" /></object><!--<![endif]--></object>';
	}else if(type=='flash'){
		var str='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="640" height="550" id="flash_player" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="FlashVars" value="moviepath='+path+'" /><param name="movie" value="flash_player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="flash_player.swf" FlashVars="moviepath='+path+'" quality="high" bgcolor="#000000" width="640" height="550" name="flash_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	}
	var d = document.getElementById(div_id);		
	d.innerHTML = str;
}

function openit(url, h, w){
	h = (h*1)+170;
	w = (w*1)+20;
	window.open(url, 'player', 'height='+h+',width='+w+',menubar=no,resizeable=no,scrollbars=no,status=no,titlebar=no,toolbar=no');
}
