var typeBrowser = identityNavigator();
function activeFlash(src, width, height, eleName, trans, id){
	var ele=document.getElementById(eleName);
	var flashObject =null;
	switch(typeBrowser){
		case 1:
			flashObject = document.createElement('<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+'"></object>');
			if(id){flashObject.id=id;}
			flashObject.appendChild(document.createElement('<param name="movie" value="'+src+'">'));
			flashObject.appendChild(document.createElement('<param name="quality" value="high">'));
			if(trans) flashObject.appendChild(document.createElement('<param name="wmode" value="Transparent">'));
			break;
		case 2:
			flashObject = document.createElement("EMBED");
			flashObject.type = "application/x-shockwave-flash";
			flashObject.pluginspage = "http://www.macromedia.com/go/getflashplayer";
			if(id){flashObject.id=id;}
			flashObject.src = src;
			flashObject.width = width;
			flashObject.height = height;
			break;
	}
	ele.appendChild(flashObject);
}

function identityNavigator(){
/*
	1 : Microsoft Internet Explorer
	2 : Netscape
*/
	 if(navigator.appName=="Netscape"){
		 return 2;
	 }else{
		 return 1;
	 }
}

function activeVod(src, width, height, eleName, id, vmode){
	var ele=document.getElementById(eleName);
	var vodObject =null;
	if(vmode==null){vmode="mini";}
	switch(identityNavigator()){
		case 1:
			vodObject = document.createElement('<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+width+'" height="'+height+'"></object>');
			if(id){vodObject.id=id;}
			vodObject.appendChild(document.createElement('<param name="URL" value="'+src+'">'));
			vodObject.appendChild(document.createElement('<param name="uiMode" value="'+vmode+'">'));
			vodObject.appendChild(document.createElement('<param name="stretchToFit" value="true">'));
			break;
		case 2:
			vodObject = document.createElement("EMBED");
			vodObject.src = src;
			if(id){vodObject.id=id;}
			vodObject.width = width;
			vodObject.height = height;
			break;
	}
	ele.appendChild(vodObject);
}
