/*
/_themes/default/lib
*/
<!--
function global_open_window(url, name, top, left, 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';
    window.open(url, name, 'top='+top+', left='+left+', width='+width+', height='+height+', toolbar='+toolbar_str+', menubar='+menubar_str+', status='+statusbar_str+', scrollbars='+scrollbar_str+', resizable='+resizable_str);
}
function check_delete(){
    if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n¸ðµçÀÚ·á°¡ »èÁ¦°¡ µË´Ï´Ù.\n\n»èÁ¦½Ã´Â ½ÅÁßÇÏ°Ô ÇÏ¼¼¿ä\n\n»èÁ¦µÈ ÀÚ·á´Â º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù. ")){
    return true;
    } else {
    return false;
    }
}
function global_ImgResize(Img, width, height) {
    Img.style.visibility = 'hidden';
    MidImg = new Image;
    MidImg.src = Img.src;
    y = Img.height;
    x = Img.width;

    imgcount = 1;
    while (!y) {
        MidImg = new Image;
        MidImg.src = Img.src;
        y = MidImg.height;
        x = MidImg.width;
        imgcount = imgcount + 1;
        if (imgcount == height) y = imgcount;
    }

    x = MidImg.width;
    y = MidImg.height;

    if (x > width || y > height) {
        if (x > width) {
            x_rate = width/x;
            y_s = x_rate * y;
            x_s = width;
            if (y_s > height) {
                y_s_rate = height / y_s;
                x_s = x_s * y_s_rate;
                y_s = height;
            }
        } else {
            y_rate = height/y;
            x_s = y_rate * x;
            y_s = height;
        }
    } else {
        x_s = x;
        y_s = y;
    }
    Img.height = y_s;
    Img.width = x_s;

    Img.style.visibility = 'visible';
}
/*Ç×»óÀ§
vv=window.open...........

function chk(){
if(vv && !vv.closed) vv.focus()
}
document.onmousedown=chk
document.onkeydown=chk
*/
function Go_Link(num,theme,dir,part)
{
	var admin_url = "/modules";
	if(part==0) dir	= dir+num;
	url 	= admin_url+"/"+theme+"/"+dir+"/index.php";
	location.href(url);
}

function allcheck_profit(theform)
{
	tot	= document.mainform.checkcnt.value;
	if(tot)
	{
		for (i=0; i<eval("document.mainform['profit']").length; i++)
		{
			var is_check 				= eval("document.mainform['profit'][" + i + "]").checked;
			if(is_check ==false)
				eval("document.mainform['profit'][" + i + "]").checked = true;
		}
	}
	return;
}
function discheck_profit(theform)
{
	tot	= document.mainform.checkcnt.value;
	if(tot)
	{
		for (i=0; i<eval("document.mainform['profit']").length; i++)
		{
			eval("document.mainform['profit'][" + i + "]").checked = false;
		}
	}
	return;
}

function image_preview(d,w,h) {
	var photoimg	= event.srcElement.value;
	var name			= event.srcElement.name;
	if(photoimg.indexOf("'") != -1) {
		alert("ÆÄÀÏÀÌ¸§¿¡ \" ' \" ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	d.innerHTML = "<img src='"+photoimg+"' border='0' width="+w+" height="+h+">";
}


function ImageFlash_preview(d,w,h)
{
	var photoimg	= event.srcElement.value;
	var name			= event.srcElement.name;
	if(photoimg.indexOf("'") != -1)
	{
		alert("ÆÄÀÏÀÌ¸§¿¡ \" ' \" ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	if(photoimg.indexOf(".swf") != -1)
	{

	}
	else
	{
		d.innerHTML = "<img src='"+photoimg+"' border='0' width="+w+" height="+h+">";
	}
}

function ImageView(imgsrc)
{
	window.open("/admin/_modules/public/m_image_view.php?name="+imgsrc,"images","top=10,left=10,width=200,height=200");
}

function clickshow2(el,currentnumber,startnumber,endnumber)
{
	for (i=startnumber;i<endnumber;i++)
	{
		menu=eval(el+currentnumber+".style");
		if (currentnumber==i)
		{
			if (menu.display=="block")
			{
				menu.display="none";
			}
			else
			{
				menu.display="block";
			}
		}
	}
}
function otherhidden2(el,currentnumber,startnumber,endnumber)
{
	for (i=startnumber;i<endnumber;i++)
	{
		menu=eval(el+i+".style");
		if (currentnumber==i)
		{
			menu.display="block";
		}else{
			menu.display="none";
		}
	}
}

function flash(c,d,e) {
 var flash_tag = "";
 flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
 flash_tag +='WIDTH="'+c+'" HEIGHT="'+d+'" >';
 flash_tag +='<param name="wmode" value="transparent">'; 
 //ÀÌºÎºÐÀº ÇÃ·¡½¬ ¹è°æÀ» Åõ¸íÀ¸·Î ¼³Á¤ÇÏ´Â ºÎºÐÀ¸·Î ÇÊ¿ä¾ø´Ù¸é »èÁ¦ÇØµµ ¹«¹æÇÔ
 flash_tag +='<param name="movie" value="'+e+'">';
 flash_tag +='<param name="quality" value="high">';
 flash_tag +='<embed src="'+e+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
 flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+c+'" HEIGHT="'+d+'"></embed></object>'
 document.write(flash_tag);
}

//-->