
if (tx_sellid=='gundamshop' && tx_reserve != '1') {


 function getNextWeek(t){ //³¯Â¥½ºÆ®¸µ°ú, ÀÏÂ÷¸¦ ÆÄ¶ó¸ÞÅÍ·Î ¹Þ´Â´Ù
  var str=new Array(); //¹è¿­

  var c=new Date(dates_str.substring(0,4), dates_str.substring(4,6)-1, dates_str.substring(6,8)); //µ¥ÀÌÆ®°´Ã¼ »ý¼º
  var d=c.valueOf()+1000*60*60*24*t; //tÀÏÈÄ, (À½¼ö¸é ÀüÀÏ)ÀÇ Å¸ÀÓ½ºÅÆÇÁ¸¦ ¾ò´Â´Ù
  var e=new Date(d); //ÀÇ·ÚÇÑ³¯ÀÇ µ¥ÀÌÆ®°´Ã¼ »ý¼º
 
  str[str.length]=e.getYear(); //³â
  str[str.length]=(((e.getMonth()+1) < 10)? "0":"") + parseInt(e.getMonth()+1); //¿ù
  str[str.length]=((e.getDate() < 10)? "0":"") + e.getDate(); //ÀÏ
  str[str.length]="170000"
  return str.join(""); //¹è¿­À» - ±¸ºÐÀÚ·Î ÇÕÃÄ ½ºÆ®¸µÀ¸·Î º¯È¯ÈÄ ¹ÝÈ¯
 }

  var str1 = (b=new Date()).getYear()+"³â "+(b.getMonth()+1)+"¿ù "+(b.getDate())+"ÀÏ ";
  var mmdd = (b.getMonth()+1)+""+(b.getDate());
  var ntime = dates_time.substring(8,10);

  var yo = b.getDay();
  var add_d = 1;
  add_d = (yo=='5')? 3:add_d
  if(yo=='6') add_d = 2;
  if(mmdd=='921') add_d = 3;	 //ÇØ³â¸¶´Ù ¼öÁ¤ÇØÁà¾ß ÇÔ.
  if(mmdd=='922') add_d = 2;
  if(mmdd=='923') add_d = 1;
  if(yo != '0' && mmdd!='921' && mmdd!='922' && mmdd!='923' && parseInt(ntime) < 17) add_d = 0

	  if(parseInt(tx_rterm) > 0) add_d = tx_rterm;

  endTime = getNextWeek(add_d); //?ÀÏÈÄ

document.write('<table border="0" cellpadding="0" cellspacing="0" align="center">');
document.write('  <tr>');
document.write('  <td>');
document.write('  <img src="http://pics2.gundamshop.co.kr/n_prd/gundamshop_box0110.jpg">');
document.write('    </td>');
document.write('  </tr>');
document.write('</table>');

/*
document.write('<table border="0" cellpadding="0" cellspacing="0" align="center">');
document.write('  <tr>');
document.write('  <td>');
document.write('  <img src="http://pics2.gundamshop.co.kr/n_prd/gundamshop_box0823.gif">');
document.write('    </td>');
document.write('  </tr>');
document.write('</table>');
*/

document.write('<table border="0" cellspacing="0" cellpadding="0" align="center">');
document.write('  <tr>');
document.write('    <td>');


document.write('<table width="510" height="340" border="0" cellpadding="0" cellspacing="0">');
document.write('  <tr>');
document.write('    <td background="http://pics2.gundamshop.co.kr/prd2/dlv_n_img.gif" style="background-repeat:no-repeat;">');
document.write('    </td>');
document.write('  </tr>');
document.write('</table>');

document.write('<table border="0" cellpadding="0" cellspacing="0">');
document.write('  <tr>');
document.write('    <td style="padding:0 10 0 30"><img src="http://pics2.gundamshop.co.kr/prd2/dlv_n_tit.gif"></td>');
document.write('    <td class="price_all">'+endTime.substring(0,4)+'³â '+endTime.substring(4,6)+'¿ù '+endTime.substring(6,8)+'ÀÏ 17:00 ÀÔ´Ï´Ù. </td>');
document.write('  </tr>');
document.write('</table>');

document.write('      <table width="510" border="0" cellspacing="0" cellpadding="0">');
document.write('        <tr>');
document.write('          <td style="padding:10 0 0 0" align="center">');

document.write('    <table border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('      <tr valign="top">');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="d1">0</font><font id="d2">0</font><font id="d3">0</font></td>');
document.write('        <td width="23" style="font-family:Gulim;font-size:16px;font-weight:bold;color:#5c5c5c;padding-top:7px;">ÀÏ</td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="h1">0</font></td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="h2">0</font></td>');
document.write('        <td width="23" style="font-family:Gulim;font-size:16px;font-weight:bold;color:#5c5c5c;padding-top:7px;">½Ã</td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="m1">0</font></td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="m2">0</font></td>');
document.write('        <td width="23" style="font-family:Gulim;font-size:16px;font-weight:bold;color:#5c5c5c;padding-top:7px;">ºÐ</td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="s1">0</font></td>');
document.write('        <td width="29" height="45" align="center" background="http://pics2.gundamshop.co.kr/prd2/t_num_bg.gif" style="font-family:Times New Roman;font-size:28px;font-weight:bold;color:#FFFFFF;"><font id="s2">0</font></td>');
document.write('        <td width="23" style="font-family:Gulim;font-size:16px;font-weight:bold;color:#5c5c5c;padding-top:7px;">ÃÊ</td>');
document.write('        <td width="75" style="font-family:Gulim;font-size:12px;font-weight:bold;color:#5c5c5c;padding-top:9px;">³²¾Ò½À´Ï´Ù.</td>');
document.write('      </tr>');
document.write('    </table>');

document.write('          </td>');
document.write('        </tr>');
document.write('      </table>');
document.write('<table width="510" border="0" cellspacing="0" cellpadding="0">');
document.write('  <tr>');
document.write('    <td><img src="http://pics2.gundamshop.co.kr/prd2/dlv_n1_img.gif" width="510" height="51"></td>');
document.write('  </tr>');
document.write('</table>');

document.write('    </td>');
document.write('  </tr>');
document.write('</table>');





function getRemainedSellTime(endDateTime, currentDttm) 
{    var endYyyy = Number(endDateTime.substring(0,4));   
var endMm   = Number(endDateTime.substring(4,6)) - 1;
var endDd   = Number(endDateTime.substring(6,8));    
var endHh   = Number(endDateTime.substring(8,10));    
var endMi   = Number(endDateTime.substring(10,12));    
var endSs   = Number(endDateTime.substring(12,14));     
var nowDateTime = String(currentDttm);    
var nowYyyy = Number(nowDateTime.substring(0,4));    
var nowMm = Number(nowDateTime.substring(4,6)) - 1;    
var nowDd = Number(nowDateTime.substring(6,8));    
var nowHh = Number(nowDateTime.substring(8,10));    
var nowMi = Number(nowDateTime.substring(10,12));    
var nowSs = Number(nowDateTime.substring(12,14));     
now = new Date(nowYyyy, nowMm, nowDd, nowHh, nowMi, nowSs); //ÇöÀç½Ã°£ ÁöÁ¤    
later = new Date(endYyyy, endMm, endDd, endHh, endMi, endSs); //¿Ï·á½Ã°£ ÁöÁ¤     
if( later <= now ) {        s2.innerHTML = "0";        return;    }     
days = (later - now) / 1000 / 60 / 60 / 24;    daysRound = Math.floor(days);    
hours = (later - now) / 1000 / 60 / 60 - (24 * daysRound);    
hoursRound = Math.floor(hours);    
minutes = (later - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);    
minutesRound = Math.floor(minutes);    
seconds = (later - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);    
secondsRound = Math.round(seconds);                
if (secondsRound <= 9) {        s1.innerHTML = "0";        
s2.innerHTML = secondsRound;    } else {        s1.innerHTML = Math.floor(secondsRound/10);        
s2.innerHTML = secondsRound%10;    }    if (minutesRound <= 9) {        m1.innerHTML = "0";        
m2.innerHTML = minutesRound;    } else {        m1.innerHTML = Math.floor(minutesRound/10);        
m2.innerHTML = minutesRound%10;    }    if (hoursRound <= 9) {        h1.innerHTML = "0";        
h2.innerHTML = hoursRound;    } else {        h1.innerHTML = Math.floor(hoursRound/10);        
h2.innerHTML = hoursRound%10;    }    if (daysRound <= 9) {           //ÇÑÀÚ¸®ÀÏ¶§        
d1.innerHTML = "";        d2.innerHTML = "";        
d3.innerHTML = daysRound;    } else if (daysRound <= 99) {   //µÎÀÚ¸®ÀÏ¶§        
d1.innerHTML = "";        d2.innerHTML = Math.floor((daysRound/10)%10);        
d3.innerHTML = Math.floor(daysRound%10);    } else if (daysRound <= 999) {  //¼¼ÀÚ¸®ÀÏ¶§        
d1.innerHTML = Math.floor(daysRound/100);        d2.innerHTML = Math.floor((daysRound/10)%10);        
d3.innerHTML = Math.floor(daysRound%10);    }        
currentDttm = parseInt(currentDttm) + 1;        
newtime = window.setTimeout("getRemainedSellTime('" + endDateTime + "','" + currentDttm +"');", 1000);}

//getMinutes(); var Now_s = Nows.getSeconds(); var hour_rad... 

	var currentTime = dates_str;
	currentTime += (nows.getHours() < 10)? "0":"";
	currentTime += nows.getHours() + "";
	currentTime += (nows.getMinutes() < 10)? "0":"";
	currentTime += nows.getMinutes() + "";
	currentTime += (nows.getSeconds() < 10)? "0":"";
	currentTime += nows.getSeconds() + "";

	getRemainedSellTime(endTime,currentTime);

}


//»óÇ°Æò.
document.write('      <table border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('        <tr>');
document.write('          <td style="padding:30 0 10 0"><a href="http://www.gundamshop.co.kr/EVENT/2009/11/Event_Spoiler.html" target=_blank><img src="http://pics2.gundamshop.co.kr/prd2/bn_post.gif" border="0"></a></td>');
document.write('        </tr>');
document.write('      </table>');

