﻿document.domain = "mymovieup.com";
    
    var Status_titles = "MovieUP Solution & Service(ASP) MyMovieUP";
    window.status=Status_titles;

    //document.oncontextmenu = nocontextmenu;   // IE5+ 용
    //document.onmousedown = norightclick;      // 다른 브라우저 용
    	
    function processKey()
    {
     if((event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) || (event.keyCode > 112 && event.keyCode <= 123)){
      event.keyCode = 0;
      event.cancelBubble = true;
      event.returnValue = false;
     }
    }

    document.onkeydown = processKey;

    if (navigator.appName == "Netscape")       //넷스케이프에서만 대문자 E.
    {
        document.captureEvents(Event.MOUSEUP); // mouse up 이벤트를 잡음
    }

    function nocontextmenu() // IE4에서만 적용, 다른 브라우저는 무시
    {
        event.cancelBubble = true;
        event.returnValue = false;
        return false;
    }

    function norightclick(e)   // 다른 모든 브라우저에서 작동
    {
        if (navigator.appName == "Netscape")   // 다시, IE 또는 NAV ?
        {
            if (e.which == 2 || e.which == 3)
                return false;
        }
        else {
            if (event.button == 2 || event.button == 3) {
                event.cancelBubble = true;
                event.returnValue = false;
                return false;
            }
        }
    }
    	
    function DropShadowOpen(num) {

        for( var i=1; i<12; i++)
        {
            if(i == num) {
                show=eval("document.all.show"+num)
                show.style.display = 'block';
                return;
            }
            else {
                eval("document.all.show"+i).style.display = 'none';
            }
        }
    }

    function DropShadowClose(num) {
        show=eval("document.all.show"+num)
        show.style.display = 'none';
    }


    function DropShadowDepth2StorageOpen(num) {

        for( var i=1; i<12; i++)
        {
            if(i == num) {
                show=eval("document.all.Depth2Storage"+num)
                show.style.display = 'block';
            }
            else {
                try{
                    eval("document.all.Depth2Storage"+i).style.display = 'none';
                } catch(e) {
                }
            }
            
        }
    }

    function DropShadowDepth2StorageClose(num) {
        show=eval("document.all.Depth2Storage"+num)
        show.style.display = 'none';
    }

    function DropShadowDepth2PlayerOpen(num) {

        for( var i=1; i<12; i++)
        {
            if(i == num) {
                show=eval("document.all.Depth2Player"+num)
                show.style.display = 'block';
                return;
            }
            else {
                eval("document.all.Depth2Player"+i).style.display = 'none';
            }
        }
    }

    function DropShadowDepth2PlayerClose(num) {
        show=eval("document.all.Depth2Player"+num)
        show.style.display = 'none';
    }

    function DropShadowDepth2UploaderOpen(num) {

        for( var i=1; i<12; i++)
        {
            if(i == num) {
                show=eval("document.all.Depth2Uploader"+num)
                show.style.display = 'block';
                return;
            }
            else {
                eval("document.all.Depth2Uploader"+i).style.display = 'none';
            }
        }
    }

    function DropShadowDepth2UploaderClose(num) {
        show=eval("document.all.Depth2Uploader"+num)
        show.style.display = 'none';
    }


    function IFrame_OnLoad() { 
        self.resizeTo(document.body.scrollWidth +10 , document.body.scrollHeight + 100);        
    }
    function IFrame_OnLoad_GoodsInfo() {
        self.resizeTo(document.body.scrollWidth +10 , document.body.scrollHeight + 15);        
        SetDate();
    }

    function IFrame1_OnLoad() {
//        top.document.getElementById('Iframe1').style.height = document.body.scrollHeight + 50;
        //        top.document.getElementById('Iframe1').style.width = document.body.scrollWidth;
        self.resizeTo(document.body.scrollWidth, document.body.scrollHeight + 50);
    }

    function IFrame2_OnLoad() {
//        parent.document.getElementById('Iframe2').style.height = document.body.scrollHeight;
        //        parent.document.getElementById('Iframe2').style.width = document.body.scrollWidth;
        self.resizeTo(document.body.scrollWidth, document.body.scrollHeight);
    }

    function IFrame3_OnLoad() {
        //        parent.document.getElementById('Iframe2').style.height = document.body.scrollHeight;
        //        parent.document.getElementById('Iframe2').style.width = document.body.scrollWidth;
        self.resizeTo(document.body.scrollWidth, document.body.scrollHeight + 50);
    }


    function IFrame1_OnLoad_Top() {
        //        parent.document.getElementById('Iframe2').style.height = document.body.scrollHeight;
        //        parent.document.getElementById('Iframe2').style.width = document.body.scrollWidth;
        parent.document.getElementById('Iframe2').style.height = document.body.scrollHeight + 50;
        top.document.getElementById('Iframe1').style.height = parent.document.body.scrollHeight;
    }

    function IFrame2_OnLoad_Top() {
        //        parent.document.getElementById('Iframe2').style.height = document.body.scrollHeight;
        //        parent.document.getElementById('Iframe2').style.width = document.body.scrollWidth;

        parent.document.getElementById('Iframe_SkinList').style.height = document.body.scrollHeight;
        parent.parent.document.getElementById('SkinList').style.height = parent.document.body.scrollHeight;
        parent.parent.parent.document.getElementById('Iframe2').style.height = parent.parent.document.body.scrollHeight;
        parent.parent.parent.parent.document.getElementById('Iframe2').style.height = parent.parent.parent.document.body.scrollHeight;
        top.document.getElementById('Iframe1').style.height = parent.parent.parent.parent.document.body.scrollHeight;
    }

    function RadioOnSelect(GoodsData) {

        //document.getElementById("ddlPackageList").value = "DI00004A";
        document.getElementById("txtSelection").value = "Customizable Products";

        var strGoodsData = GoodsData.split(";");



        document.getElementById("hdGoodsID").value = strGoodsData[0];
        document.getElementById("hdGoodsInfo").value = strGoodsData[1];
        document.getElementById("hdAddedInfo").value = strGoodsData[2];
        document.getElementById("hdGoodsName").value = strGoodsData[3];
        document.getElementById("hdEarlySetPrice").value = strGoodsData[4];
        document.getElementById("hdAgreedVolume").value = strGoodsData[5];
        document.getElementById("hdAgreedPrice").value = strGoodsData[6];

        if (document.getElementById("hdStorageMonthLimit").value != "") {
            document.getElementById("hdMonthLimit").value = document.getElementById("hdStorageMonthLimit").value;
        }
        else {
            document.getElementById("hdMonthLimit").value = strGoodsData[7];
        }

        document.getElementById("hdUseCount").value = strGoodsData[8];
        document.getElementById("hdExcessVolume").value = strGoodsData[9];
        document.getElementById("hdExcessPrice").value = strGoodsData[10];

        //document.getElementById("hdMode").value = "Yes";
        document.getElementById("btnUpdateUseCharge").click();
        //document.getElementById("btnIndividualPackage").click();

        /*
        var Inputcollection = self.document.getElementsByTagName("input");

        for(nI = 0; nI < Inputcollection.length; nI++)
        {
        var ic = Inputcollection[nI];
        
        if (ic.type == "radio")
        {
        //document.getElementById(ic.name).checked = false;
        alert("DD");
        document.form1.FirstNameTextBox.value = "DDDD";
        document.form1.LastNameTextBox.value = "AAAAA";
        //var pCtg = eval("document.form."+CateName);
        var pCtg = eval("document.form1."+ name);
                
        document.getElementById("Button1").click();
        }
        }
        */
    }

    function RadioOnSelectNotUse(GoodsInfo, DepthID) {
        document.getElementById("hdGoodsInfo").value = GoodsInfo;
        document.getElementById("hdGoodsID").value = GoodsInfo;
        document.getElementById("hdAddedInfo").value = DepthID;
        document.getElementById("hdUse").value = "Delete";

        document.getElementById("btnUpdateUseCharge").click();
    }

    function StorageUseMonth()
    {
        var nStorageMonthLimit = parseInt(document.getElementById("hdStorageMonthLimit").value);
        var strLongTimeUseMonth = document.getElementById("hdLongTimeUseMonth").value;
        var strLongTimeUseDiscountPrice1 = document.getElementById("hdLongTimeUseDiscountPrice1").value;
        var strLongTimeUseDiscountPrice2 = document.getElementById("hdLongTimeUseDiscountPrice2").value;
        
        document.all["lblLongTimeUseMonth"].innerHTML = strLongTimeUseMonth;	
        document.all["lblLongTimeUseDiscountPrice1"].innerHTML = strLongTimeUseDiscountPrice1;	
        document.all["lblLongTimeUseDiscountPrice2"].innerHTML = strLongTimeUseDiscountPrice2;	
        document.all["hdLongTimeUseDiscount"].value = nStorageMonthLimit;	
        
        if(document.getElementById("hdPackageCode").value != "")
        {
        //alert(document.getElementById("txtStorageToDate").value);
            document.getElementById("txtPlayerFromDate").value = document.getElementById("txtStorageFromDate").value;
            document.getElementById("txtUploaderFromDate").value = document.getElementById("txtStorageFromDate").value;
            
            document.getElementById("txtPlayerToDate").value = document.getElementById("txtStorageToDate").value;
            document.getElementById("txtUploaderToDate").value = document.getElementById("txtStorageToDate").value;
            
            document.getElementById("hdMode").value = "Yes";
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function PlayerUploaderUseMonth()
    {
        var strStorageUseMonth = document.getElementById("hdStorageUseMonth").value;
        
        document.all["LongTimeUseDiscountPrice1"].innerHTML = "-"+ strStorageUseMonth;	
        document.all["LongTimeUseDiscountPrice2"].innerHTML = "-"+ strStorageUseMonth;	
        document.all["hdLongTimeUseDiscount"].value = strStorageUseMonth;	
        
    }

    function InsertServiceCharge()
    {
        var strSumEarlySetPrice = document.getElementById("hdSumEarlySetPrice").value;
        var strSumAgreedPrice = document.getElementById("hdSumAgreedPrice").value;
        var strAgreedPriceDiscount = document.getElementById("hdAgreedPriceDiscount").value;
        var strSummaryPayCharge = document.getElementById("hdSummaryPayCharge").value;
        var strTotalPayCharge = document.getElementById("hdTotalPayCharge").value;
        var strLongTimeUseMonth = document.getElementById("hdLongTimeUseMonth").value;
        var strLongTimeUseDiscountPrice1 = document.getElementById("hdLongTimeUseDiscountPrice1").value;
        var strLongTimeUseDiscountPrice2 = document.getElementById("hdLongTimeUseDiscountPrice2").value;
        var strDiscountTitle = document.getElementById("hdDiscountTitle").value;
        var strEarlySetPriceDiscount = document.getElementById("hdEarlySetPriceDiscount").value;
        var strAgreedPriceDiscount = document.getElementById("hdAgreedPriceDiscount").value;

        var strEarlyDiscount = document.getElementById("hdEarlyDiscount").value;
        var strAgreedDiscount = document.getElementById("hdAgreedDiscount").value;
        
        document.all["lblLongTimeUseMonth"].innerHTML = strLongTimeUseMonth;	
        document.all["lblLongTimeUseDiscountPrice1"].innerHTML = strLongTimeUseDiscountPrice1;	
        document.all["lblLongTimeUseDiscountPrice2"].innerHTML = strLongTimeUseDiscountPrice2;
        
        document.all["lblSumEarlySetPrice"].innerHTML = strSumEarlySetPrice;	
        document.all["lblSumAgreedPrice"].innerHTML = strSumAgreedPrice;	
        document.all["lblSummaryPayCharge"].innerHTML = strSummaryPayCharge;
        document.all["lblTotalPayCharge"].innerHTML = strTotalPayCharge;
        
        document.all["lblDiscountTitle"].innerHTML = strDiscountTitle;
        document.all["lblEarlySetPrice"].innerHTML = strEarlyDiscount;
        document.all["lblAgreedPrice"].innerHTML = strAgreedDiscount;
        document.all["lblEarlySetPriceDiscount"].innerHTML = strEarlySetPriceDiscount;
        document.all["lblAgreedPriceDiscount"].innerHTML = strAgreedPriceDiscount;
    }

    function SumDiscount(strSumDiscount)
    {
        document.all["SumDiscount"].innerHTML = strSumDiscount;	
    }

    function TotalServiceCharge(strTotalServiceCharge)
    {
        document.all["TotalServiceCharge"].innerHTML = strTotalServiceCharge;	
    }

    function Surtax(strSurtax)
    {
        document.all["Surtax"].innerHTML = strSurtax;	
    }

    function TotalPayCharge(strTotalPayCharge)
    {
        document.all["TotalPayCharge"].innerHTML = strTotalPayCharge;	
    }

    function CheckboxOnSelect(Field, GoodsData)
    {
        var strGoodsData = GoodsData.split(";"); 
        
        if (Field.checked)
        {
            document.getElementById("txtSelection").value = "Customizable Products";
            //document.getElementById("ddlPackageList").value = "DI00004A";
            
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = strGoodsData[2];
            document.getElementById("hdGoodsName").value = strGoodsData[3];
            document.getElementById("hdEarlySetPrice").value = strGoodsData[4];
            document.getElementById("hdAgreedVolume").value = strGoodsData[5];
            document.getElementById("hdAgreedPrice").value = strGoodsData[6];
            if (document.getElementById("hdGoodsInfo").value == "MPGoodsID")
            {
                if (document.getElementById("hdPlayerMonthLimit").value != "")
                {
                    document.getElementById("hdMonthLimit").value = document.getElementById("hdPlayerMonthLimit").value;   
                }
                else
                {
                    document.getElementById("hdMonthLimit").value = strGoodsData[7];
                }
            }
            else
            {
                if (document.getElementById("hdUploaderMonthLimit").value != "")
                {
                    document.getElementById("hdMonthLimit").value = document.getElementById("hdUploaderMonthLimit").value;   
                }
                else
                {
                    document.getElementById("hdMonthLimit").value = strGoodsData[7];
                }
            }
            
            if (document.all["sbDepth2Player"+strGoodsData[0]].value == "")
            {
                document.getElementById("hdUseCount").value = document.all["hdUseCountTyping"+strGoodsData[0]].value; 
            }
            else
            {
                document.getElementById("hdUseCount").value = document.all["sbDepth2Player"+strGoodsData[0]].value; 
            }
            document.getElementById("hdExcessVolume").value = strGoodsData[9];
            document.getElementById("hdExcessPrice").value = strGoodsData[10];
            
            document.getElementById("btnUpdateUseCharge").click();
        }
        else
        {
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = "Delete";
            
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function BoardCheckboxOnSelect(Field, GoodsData)
    {
        var strGoodsData = GoodsData.split(";"); 
        
        if (Field.checked)
        {
            document.getElementById("txtSelection").value = "Customizable Products";
            //document.getElementById("ddlPackageList").value = "DI00004A";
            
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = strGoodsData[2];
            document.getElementById("hdGoodsName").value = strGoodsData[3];
            document.getElementById("hdEarlySetPrice").value = strGoodsData[4];
            document.getElementById("hdAgreedVolume").value = strGoodsData[5];
            document.getElementById("hdAgreedPrice").value = strGoodsData[6];
            if (document.getElementById("hdGoodsInfo").value == "MPGoodsID")
            {
                if (document.getElementById("hdPlayerMonthLimit").value != "")
                {
                    document.getElementById("hdMonthLimit").value = document.getElementById("hdBoardMonthLimit").value;   
                }
                else
                {
                    document.getElementById("hdMonthLimit").value = strGoodsData[7];
                }
            }
            else
            {
                if (document.getElementById("hdUploaderMonthLimit").value != "")
                {
                    document.getElementById("hdMonthLimit").value = document.getElementById("hdUploaderMonthLimit").value;   
                }
                else
                {
                    document.getElementById("hdMonthLimit").value = strGoodsData[7];
                }
            }
            
            if (document.all["sbDepth2Board"+strGoodsData[0]].value == "")
            {
                document.getElementById("hdUseCount").value = document.all["hdBoardCountTyping"+strGoodsData[0]].value; 
            }
            else
            {
                document.getElementById("hdUseCount").value = document.all["sbDepth2Board"+strGoodsData[0]].value; 
            }
            document.getElementById("hdExcessVolume").value = strGoodsData[9];
            document.getElementById("hdExcessPrice").value = strGoodsData[10];
            
            document.getElementById("btnUpdateUseCharge").click();
        }
        else
        {
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = "Delete";
            
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function AddedCheckboxOnSelect(Field, GoodsData)
    {
        var strGoodsData = GoodsData.split(";"); 
        
        if (Field.checked)
        {
            document.getElementById("txtSelection").value = "Customizable Products";
            
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = strGoodsData[2];
            document.getElementById("hdGoodsName").value = strGoodsData[3];
            document.getElementById("hdEarlySetPrice").value = strGoodsData[4];
            document.getElementById("hdAgreedVolume").value = strGoodsData[5];
            document.getElementById("hdAgreedPrice").value = strGoodsData[6];
            document.getElementById("hdMonthLimit").value = strGoodsData[7];
            document.getElementById("hdUseCount").value = strGoodsData[8];
            document.getElementById("hdExcessVolume").value = strGoodsData[9];
            document.getElementById("hdExcessPrice").value = strGoodsData[10];
            
            document.getElementById("btnUpdateUseCharge").click();
        }
        else
        {
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = "Delete";
            
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function BoardSelectboxOnSelect(Field, strGoodsID, nIndex, GoodsData)
    {
        if (Field.value == "")
        {
            document.all["BoardCountTyping"+strGoodsID].innerHTML = "<td width=\"40\"><input type=\"text\" name=\"hdUseCountTyping"+ strGoodsID +"\" class=\"form_join2\" size=\"3\" maxlength=\"2\" onpaste=\"return false\" onkeypress=\"InputNum()\"></td>";
        }
        else
        {
            document.all["BoardCountTyping"+strGoodsID].innerHTML = "";
        }
        
        if (document.all["rbDepth2Board"+ nIndex].checked)
        {
            var strGoodsData = GoodsData.split(";"); 
            document.all["rbDepth2Board"+ nIndex].checked = false;
            
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = "Delete";
            
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function SelectboxOnSelect(Field, strGoodsID, nIndex, GoodsData)
    {
        if (Field.value == "")
        {
            document.all["PlayerCountTyping"+strGoodsID].innerHTML = "<td width=\"40\"><input type=\"text\" name=\"hdUseCountTyping"+ strGoodsID +"\" class=\"form_join2\" size=\"3\" maxlength=\"2\" onpaste=\"return false\" onkeypress=\"InputNum()\"></td>";
        }
        else
        {
            document.all["PlayerCountTyping"+strGoodsID].innerHTML = "";
        }
        
        if (document.all["rbDepth2Player"+ nIndex].checked)
        {
            var strGoodsData = GoodsData.split(";"); 
            document.all["rbDepth2Player"+ nIndex].checked = false;
            
            document.getElementById("hdGoodsID").value = strGoodsData[0];
            document.getElementById("hdGoodsInfo").value = strGoodsData[1];
            document.getElementById("hdAddedInfo").value = "Delete";
            
            document.getElementById("btnUpdateUseCharge").click();
        }
    }

    function InputNum()
    {
        if (event.keyCode >= 48 && event.keyCode <= 57)
        {
            if (event.keyCode != 17)
            {
                return true;
            }
            else
            {
                event.returnValue = false;
            }
        }
        else
        {
            event.returnValue = false;
        }
    }

    function OnSubmit()
    {
        document.getElementById("hdMode").value = "Yes";
        document.getElementById("btnUpdateUseCharge").click();
    }

    function SetDate() {

        var nowdate = new Date();
        
        year   = nowdate.getYear();
        month  = setCharCnt(nowdate.getMonth()+1);
        month2 = setCharCnt(nowdate.getMonth()+2);
        Date   = setCharCnt(nowdate.getDate());
        
        getToday  = year+"-"+month+"-"+Date;        
        get1Today = year+"-"+month2+"-"+Date;
        
        document.getElementById("txtStorageFromDate").value = getToday;
        document.getElementById("txtStorageToDate").value = get1Today;
    }

    function setCharCnt(str)
    {
        if(str < 10) {
            str = "0" + str;
        }
        return str
    }

    function PackageSubmit()
    {
        document.form1.method = "post";
        document.form1.target = "_top";
        document.form1.action = "/My/SettinglniP.asp";
        document.form1.submit();
    }

    function toggleDropShadowOpen(n)
    {
        show=eval("document.all.show"+n)
        if(show.style.display == 'none') {
            document.getElementById("showimg"+n).src = "/WEB01/Images/Members/Application/bt_hide.gif";
            show.style.display = 'block';            
        } else {
            document.getElementById("showimg"+n).src = "/WEB01/Images/Members/Application/bt_look.gif";
            show.style.display = 'none';            
        }
    }

    function trPackageToggle(strPackageCode) 
    {
        show=eval("document.all.tr"+strPackageCode)
        if(show.style.display == 'none') {
            document.getElementById("img"+strPackageCode).src = "/WEB01/Images/Members/Application/Apply05.gif";
            show.style.display = 'block';            
        } else {
            document.getElementById("img"+strPackageCode).src = "/WEB01/Images/Members/Application/Apply06.gif";
            show.style.display = 'none';            
        }
    }

    function onIFrameMove(Seq, PackageCode)
    {
        document.getElementById("StateInfoIframe").src = "StateInfo.aspx?Seq="+ Seq +"&PackageCode="+ PackageCode;
    }
    
    function UseTermUpdate()
    {
        alert("DD");
        document.getElementById("ibStorageApply").click();
    }
    
    function ResizeWindow()
    {
        var num = 30;
        var x = 0;
        var y = 0;
        
        x = (document.body.scrollWidth > 1000) ? 1000 : document.body.scrollWidth;
        y = (document.body.scrollHeight > 900) ? 900 : document.body.scrollHeight;
        
        if (navigator.appVersion.indexOf("MSIE 6") > -1) num = 40;
        
        window.resizeTo(x-5,0);    
        window.resizeBy(1,y-num);
    }    
    
    function PopupWindow(strURL, strID, nWidth, nHight)
    {
	    winpos = "left=" + ((window.screen.width-"+nWidth+")/2) + ",top=" + ((window.screen.height-"+nHight+")/2);
	    winstyle="width="+nWidth+",height="+nHight+",status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos;
	    //var win = window.open(strURL, strID ,winstyle);
	    var win = window.open(strURL, strID);
	    //alert(strURL+" "+strID+" "+winstyle);
	    if (win == null)
        {
            alert("차단된 팝업을 허용해 주십시요.");
            return;
        }
	    win.focus();
    }	
    
    function OpenWin() 
    {
        var f = document.form1;
        
        var height_ =400;
        var width_ = 340;
        var left_ = screen.width;
        var top_ = screen.height;

        left_ = left_/2 - (width_/2);
        top_ = top_/2 - (height_/2);

        src = window.open('about:blank','AuthFrmUp',
          'height='+height_+',width='+width_+',status=yes,scrollbars=no,resizable=no,left='+left_+',top='+top_+'');
          
        try{
            if (src == null)
            {
                alert("차단된 팝업을 허용해 주십시요. \n\n도구(T)->팝업 차단(P)->팝업 차단 사용 안함(B)");
                return false;
            } 
            
            f.target = "AuthFrmUp";
            f.method = "post";
            f.action ="PhoneSend.aspx";
            f.submit();
            
            self.opener = self
            window.close()
        }
        catch(e)
        {
            alert("차단된 팝업을 허용해 주십시요. \n\n도구(T)->팝업 차단(P)->팝업 차단 사용 안함(B)");
        } 
    }
    
    function FlashViewer(nWidth, nHeight, strPath, strObjectID, strBGcolor, strFlashVars){
	    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\""+nWidth+"\" height=\""+nHeight+"\" id=\""+strObjectID+"\" align=\"middle\">");
	    document.write("<param name=\"allowScriptAccess\" value=\"always\" />");
	    document.write("<param name=\"allowFullScreen\" value=\"true\">");
	    document.write("<param name=\"movie\" value=\""+strPath+"\" />");
	    document.write("<param name=\"quality\" value=\"high\" />");
	    document.write("<param name=\"flashVars\" value=\""+strFlashVars+"\" />");
	    document.write("<param name=\"bgcolor\" value=\""+strBGcolor+"\" />");
	    document.write("<embed src=\""+strPath+"\" quality=\"high\" bgcolor=\""+strBGcolor+"\" width=\""+nWidth+"\" height=\""+nHeight+"\" name=\""+strObjectID+"\" align=\"middle\" swliveconnect=\"true\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" flashVars=\""+strFlashVars+"\" />");
	    document.write("</object>");
    }
    
    function ObjectViewr(strObjectID, nWidth, nHeight, strCodebase, strClassid){
        document.write('<object id="'+ strObjectID +'" classid="'+ strClassid +'" width="'+nWidth+'" height="'+nHeight+'" codebase="'+ strCodebase +'"></object>');
    }
    
    function OnSkinDelete(nSeq)
    {
        if (confirm('정말 삭제 하시겠습니까?'))
        {
            alert("DD");
            parent.location.href = "../Default.aspx?Mode=Delete&Seq="+ nSeq;
        }
        else
        {
            return false;
        }
    }
    
    // 업로더 업로더 신청
	function UploaderSkin()
	{
		alert("고객센터에 문의해주세요.\n전화번호:2109-1161");
		return;
		if(!checkUploaderApply)
			var win = window.open("SkinApply0.asp?skey=<%=skey%>",  "uploaderpop", "width=810,height=610");	
		else
			alert("신청하신 상태입니다.");
	}
	
	function UploaderSkin(mode)
    {
        var url = "http://asp.mymovieup.com/UploaderBuilder/MovieupLoader.html";		
        var skey = document.getElementById("skey").value
        var lang = document.getElementById("language").value
        
        if (skey == "")
        {
            alert("사이트를 선택하여 주세요.")
            return;
        }
        else
        {
            if (lang == "") lang = "KOR";
            
            url += "?mode="+ mode
            url += "&skey="+ skey
            url += "&lang="+ lang
            if(mode=="edit") url += "&seq="+ document.getElementById("seq").value
            window.open(url,"create","width=850,height=630");
        }
    }


    function Storage_Reset(Storage) {
        if (Storage == "CSGoodsID") {
            var strStorageID = document.getElementById("hdHostStorageType").value.split(";");

            for (i = 0; i < strStorageID.length; i++) {

                var strID = strStorageID[i];

                var Len = document.all[strID].length;

                if (Len == null || Len == "undefined") {
                    document.all[strID].checked = false;
                }
                else {

                    for (k = 0; k < document.all[strID].length; k++) {
                        document.all[strID][k].checked = false;
                    }
                }
            }

            document.getElementById("hdStroageInfo").value = "HSAddedID(HT)";
        }
        else {

            var Len = document.all.rbDepth2CustomerStorage.length;

            if (Len == null || Len == "undefined") {
                document.all.rbDepth2CustomerStorage.checked = false;
            }
            else {

                for (i = 0; i < Len; i++) {
                    document.all.rbDepth2CustomerStorage[i].checked = false;
                }
            }

            document.getElementById("hdStroageInfo").value = "CSGoodsID";
        }

    }

    function setCookie(name, value) {
        document.cookie = name + '=' + escape(value) + '; path=/;'
    }