function ShowFlash(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,35,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="opaque">');
        document.write('<param name="zIndex" value="1">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}

function ShowFlash2(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,35,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="transparent">');
        document.write('<param name="zIndex" value="1">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}

function ShowFlash3(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,35,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="opaque">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}


function sizeOn(){
    document.getElementById('layerArea').style.height = 300;
    document.getElementsTagName('div').style.zIndex=8;
    document.getElementById('layerArea').style.zIndex=9999;
}
function sizeOff(){
    document.getElementById('layerArea').style.height = 51;
    document.getElementsTagName('div').style.zIndex=1;
}

    function fun_calendar(tar_day,tag,img_name)
    {
        var sor = eval('document.'+tar_day);
        sor_day = sor.value;

        url = 'calendar_i.php?tar_day='+tar_day+'&sor_day='+sor_day+'&tag='+tag;
        pop_frame_cal.location.href = url;

        yy = 0;
        xx = 0;
        if(img_name!=null)
        {
            obj = eval('document.all.'+img_name);
            var newX = 0;
            var newY = 0;
            if (obj.offsetParent)
            {
                while (obj.offsetParent)
                {
                    newX += obj.offsetLeft;
                    newY += obj.offsetTop;
                    obj = obj.offsetParent;
                }
            }
            else if(obj.x)
            {
                newX += obj.x;
                newY += obj.y;
            }
            yy = newY + 20;
            xx = newX - 120;
        }

        document.all.popCal.style.pixelTop = yy;
        document.all.popCal.style.pixelLeft = xx;
        document.all.popCal.style.visibility = 'visible';
    }


    function fun_user_logout()
    {
        str =  '로그아웃합니다. ';
        result = confirm(str);

        if(result == true)
        {
            location.href = 'user_logout.php';
        }
    }


    function fun_stu_view(id)
    {
        url = 'stu_view.php?id='+id;
        window.open(url,'fun_stu_view','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
    } 


    function fun_image_view(file)
    {
        url = 'http://gwawon.com/shop/pop_image_view.php?img_file='+file;
        window.open(url,'fun_imageview','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
    } 


	// 과일 이미지 보기
    function fun_fruit_view(img_file,img_name)
    {
        url = 'frame_img_fruit_view.php?img_file='+img_file;
        pop_fruit_frame_image.location.href = url;

        yy = 0;
        xx = 0;
        if(img_name!=null)
        {
            obj = eval('document.all.'+img_name);
            var newX = 0;
            var newY = 0;
            if (obj.offsetParent)
            {
                while (obj.offsetParent)
                {
                    newX += obj.offsetLeft;
                    newY += obj.offsetTop;
                    obj = obj.offsetParent;
                }
            }
            else if(obj.x)
            {
                newX += obj.x;
                newY += obj.y;
            }
            yy = newY + 15;
            xx = newX - 200;
        }

        document.all.pop_fruit_image.style.pixelTop = yy;
        document.all.pop_fruit_image.style.pixelLeft = xx;
        document.all.pop_fruit_image.style.visibility = 'visible';
    }
