function viewFlash(sURL, sName, sFeatures)
{
   var FLASHCAB = "https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab";
   var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000";
   var FLASHVER = "6,0,29,0";

   var sFeature;
   var sWidth  = "100%";
   var sHeight  = "100%";
   var pmBoolean = "false";
   var sTempArray;
   var sParamTag = "";

   sFeature = sFeatures.split(/\s*,\s*/);
   for (var i=0; i< sFeature.length ; i++)
   { 
      sTempArray = sFeature[i].split(/\s*=\s*/);
      if (sTempArray[0].toLowerCase() == "width")
      { 
         sWidth = sTempArray[1]; 
      }
      else if (sTempArray[0].toLowerCase() == "height")
      {
         sHeight = sTempArray[1]; 
      }
      else
      {
         if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true")
         {
            pmBoolean = "true";
         }
         else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false")
         {
            pmBoolean = "false";
         }
         else
         {
            pmBoolean = sTempArray[1];
         } 
         sParamTag = "<param name='" + sTempArray[0] + "'value='" + pmBoolean + "'>\n" + sParamTag;
      } 
   } 
   document.write("<object vmode='transparent' id='" + sName + "' name='" + sName + "' classid='" + FLASHCID + "' codebase='" + FLASHCAB + "#version=" + FLASHVER + "' width='" + sWidth + "' height='" + sHeight+"'>");
   document.write("<param name='movie' value='" + sURL + "'>"); 
   document.write("<param name='wmode' value='transparent'>"); 
   document.write(sParamTag); 
   document.write("<embed wmode='transparent' src='" + sURL + "' menu='false' width='" + sWidth + "' height='" + sHeight + "' id='" + sName + "' name='" + sName + "' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />") 
   document.write("</object>"); 
}
function viewFlashNoneTransParent(sURL, sName, sFeatures)
{
   var FLASHCAB = "https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab";
   var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000";
   var FLASHVER = "6,0,29,0";

   var sFeature;
   var sWidth  = "100%";
   var sHeight  = "100%";
   var pmBoolean = "false";
   var sTempArray;
   var sParamTag = "";

   sFeature = sFeatures.split(/\s*,\s*/);
   for (var i=0; i< sFeature.length ; i++)
   { 
      sTempArray = sFeature[i].split(/\s*=\s*/);
      if (sTempArray[0].toLowerCase() == "width")
      { 
         sWidth = sTempArray[1]; 
      }
      else if (sTempArray[0].toLowerCase() == "height")
      {
         sHeight = sTempArray[1]; 
      }
      else
      {
         if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true")
         {
            pmBoolean = "true";
         }
         else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false")
         {
            pmBoolean = "false";
         }
         else
         {
            pmBoolean = sTempArray[1];
         } 
         sParamTag = "<param name='" + sTempArray[0] + "'value='" + pmBoolean + "'>\n" + sParamTag;
      } 
   } 
   document.write("<object id='" + sName + "' name='" + sName + "' classid='" + FLASHCID + "' codebase='" + FLASHCAB + "#version=" + FLASHVER + "' width='" + sWidth + "' height='" + sHeight+"'>");
   document.write("<param name='movie' value='" + sURL + "'>"); 
   document.write(sParamTag); 
   document.write("<embed wmode='transparent' src='" + sURL + "' menu='false' width='" + sWidth + "' height='" + sHeight + "' id='" + sName + "' name='" + sName + "' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />") 
   document.write("</object>"); 
}  
function PopUp(Title, Url, Width, Height, Left, Top, CenterYN)
{
   var X = ((document.body.clientWidth) / 2) - (Width / 2);
   var Y = ((document.body.clientHeight) / 2) - (Height / 2) + 100;
   if (CenterYN == "N")
   {
      X = Left;
      Y = Top;
   }
   config = "toolbar=no,directories=no,menubar=no,titlebar=no,status=no,scrollbars=no,width=" + Width + ",height=" + Height + ",left=" + X + ",top=" + Y;
   window.open(Url, Title, config);
}


function CheckNumber(val)
{
    for(i=0;i<val.length;i++)
    {
        if(val.charCodeAt(i) <= 47 || val.charCodeAt(i) >= 58)
            return false;                    
    }
    return true;
}
function CheckInch(val)
{
    for(i=0;i<val.length;i++)
    {
        if((val.charCodeAt(i) != 46) && (val.charCodeAt(i) <= 47 || val.charCodeAt(i) >= 58))
            return false;
    }
    return true;
}
function ConvertCm()
{
   var tInch = document.getElementById("txtinch");
   var tCm = document.getElementById("txtcm");
   
   if(!CheckInch(tInch.value))
   {
      alert("¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
      tInch.focus();
      tInch.select();
      return false;
   }
   else
   {
      var num = tInch.value * 2.54;
      num.toFixed(1);
      tCm.value = num.toFixed(1);
      return true;
   }
}
  
//Added by Taeil Lee, 12/08/2009
//OrderStatus.aspx, OrderReturnList.aspx, orderCancelList.aspx
function yycheck(type)
{
    var mmonth;
    if (type == "T")
    {
        mmonth=document.getElementById("tomonth").value;           
    }
    else
    {
        mmonth=document.getElementById("frommonth").value;           
    }
    
    ddcheck(mmonth ,type, '');
}

function ddcheck(valu, type, n_day)
{
    var yyear;
    var mmonth;
    var dday;
    var select_day;
    
    if (type == "T")
    {
        yyear=document.getElementById("toyear").value; 
        mmonth=document.getElementById("tomonth").value;
        dday=document.getElementById("today");
    }
    else
    {
        yyear=document.getElementById("fromyear").value; 
        mmonth=document.getElementById("frommonth").value;
        dday=document.getElementById("fromday");
    }
    select_day = dday.value;
    
    //³¯Â¥(ÀÏ) ÃÊ±âÈ­      
    for( var i=dday.length-1; i>0; i-- )                    
    {
        dday.options[i] = null;                             
    }

    //¿ùº° ¸¶Áö¸·ÀÏ¼ö Á¤ÀÇ 
    var dayArray=new Array(31,28,31,30,31,30,31,31,30,31,30,31);  
    
    //¸¶Áö¸· ÀÏ¼ö ±¸ÇÏ±â
    var daylength=dayArray[valu-1];          

    // ³âÀ¸·Î À±´Þ ±¸ÇÏ±â
    if(((Number(yyear) % 4 == 0) && (Number(yyear) % 100 != 0)) || (Number(yyear) % 400 == 0)) 
    {  
        if(Number(mmonth) == 2)
        {
            // À±´ÞÀÏ°æ¿ì 2¿ù 28ÀÏÀ» 29ÀÏ·Î ¼öÁ¤
            daylength=dayArray[valu-1]+1;                    
        }
    }
    
    for(i=0;i<daylength;i++)
    {
        dday.options[i] = new Option(i+1,i+1,true); 
    }      

    if(n_day == "")
    {
        var sToDay =new Date();
        dday.value = sToDay.getDate();
        //dday.value = select_day;
    }
    else
    {
        dday.value = n_day;
    }
    
}


