//-----------------------------------------------------
/*****          TOP ¸Þ´º Æ®·£Áö¼Ç È¿°ú          ******/
//-----------------------------------------------------
// ÀÛ¼ºÀÚ : ±è¹Ì¼± & ÀÛ¼ºÀÏÀÚ : 2008.06.12
// Ãß°¡ÀÚ :        & Ãß°¡ÀÏÀÚ : 2008.   . 
//-----------------------------------------------------
function bt(name,after)
{
eval(name+'.filters.blendTrans.stop();');
eval(name+'.filters.blendTrans.Apply();');
eval(name+'.src="'+after+'";');
eval(name+'.filters.blendTrans.Play();');
}


function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}





//-----------------------------------------------------
/*****                 »õÃ¢¿­±â                    *****/
//-----------------------------------------------------
//-----------------------------------------------------
// ÀÛ¼ºÀÚ : ±è¹Ì¼± & ÀÛ¼ºÀÏÀÚ : 2008.06.12
// Ãß°¡ÀÚ :        & Ãß°¡ÀÏÀÚ : 2008.   . 
//-----------------------------------------------------
function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_end    = cookie_str.indexOf('=', pos_start);

  cookie_name = cookie_str.substring(pos_start, pos_end);

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_name == name && cookie_val  == "done")
    return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

//-----------------------------------------------------
/*****            ÇÃ·¡½¬ ÆÐÄ¡ ¼Ò½º             *****/
//-----------------------------------------------------
// ÀÛ¼ºÀÚ : ±è¹Ì¼± & ÀÛ¼ºÀÏÀÚ : 2008.06.12
// Ãß°¡ÀÚ :        & Ãß°¡ÀÏÀÚ : 2008.   . 
//-----------------------------------------------------
//function MakeFlashString(source,id,width,height,wmode, otherParam)
//{	
	//return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high />"+otherParam+"<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
//}

//function MakeObjectString(classid, codebase, name, id, width,height, param)
//{
	//return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
//}

// innerHTML Type
//function SetInnerHTML(target, code)
//{ 
	//target.innerHTML = code; 
//}

// Direct Write Type
//function DocumentWrite(src)
//{
	//document.write(src);
//}

function playflash(file,width,height,bgcolor,quality,name){
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="'+name+'">');  //ÇÃ·¡½¬ÇÃ·¹ÀÌ¾î ¹öÀüÀÌ ÀÌÀü¹öÀüÀÏ°æ¿ì ¹öÀü 8À» º¯°æ
        document.write('<param name="movie" value="'+file+'" />');
        document.write('<param name="quality" value="'+quality+'" />');
        document.write('<param name="wmode" value="transparent" />');  //Åõ¸íÇÃ·¡½¬°¡ ¾Æ´Ò°æ¿ì ÀÌ ¶óÀÎÀ» »èÁ¦
        document.write('<param name="bgcolor" value="'+bgcolor+'" />');
        document.write('<embed src="'+file+'" quality="'+quality+'"bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="'+name+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>')
}





//----------------------------------------------
/***** ¾ÆÀÌÇÁ·¹ÀÓ »çÀÌÁîÁ¶Á¤  *****/
//----------------------------------------------
// ÀÛ¼ºÀÚ : ±è¹Ì¼± & ÀÛ¼ºÀÏÀÚ : 2008.06.12
// Ãß°¡ÀÚ :        & Ãß°¡ÀÏÀÚ : 2008.   . 
//-----------------------------------------------------
// iframe ÀÚµ¿Áõ°¡ ½ºÅ©¸³Æ®  iframe »ç¿ë½Ã ÇÊ¼ö 

    /*var iiframeids=["ifrm"] // iiframe ¿¡ »ç¿ëÇÒ ID ¸¦ iftmÀ¸·Î ÁöÁ¤ÇÒ°Í
    var iiframehide="yes"
    function resizeCaller() {
        var dyniframe=new Array();
        for (i=0; i<iiframeids.length; i++) {
            if (document.getElementById) {          
                resizeIframe(iiframeids[i]);                
            }
            if ((document.all || document.getElementById) && iiframehide=="no") {
                var tempobj=document.all? document.all[iiframeids[i]] : document.getElementById(iiframeids[i]);
                tempobj.style.display="block";
            }
        }
    }
    
    function resizeIframe(frameid) {    
        var currentfr = document.getElementById(frameid);
        var pacurrentfr = parent.document.getElementById(frameid);
		if(pacurrentfr == null) pacurrentfr = top.main.document.getElementById(frameid);
		if (currentfr && !window.opera) {
            currentfr.style.display="block";
            if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) { //ns6 syntax
                currentfr.height = currentfr.contentDocument.body.offsetHeigh; 
                if(pacurrentfr != null) 
                pacurrentfr.height = currentfr.contentDocument.body.offsetHeight; 
            } else if (currentfr.Document && currentfr.Document.body.scrollHeight) { //ie5+ syntax
                currentfr.height = currentfr.Document.body.scrollHeight;
                if(pacurrentfr != null) 
                pacurrentfr.height = currentfr.Document.body.scrollHeight;
            }

            if (currentfr.addEventListener) {
                currentfr.addEventListener("load", readjustIframe, false);
            } else if (currentfr.attachEvent) {
                currentfr.detachEvent("onload", readjustIframe)  // THIS ONE
                currentfr.attachEvent("onload", readjustIframe);
            }
        }    
    }

    function readjustIframe(loadevt) {
        var crossevt=(window.event)? event : loadevt;
        var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement;
        if (iframeroot) {
            resizeIframe(iframeroot.id);
        }
    }

    function loadintoIframe(iframeid, url) {
        if (document.getElementById) {
            document.getElementById(iframeid).src=url;
        }
    }

    if (window.addEventListener) {
        window.addEventListener("load", resizeCaller, false);
    } else if (window.attachEvent) {
        window.attachEvent("onload", resizeCaller);
    } else {
        window.onload=resizeCaller;
    }


function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
*/

function iframe_autoresize(arg) {
arg.height = 
eval(arg.name+".document.body.scrollHeight");
}