function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*
var menuWindow;

function showMenu(choice) {
  if (getCookie("ShowMessage") != "checked") {
    if (!menuWindow || menuWindow.closed) {
      menuWindow =  window.open('','','width=300,height=200,status=no,menubar=no,scrollbars=no,resizable=yes');
    }
  }

  if (menuWindow && !menuWindow.closed) {
    menuWindow.moveTo(550,150);
    writeToWindow(choice);
  }
}

function writeToWindow(choice) {
  var newContent = "<HTML><HEAD><TITLE>»¡©ú</TITLE>";

  newContent += "<style type=text/css>";
  newContent += ".agztext1 {font-size: 9pt; line-height: 150%}";
  newContent += "A:hover {color: #995544; text-decoration: none}";
  newContent += "</style>";

  newContent += "<script>";

  newContent += "function setCookie( name, value, expiredays ) {";
  newContent += "  var today = new Date();";
  newContent += "  today.setDate( today.getDate() + expiredays );";
  newContent += '  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";';
  newContent += "}";

  newContent += "function closeMenu() {";
  newContent += "  if (document.forms[0].noMoreMenu.checked) {";
  newContent += "    setCookie(\"ShowMessage\", \"checked\" ,1 );";
  newContent += "  }";
  newContent += "  this.close();";
  newContent += "}";

  newContent += "</script>";

  newContent += "<BODY bgcolor=black text=white>";
  switch (choice.toUpperCase()) {
    case "CDKEY":
      newContent += "<font class=agztext1>À¸¨¦Àx­È¥d§Ç¸¹Àx­È»¡©ú¡G<br><br>";
      newContent += "(1) À¸¨¦Àx­È§Ç¸¹¡A¬°§»ùÖÀ¸¨¦©Òµo¦æ¡A¥Ñ20¦ì¤j¼g­^¤å¥[¼Æ¦r²Õ¦X¦¨ªº§Ç¸¹¡C<br>";
      newContent += "(2) ª±®a¥i©ó¦U¤j«K§Q¶W°Ó¡B¹q¸£½æ³õ¡Bºô©@¡B©Î¬O²Ä¤TªiÁÊª«ºô¯¸¡AÁÊ¶RÀ¸¨¦Àx­È§Ç¸¹¡C<br>";
      newContent += "</font>";
      break;
    case "HINET":
      newContent += "<font class=agztext1>HiNet ¤pÃB¥I¶OÀx­È»¡©ú¡G<br><br>";
      newContent += "(1) ±ý¨Ï¥Î HiNet ¤pÃB¥I¶O¾÷¨îªºª±®a¡A¥²¶·¬° HiNet ADSL ©Î¼·±µ¥Î¤á<b><font color=red>¡]¥Ø«e¼È¤£±µ¨ü HiNet e ª÷¥d¡A³y¦¨¤£«K¡A·q½Ð¨£½Ì¡I¡^</font></b><br>";
      newContent += "(2) ¬°«O»Ùª±®aÅv¯q¡A³æ¤@ HiNet ±b¸¹¦P¤@­Ó¤ëÀx­ÈÀ¸¨¦¹CÀ¸¤W­­¬°·s¥x¹ô 1500 ¤¸¡C<br>";
      newContent += "</font>";
      break;
    case "CREDITCARD":
      newContent += "<font class=agztext1>«H¥Î¥d½u¤W¨ê¥dÀx­È»¡©ú¡G<br><br>";
      newContent += "(1) À¸¨¦±b¸¹ºÞ²z¤¤¤ß¬°ºô»Ú«Â«H(HiTrust)»{ÃÒ³q¹Lªººô¯¸¡A¸ê®Æ¶Ç¿é¹Lµ{¤¤§¡¥H SSL ¾÷¨î¥[±K¡A¥i½T«Oª±®a¸ê®Æªº¦w¥þ©Ê¡C<br>";
      newContent += "(2) À¸¨¦¦bª±®a¨ê¥d»{ÃÒªº¹Lµ{¤¤¡A¨Ã¤£·|«O¯dª±®aªº«H¥Î¥d¸¹¡A½Ðª±®a¦w¤ß®ø¶O¡C<br>";
      newContent += "(3) ¬°½T«Oª±®a¶¶§Q¦¬¨ìµo²¼¡A½Ðª±®a©óÀx­È¹Lµ{¤¤¡A®Ú¾Úºô­¶«ü¥Ü½T¹ê¶ñ¼gµo²¼¬ÛÃö¸ê°T«á¡A¦AÄ~Äò¶i¦æÀx­Èªº¨BÆJ¡C<br>";
      newContent += "</font>";
      break;
    case "TCC":
      newContent += "<font class=agztext1>¥xÆW¤j­ô¤j¤pÃB¥I¶OÀx­È»¡©ú¡G<br><br>";
      newContent += "¥H¥xÆW¤j­ô¤j¤pÃB¥I¶OÀx­ÈÀ¸¨¦¹CÀ¸ÂI¼Æªº¥\¯à¡A§Y±N©óªñ´Á¤º¶}©ñ¨Ï¥Î¡C";
      newContent += "¾Ö¦³¥xÆW¤j­ô¤jªù¸¹ªºª±®a±N¥i¥Î¤â¾÷¶i¦æ¥I¶OÀx­È¡C";
      newContent += "<br>";
      newContent += "</font>";
      break;
  }

  newContent += "<br><table><form>";
  newContent += "<tr><td class=agztext1><input type=checkBox name=noMoreMenu><font color=red>§Ú¤w¸g¤F¸Ñ¥H¤W¸ê°T¡A½Ð¤£­n¦A´£¿ô§Ú</font>¡@";
  //newContent += "<img src=img/smileFace.gif alt=Ãö³¬¦¹µøµ¡ border=0>";
  newContent += "<input type=button value=Ãö³¬ style=\"font-family: ¼Ð·¢Åé; font-size: 12px; border-style: double; border-color: #FFFFFF\" class=agztext1 onMouseUp=\"closeMenu()\"></td></tr>";
  newContent += "</form></table>";
  newContent += "</BODY></html>";
  menuWindow.document.write(newContent);
  menuWindow.document.close();
}

function closeMenu() {
  if (menuWindow && !menuWindow.closed) {
    menuWindow.close();
  }
}

*/
function checkSubmit() {
  if (document.forms[0].deposit_source.checked) {
    document.location = "depositBegin.php?deposit_source=CDKEY&toStep=DEPOSITBEGIN";
  }
  else {
    alert("µL®Äªº¿ï¾Ü");
    window.close();
  }
}//End of function checkSubmit


function getCookie( name )
{
var nameOfCookie = name + "=";
var x = 0;
 while ( x <= document.cookie.length )
 {
 var y = (x+nameOfCookie.length);
   if ( document.cookie.substring( x, y ) == nameOfCookie )
   {
     if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
        endOfCookie = document.cookie.length;
     return unescape( document.cookie.substring( y, endOfCookie ) );
   }
   x = document.cookie.indexOf( " ", x ) + 1;
   if ( x == 0 )
   break;
 }
 return "";
}//End of function getCookie