// image roll
function menuOver() {
	this.src = this.src.replace(".gif", "_on.gif");
}
function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}

function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOn(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

//¸ñ·Ï»óÀÚ ¸µÅ©
function selectGo(dropdownName){
	var page = document.all[dropdownName].value;
	if(page !="") window.open(page);
}

//¸µÅ© ÁÖº¯ Á¡¼± ¾ø¾Ö±â
var myAnchors=document.all.tags("A"); 
function allblur() {
	for (i=0;i<myAnchors.length;i++) { 
		myAnchors[i].onfocus=new Function("blur()");
	} 
}

allblur();

function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function BdoverColor(td){
td.style.backgroundColor="#FAFBFC";//¸¶¿ì½º°¡ ¿Ã¶ó°¬À»¶§ÀÇ »ö»ó ¼³Á¤
}

function BdoutColor(td){
td.style.backgroundColor="#ffffff";//¸¶¿ì½º°¡ ³»·Á¿ÔÀ»¶§ÀÇ »ö»ó ¼³Á¤
}
function onChangeUrl(obj)
{
var destURL = obj.options[obj.selectedIndex].value;
document.location.href = destURL;
}

function styleThumb(status,name)
{
	imgName=eval("thumb_"+name);
	imgName.className="product_style_"+status;
}

function styleThumb01(status,name)
{
	imgName=eval("thumb_"+name);
	imgName.className="product01_style_"+status;
}


// ÆË¾÷
function open_popup(url, wid, hei, scroll, winName)
{
	var url = url;
	var posi = "width="+ wid +",height="+hei+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	if (winName == "")
	{
		winName = popup;
	}
	window.open(url,winName,posi);
}
function winClose()
{
	window.close();
}

function goTop(orix,oriy,desx,desy) {
	var Timer;
	var winHeight = document.body.scrollTop;
	if(Timer) clearTimeout(Timer);
	startx = 0;
	starty = winHeight;
	if(!orix || orix < 0) orix = 0;
	if(!oriy || oriy < 0) oriy = 0;
	var speed = 7;
	if(!desx) desx = 0 + startx;
	if(!desy) desy = 0 + starty;
	desx += (orix - startx) / speed;
	if (desx < 0) desx = 0;
	desy += (oriy - starty) / speed;
	if (desy < 0) desy = 0;
	var posX = Math.ceil(desx);
	var posY = Math.ceil(desy);
	window.scrollTo(posX, posY);
	if((Math.floor(Math.abs(startx - orix)) < 1) && (Math.floor(Math.abs(starty - oriy)) < 1)){
		clearTimeout(Timer);
		window.scroll(orix,oriy);
	}else if(posX != orix || posY != oriy){
		Timer = setTimeout("goTop("+orix+","+oriy+","+desx+","+desy+")",15);
	}else{
		clearTimeout(Timer);
	}
}

function flashMovie(p,w,h){
	flashMovie_2(p, w, h, '<%=tmpLogin%>')
}

function flashMovie_2(p,w,h, code){
	var s_index="";
	var m_flash_movie="";
 	s_index="/include/swf/"+p;
 	flash_vars = "page_code=01"+code;
 	
// alert(flash_vars);
	m_flash_movie+="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='submenu_flash' name='submenu_flash'>";
	m_flash_movie+="<param name='movie' value="+s_index+">";
	m_flash_movie+="<param name='allowScriptAccess' value='always'>";
	m_flash_movie+="<param name='quality' value='high'>";
	m_flash_movie+="<param name='wmode' value='transparent' />";	
	m_flash_movie+="<embed src="+s_index+" wmode='transparent'  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"' allowScriptAccess='always' swLiveConnect=true id='submenu_flash' name='submenu_flash'></embed></object>";	

	document.write(m_flash_movie);
}

//µ¿¿µ»ó js
function boardMovie(val,w,h)
{
 document.writeln("<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codeBase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\"");
 document.writeln("id=\"MPlay1\" width="+w+" height="+h+" type=application/x-oleobject standby=\"Loading Windows Media Player components...\">");
 document.writeln("<param name=\"FileName\" value=\""+val+"\">");
 document.writeln("<param name=\"autostart\" value=\"0\">");
 document.writeln("<param name=\"showstatusbar\" value=\"0\">");
 document.writeln("<PARAM NAME=\"ShowControls\" VALUE=\"0\">");
 document.writeln("<param name=\"showpositioncontrols\" value=\"0\">");
 document.writeln("<param name=\"transparentatstart\" value=\"1\">");
 document.writeln("<param name=\"AutoSize\" value=\"0\">");
 document.writeln("<param name=\"ShowTracker\" value=\"1\">");
 document.writeln("<param name=\"EnableContextMenu\" value=\"5\">");
 document.writeln("<param name=\"ClickToPlay\" value=\"1\"></object>");
}


function mediaMovie(val)
{
 document.writeln("<object ID=\"moviePlayer\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\" VIEWASTEXT width=\"336\" height=\"252\">");
 document.writeln("<param name=\"URL\" value=\""+val+"\">");
 document.writeln("<param name=\"InvokeURLs\" value=\"false\">");
 document.writeln("<param name=\"AllowChangeDisplaySize\" value=\"true\">");
 document.writeln("<param name=\"AnimationAtStart\" value=\"1\">");
 document.writeln("<param name=\"AutoRewind\" value=\"false\">");
 document.writeln("<param name=\"CurrentPosition\" value=\"0\">");
 document.writeln("<param name=\"SetCurrentEntry\" value=\"1\">");
 document.writeln("<param name=\"ClickToPlay\" value=\"false\">");
 document.writeln("<param name=\"AllowScan\" value=\"true\">");
 document.writeln("<param name=\"AutoSize\" value=\"true\">");
 document.writeln("<param name=\"AutoResize\" value=\"1\">");                                 
 document.writeln("<param name=\"AutoStart\" value=\"false\">");                               
 document.writeln("<param name=\"Balance\" value=\"0\">");
 document.writeln("<param name=\"BufferingTime\" value=\"-1\">");
 document.writeln("<param name=\"CursorType\" value=\"0\">");
 document.writeln("<param name=\"CurrentMarker\" value=\"0\">");
 document.writeln("<param name=\"DisplayBackColor\" value=\"0\">");
 document.writeln("<param name=\"DisplayForeColor\" value=\"16777215\">");
 document.writeln("<param name=\"DisplayMode\" value=\"2\">");
 document.writeln("<param name=\"DisplaySize\" value=\"4\">");
 document.writeln("<param name=\"uiMode\" value=\"none\">");
 document.writeln("<param name=\"EnableContextMenu\" value=\"0\">");
 document.writeln("<param name=\"EnableFullScreenControls\" value=\"true\">");
 document.writeln("<param name=\"fullScreen\" value=\"false\">");                                      
 document.writeln("<param name=\"PreviewMode\" value=\"0\">");                                    
 document.writeln("<param name=\"Rate\" value=\"1\">");                                    
 document.writeln("<param name=\"SelectionStart\" value=\"-1\">");
 document.writeln("<param name=\"SelectionEnd\" value=\"-1\">");
 document.writeln("<param name=\"SendOpenStateChangeEvents\" value=\"true\">");
 document.writeln("<param name=\"SendWarningEvents\" value=\"true\">");
 document.writeln("<param name=\"SendErrorEvents\" value=\"true\">");
 document.writeln("<param name=\"SendKeyboardEvents\" value=\"0\">");                                  
 document.writeln("<param name=\"SendPlayStateChangeEvents\" value=\"true\">");
 document.writeln("<param name=\"ShowAudioControls\" value=\"false\">");             
 document.writeln("<param name=\"ShowCaptioning\" value=\"false\">");
 document.writeln("<param name=\"ShowControls\" value=\"false\">");                                     
 document.writeln("<param name=\"ShowDisplay\" value=\"false\">");
 document.writeln("<param name=\"ShowGotoBar\" value=\"false\">");                                        
 document.writeln("<param name=\"ShowPositionControls\" value=\"false\">");
 document.writeln("<param name=\"ShowStatusBar\" value=\"false\">");
 document.writeln("<param name=\"ShowTracker\" value=\"false\">");
 document.writeln("<param name=\"TransparentAtStart\" value=\"false\">");
 document.writeln("<param name=\"VideoBorderWidth\" value=\"0\">");
 document.writeln("<param name=\"VideoBorderColor\" value=\"0\">");
 document.writeln("<param name=\"VideoBorder3D\" value=\"0\">");
 document.writeln("<param name=\"Volume\" value=\"60\">");
 document.writeln("<param name=\"WindowlessVideo\" value=\"false\">");            
 document.writeln("<param name=\"EnablePositionControls\" value=\"true\">");
 document.writeln("<param name=\"EnableTracker\" value=\"true\">");
 document.writeln("<param name=\"Language\" value=\"-1\">");
 document.writeln("<param name=\"Mute\" value=\"false\">");
 document.writeln("<param name=\"PlayCount\" value=\"0\">");             
 document.writeln("<param name=\"SendWarningEvents\" value=\"true\">");
 document.writeln("<param name=\"SendErrorEvents\" value=\"true\">");                    
 document.writeln("<param name=\"SendMouseClickEvents\" value=\"true\">");
 document.writeln("<param name=\"EnableContextMenu\" value=\"true\">");
 document.writeln("</object>");
}

function multimediaMovie(val)
{
 document.writeln("<object ID=\"moviePlayer\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\" VIEWASTEXT width=\"336\" height=\"252\">");
 document.writeln("<param name=\"URL\" value=\""+val+"\">");  //µ¿¿µ»óÁÖ¼Ò 
 document.writeln("<param name=\"InvokeURLs\" value=\"false\">");
 document.writeln("<param name=\"AllowChangeDisplaySize\" value=\"true\">");
 document.writeln("<param name=\"AnimationAtStart\" value=\"1\">");
 document.writeln("<param name=\"AutoRewind\" value=\"false\">");
 document.writeln("<param name=\"CurrentPosition\" value=\"0\">");
 document.writeln("<param name=\"SetCurrentEntry\" value=\"1\">");
 document.writeln("<param name=\"ClickToPlay\" value=\"false\">");
 document.writeln("<param name=\"AllowScan\" value=\"true\">");
 document.writeln("<param name=\"AutoSize\" value=\"true\">");
 document.writeln("<param name=\"AutoResize\" value=\"1\">");                                        
 document.writeln("<param name=\"AutoStart\" value=\"false\">");                                        
 document.writeln("<param name=\"Balance\" value=\"0\">");
 document.writeln("<param name=\"BufferingTime\" value=\"-1\">");
 document.writeln("<param name=\"CursorType\" value=\"0\">");
 document.writeln("<param name=\"CurrentMarker\" value=\"0\">");
 document.writeln("<param name=\"DisplayBackColor\" value=\"0\">");
 document.writeln("<param name=\"DisplayForeColor\" value=\"16777215\">");
 document.writeln("<param name=\"DisplayMode\" value=\"2\">");
 document.writeln("<param name=\"DisplaySize\" value=\"4\">");
 document.writeln("<param name=\"uiMode\" value=\"none\">");
 document.writeln("<param name=\"EnableContextMenu\" value=\"0\">");
 document.writeln("<param name=\"EnableFullScreenControls\" value=\"true\">");
 document.writeln("<param name=\"fullScreen\" value=\"false\">");                                        
 document.writeln("<param name=\"PreviewMode\" value=\"0\">");                                        
 document.writeln("<param name=\"Rate\" value=\"1\">");                                        
 document.writeln("<param name=\"SelectionStart\" value=\"-1\">");
 document.writeln("<param name=\"SelectionEnd\" value=\"-1\">");
 document.writeln("<param name=\"SendOpenStateChangeEvents\" value=\"true\">");
 document.writeln("<param name=\"SendWarningEvents\" value=\"true\">");
 document.writeln("<param name=\"SendErrorEvents\" value=\"true\">");
 document.writeln("<param name=\"SendKeyboardEvents\" value=\"0\">");                                        
 document.writeln("<param name=\"SendPlayStateChangeEvents\" value=\"true\">");
 document.writeln("<param name=\"ShowAudioControls\" value=\"false\">");                
 document.writeln("<param name=\"ShowCaptioning\" value=\"false\">");
 document.writeln("<param name=\"ShowControls\" value=\"false\">");                                        
 document.writeln("<param name=\"ShowDisplay\" value=\"false\">");
 document.writeln("<param name=\"ShowGotoBar\" value=\"false\">");                                        
 document.writeln("<param name=\"ShowPositionControls\" value=\"false\">");
 document.writeln("<param name=\"ShowStatusBar\" value=\"false\">");
 document.writeln("<param name=\"ShowTracker\" value=\"false\">");
 document.writeln("<param name=\"TransparentAtStart\" value=\"false\">");
 document.writeln("<param name=\"VideoBorderWidth\" value=\"0\">");
 document.writeln("<param name=\"VideoBorderColor\" value=\"0\">");
 document.writeln("<param name=\"VideoBorder3D\" value=\"0\">");
 document.writeln("<param name=\"Volume\" value=\"60\">");
 document.writeln("<param name=\"WindowlessVideo\" value=\"false\">");            
 document.writeln("<param name=\"EnablePositionControls\" value=\"true\">");
 document.writeln("<param name=\"EnableTracker\" value=\"true\">");
 document.writeln("<param name=\"Language\" value=\"-1\">");
 document.writeln("<param name=\"Mute\" value=\"false\">");
 document.writeln("<param name=\"PlayCount\" value=\"0\">");             
 document.writeln("<param name=\"SendWarningEvents\" value=\"true\">");
 document.writeln("<param name=\"SendErrorEvents\" value=\"true\">");                    
 document.writeln("<param name=\"SendMouseClickEvents\" value=\"true\">");
 document.writeln("<param name=\"EnableContextMenu\" value=\"true\">");
 document.writeln("</object>");
}
                   

//ÇÃ·¡½Ã js



function navRollOver(obj, state,namet) {
 document.getElementById(obj).className = (state == 'on') ?  namet+"On" : namet+"Off";
}

//°¶·¯¸® ÆË¾÷·¹ÀÌ¾î(2011.08.31 ÀÌÁÖ¿ë ¼öÁ¤)
// Âü°í URL : http://blog.naver.com/csaiur?Redirect=Log&logNo=10020727978
function popGallery(titleN, imgN, gubun) {

	var ie=document.all
	var ns=document.layers
	var ns6=document.getElementById&&!document.all
	var layerId = document.getElementById("layerG").style;
	var eventTitle = document.getElementById("eventTitle");
	var eventImg = document.getElementById("eventImg");
	
	layerId.display='block';
	//document.all.layerG.style.left=event.clientX
	//document.all.layerG.style.top=event.clientY
	//layerId.left=document.body.scrollLeft+event.clientX
	//layerId.top=document.body.scrollTop+event.clientY

	// 2011.08.31 ÀÌÁÖ¿ë ¼öÁ¤ DTDÁ¤ÀÇ¿¡ ÀÇÇØ¼­ ScrollTopÀÌ ÀÎ½ÄÇÏÁö ¸øÇÏ±â ¶§¹®¿¡ º¯°æ
	//layerId.top=document.body.scrollTop+50
	//layerId.left=document.body.scrollLeft+190
	//alert(document.documentElement.scrollTop);
	layerId.top=document.documentElement.scrollTop + 100;
	layerId.left=document.documentElement.scrollLeft + 190;

	eventTitle.innerHTML = "<img src='/images/cis/bull_layer.gif' > "+titleN;

	if (gubun!='photo')
	{
		eventImg.innerHTML = "<img src='"+imgN+"' name ='popImage' onLoad = 'onPopResize();'>";
	}

	
	if(imgN== 0){
		layerId.display='none';
	}
}
function onPopResize()
{
	var imgs = document.popImage;

	if(imgs != null)
	{
		if (imgs.length > 0)
		{
			for (var i=0; i<imgs.length; i++) 
			{
				if (document.popImage[i].width > 600)
					document.popImage[i].width = 600;
			}
		}
		else
		{
			if (document.popImage.width > 600)
				document.popImage.width = 600;
		}
	}
		
}

//¸ÞÀÎCISÇÁ·Î±×·¥
var programN="0";

function proGramM(imgn01,imgN) {
	programN = imgN;
	document.images['programitem'].src ="../images/main/item_program0"+imgN+".gif";
	}
	
function proGramLink() {
	if(programN == 1){
		imgN = "structure";
	}else if(programN == 2){
		imgN = "structure_02";
		}else if(programN == 3){
		imgN = "structure_03";
		}else if(programN == 4){
		imgN = "structure_04";
	}
	
	location.href ="../html/program/"+imgN+".asp";

}




function flashMovie_2(p,w,h, code){
	var s_index="";
	var m_flash_movie="";
 	s_index="/include/swf/"+p+"?basic_path=/include/swf/"
 	flash_vars = "login_ck="+code;
 	
	m_flash_movie+="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='submenu_flash' name='submenu_flash'>";
	m_flash_movie+="<param name='movie' value="+s_index+">";
	m_flash_movie+="<param name='FlashVars' value='"+flash_vars+"'>";
	m_flash_movie+="<param name='allowScriptAccess' value='always'>";
	m_flash_movie+="<param name='quality' value='high'>";
	m_flash_movie+="<param name='wmode' value='transparent' />";	
	m_flash_movie+="<embed src="+s_index+" wmode='transparent'  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"' allowScriptAccess='always' swLiveConnect=true id='submenu_flash' name='submenu_flash'></embed></object>";	

	document.write(m_flash_movie);
}


function topmenu(tmpLogin)
{
	flash_vars = "login_ck="+tmpLogin;

    if	(topnaviNum == "04020") {topnaviNum = "04010";}
	else if (topnaviNum == "04040") {topnaviNum = "04020";}
	else if (topnaviNum == "04010") {topnaviNum = "04020";}

	document.writeln("<div id=\"containerT\">");
	document.writeln("<div id=\"logo\" style=\"background:url(/images/common/title_"+topFirstNum+".gif) 31px 129px  no-repeat;padding:33px 20px 0 50px;\"><a href=\"/main.asp\"><img src=\"/images/common/logo.gif\" alt=\"\" /></a></div>");
	document.writeln("<div id=\"topNavi\">");
	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='761' height='231'>");
	document.writeln("<param name=movie value='/include/swf/TopNavi_W.swf?basic_path=/include/swf/&page_code="+topnaviNum+"'>");
	document.writeln("<param name='FlashVars' value='"+flash_vars+"'>");
	document.writeln("<param name='allowScriptAccess' value='always'>");
	document.writeln("<param name=wmode value=transparent>");
	document.writeln("<embed src='/include/swf/TopNavi_W.swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='761' height='231'></object>");
	
	document.writeln("</div>");

}

// 2011.09.01 ÀÌÁÖ¿ë Ãß°¡ / »ó´Ü Menu Flash Player
function TopNaviFlashPlayer()
{
	topnaviNum = "";	
	
	if (typeof(route) == "string")
	{
		topnaviNum = route;
	} else {
		topnaviNum = "";
	}

	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='660' height='79'>");
	document.writeln("<param name=movie value='/flash/topNavi.swf?basic_path=/flash/&page_code="+ topnaviNum +"'>");
	document.writeln("<param name='allowScriptAccess' value='always'>");
	document.writeln("<param name=wmode value=transparent>");
	document.writeln("<embed src='/flash/topNavi.swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='660' height='79'></object>");
}




//ÆË¾÷Ã¢ ÇÏ·ç¸¸ ¶ç¿ì±â

function getCookie(name) { 
var Found = false 
var start, end 
var i = 0 
 
while(i <= document.cookie.length) { 
start = i 
end = start + name.length 
 
if(document.cookie.substring(start, end) == name) { 
Found = true 
break 
} 
i++ 
} 
 
if(Found == true) { 
start = end + 1 
end = document.cookie.indexOf(";", start) 
if(end < start) 
end = document.cookie.length 
return document.cookie.substring(start, end) 
} 
return "" 
} 
 
function openPopupT() 
{ 
var noticeCookie=getCookie("CookieName");  // ÄíÅ°³×ÀÓ ÁöÁ¤
if (noticeCookie != "no") 
window.open('http://globaledu.cdi.co.kr/html/popup/popup061108.asp','Notice','width=420,height=475,top=50,left=150'); 
} 

//<![CDATA[
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
//	obj.bottomLimit = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - btmLimit - obj.offsetHeight;
	//2011.09.01 ÀÌÁÖ¿ë ¼öÁ¤ / ½ºÅ©·Ñ¿¡ µû¶ó Quick ¸Þ´º µû¶ó´Ù´Ïµµ·Ï bottomLimit °ª ¼öÁ¤
	obj.bottomLimit = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {	//WebKit
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return Math.max(document.documentElement.scrollTop, document.body.scrollTop);
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {	//WebKit
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}
//]]

 function setEmbed() 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 

  this.init = function( getType , s ,w , h, oId ) { 
      if ( getType == "flash") 
      { 
        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 
      } 
      else if (getType == "movie" ) 
      { 
      		clsid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"	;
      		codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ;
      		embedType="application/x-oleobject" ;
      		//embedType="application/x-mplayer2";
		pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp"
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */
            
      parameter += "<param name='movie' value='"+ s + "'>\n";  
      parameter += "<param name='quality' value='high'>\n";    
      
      
      src = s; 
      width = w; 
      height = h; 
      objId= oId;
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  

  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object id=" + objId + " classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"' value='" + objId + "'>\n"; 
      } 
      	embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n"; 

      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      html = obj + parameter + embed; 
      document.write( html );  

	if ( objId)
      	{	
      			var Objv = document.getElementById(objId);
      			if (Objv.value==objId) {
      				eval("document." + objId + ".focus();");
      			}
    	}
  } 
}

