// write flash file to div
function writeFlash(obj, myurl, w, h){
	var ebd = document.createElement("embed");

	ebd.src = myurl;
	ebd.width = w;
	ebd.height = h;
	obj.appendChild(ebd);
}

function closeFlash(){
	var dark = document.getElementById("make_dark");
	var flash = document.getElementById("flash");
	var obj = document.getElementById("video");
	
	flash.innerHTML = ""; //obj.removeChild(ebd);
	obj.style.display = 'none';
	dark.style.display = 'none';
}

function getBrowserSize(){
  var myWidth = 0, myHeight = 0;
  var brsize = new Array();
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
  brsize['width'] = myWidth;
  brsize['height'] = myHeight;
  return brsize;
}

/** Get Information Browser **************************************************************************/
function userAgent(){
 if(navigator.userAgent.indexOf("MSIE") !=-1) return "IE";
 else if(navigator.userAgent.indexOf("Firefox") !=-1) return "FF";
 else if(navigator.userAgent.indexOf("Mozilla") !=-1) return "MZ";
 else if(navigator.userAgent.indexOf("Opera") !=-1) return "OP";
 else if(navigator.userAgent.indexOf("Mac") !=-1) return "MC";
 else return "NG"; // Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀú
}

	
function getOpacity(obj){
	if(obj.style.opacity) return (obj.style.opacity*100);						// support CSS3 borwoser
	if(obj.style.MozOpacity) return (obj.style.MozOpacity*100);		//	older versions of Mozilla and Phoenix/FireBird/FireFox.
	if(obj.style.KhtmlOpacity) return (obj.style.KhtmlOpacity*100);  // KHTML rendering engine, namely Konquerer on Linux and Safari on MacOS.
		if(obj.style.filter){ 																											// Only IE
			var opacity = obj.style.filter.match(/alpha\(opacity=(.*)\)/);
			return opacity[1];
		}
		return 100;
}
	
function setOpacity(obj_id, value){		
	var obj = document.getElementById(obj_id);
	obj.style.opacity = (value / 100);
  	obj.style.MozOpacity = (value / 100);
  	obj.style.KhtmlOpacity = (value / 100);
  	obj.style.filter = "alpha(opacity=" + value + ")";
}
	
function increaseOpacity(obj, value){
	for(i=0;i<=value;i++) setTimeout("setOpacity('" + obj.id + "'," + i + ")",(i * 10)); 
}