
function daumEmbed(obj,div){
	// generate html code
	// for ie obejct
	var html = '<object ';
	if (!obj.id && !obj.name){
		var r = Math.round(Math.random()*100);
		html += 'id="daumActiveXObject'+r+'" name="daumActiveXObject'+r+'" ';
	} else {
		if (obj.id) html += 'id="'+obj.id+'" ';
		else html += 'id="'+obj.name+'" ';
		if (obj.name) html += 'name="'+obj.name+'" ';
		else html += 'name="'+obj.id+'" ';
	}
	if (obj.type) html += 'type="'+obj.type+'" ';
	if (obj.classid) html += 'classid="'+obj.classid+'" ';
	if (obj.width) html += 'width="'+obj.width+'" ';
	if (obj.height) html += 'height="'+obj.height+'" ';
	if (obj.codebase) html += 'codebase="'+obj.codebase+'" ';
	html += '>\n';
	// append params
	for (var i in obj.param){
		html += '<param name="'+obj.param[i][0]+'" value="'+obj.param[i][1]+'"/>\n';
	}

	// for ns embed
	html += '<embed ';
	if (!obj.id && !obj.name){
		var r = Math.round(Math.random()*100);
		html += 'id="daumActiveXObject'+r+'" name="daumActiveXObject'+r+'" ';
	} else {
		if (obj.id) html += 'id="'+obj.id+'" ';
		if (obj.name) html += 'name="'+obj.name+'" ';
	}
	if (obj.type) html += 'type="'+obj.type+'" ';
	if (obj.width) html += 'width="'+obj.width+'" ';
	if (obj.height) html += 'height="'+obj.height+'" ';
	// append params
	//for (var i in obj.param){
	for( var i=0; i<obj.param.length; i++){

		if (obj.param[i]){
			if (obj.param[i][0]=='movie' || obj.param[i][0]=='src'){
				var _src = obj.param[i][1];
			}
			if (obj.param[i][0].toLowerCase()=='flashvars'){
				if (_src){
					var tmpArr = html.split('src="'+_src+'"');
					html = tmpArr[0]+' src="'+_src+'?'+obj.param[i][1]+'" '+tmpArr[1];
				} else {
					obj.param[obj.param.length] = obj.param[i];
				}
			} else {
				html += obj.param[i][0]+'="'+obj.param[i][1]+'" ';
			}
		}
	}
	html += '/>\n';
	html += '</object>';

	var isIE = (document.all)?true:false;
	if (isIE){
		document.getElementById(div).innerHTML = html;
		void((typeof(AllBGMStop) == 'function')?AllBGMStop():'');
	} else if (obj.type=='application/x-shockwave-flash' || obj.classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'){
		// ie?? ?????? activex? flash? ??? ??
		document.getElementById(div).innerHTML = html;
		void((typeof(AllBGMStop) == 'function')?AllBGMStop():'');
	}
}

	function openMovie(blogid, key, articleno) {
        //var winObj = window.open("/_blog/PopupMovie.do?blogid="+blogid+"&key="+key+"&articleno="+articleno, "", "scrollbars=no, resizable=no, top=0, left=0, width=858, height=670");
		var winObj = window.open("http://tvpot.daum.net/clip/ClipViewBigByVid.do?vid="+key, "", "scrollbars=no, resizable=no, top=0, left=0,width=775,height=625");
    }


function daumEmbed_old(obj,div){
	var isIE = (document.all)?true:false;
	if (isIE){
		/***************** Internet Explorer case *****************/
		
		// create object
		var activeX = document.createElement('object');
	
		// append properties
		activeX.classid = (obj.classid) ? obj.classid : '';
		if (!obj.id && !obj.name) activeX.id = activeX.name = 'daumActiveXObject'+Math.round(Math.random()*100);
		else {
			activeX.id = (obj.id) ? obj.id : obj.name;
			activeX.name = (obj.name) ? obj.name : obj.id;
		}
		activeX.width = (obj.width) ? obj.width : '100%';
		activeX.height = (obj.height) ? obj.height : '100%';
		activeX.codebase = (obj.codebase) ? obj.codebase : '';
	
		// append params
		for (var i in obj.param){
			if (obj.param[i]){
				var p = document.createElement('<param name="'+obj.param[i][0]+'" value="'+obj.param[i][1]+'"\/>');
				activeX.appendChild(p);
			}
		}
		// append activeX object to html document

		//if (obj.classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'){ // flash case
			var tmpDiv = document.createElement('div');
			tmpDiv.appendChild(activeX);
			document.getElementById(div).innerHTML=tmpDiv.innerHTML;
		//} else {
		//	document.getElementById(div).appendChild(activeX);
		//}
	} else {
		/***************** Mozilla case *****************/
		// ie???? ???????????? activex?? flash?? ?????? ????
		if (obj.type=='application/x-shockwave-flash' || obj.classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'){
			var activeX = document.createElement('embed');
			activeX.type = (obj.type) ? obj.type : '';
	
			activeX.classid = (obj.classid) ? obj.classid : '';
			if (!obj.id && !obj.name) activeX.id = activeX.name = 'daumActiveXObject'+Math.round(Math.random()*100);
			else {
				activeX.id = (obj.id) ? obj.id : obj.name;
				activeX.name = (obj.name) ? obj.name : obj.id;
			}
			activeX.width = (obj.width) ? obj.width : '100%';
			activeX.height = (obj.height) ? obj.height : '100%';
			activeX.codebase = (obj.codebase) ? obj.codebase : '';
		
			// append params
			for (var i in obj.param){
				if (obj.param[i]){
					eval('activeX.'+obj.param[i][0]+'=\''+obj.param[i][1]+'\'');
				}
			}
			
			// append activeX object to html document
			document.getElementById(div).appendChild(activeX);
		}
	}
}
