// ¿©±â »ç¿ë¾ÈÇÔ - ¿¹³¯°Å, ÈñÁØ ~slide2.js ·Î ¿Å±è

// ÈñÁØ ÁÖ¼®ÇÔ -  LeftModuleSlide"  id="LeftModuleSlide

//LeftModuleSlide.style.left = StartPos.offsetLeft + 788;
//LeftModuleSlide.style.top = StartPos.offsetTop + 10;


window.onscroll = WindScroll;
window.onload = WindScroll;
window.onresize = WindReset;


function WindScroll() {
	
	if(document.getElementById(LeftModuleSlide)) {
		LeftModuleSlide.style.left = StartPos.offsetLeft + 788;		// front01 ÀÇ Ä«Å×°í¸®º£½ºÆ® º£³ÊÀ§Ä¡ ¼³Á¤
		LeftModuleSlide.style.top = document.body.scrollTop;

		if(document.body.scrollTop <= StartPos.offsetTop) 
			LeftModuleSlide.style.top = StartPos.offsetTop + 220;
		else 
			LeftModuleSlide.style.top = document.body.scrollTop;


		if(parseInt(document.body.scrollTop)+425 > ButtomPos.offsetTop) 
			LeftModuleSlide.style.top = ButtomPos.offsetTop - 425;
		}
	}

 
function WindReset() {
	if(document.getElementById(LeftModuleSlide)) {
		LeftModuleSlide.style.left = StartPos.offsetLeft + 788;
		LeftModuleSlide.style.top = StartPos.offsetTop + 220;
		}
	}




////////////////////////////////
// ÈñÁØÃß°¡ ºÎºÐ
/////////////////////////////////

function show_categorybest() {
	print_categorybest()
	print_categorybest_md()
	}

function print_categorybest() {
	if(!categorybest_str) return false

	hstr = '<taBle height=16><td></table>'
	hstr += '<table width="180" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="border:1px #ebebeb solid;">'
	hstr += '<tr><td align="center">'
	hstr += '	<table width="170" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">'
	hstr += '	<tr><td height="25"><img src="http://pics.redmonkey.co.kr/prd/tit_prd_r1_01.gif" width="139" height="18"></td>'
	hstr += '	<tr><td height="1" bgcolor="ebebeb"></td>'
	hstr += '	<tr><td>&nbsp;</td>'
	hstr += '	<tr><td>'

	temp = categorybest_str.split("^//^")
	for(i=1; i<3; i++) {
		nodes = temp[i].split("^")
		ItemCode = nodes[1];
		strcode = nodes[2];
		panmega = nodes[3];
		name	=nodes[5];
		smallName = nodes[6];

		code_tmp = strcode.split("_");
		imgurl = "/Image2/goods_IMG/sub" + code_tmp[0] + "/75/" + strcode + ".gif";

		hstr += '<table width=170 border=0 cellspacing=0 cellpadding=0>';
		hstr += '<tr><td width=75 valign=top>';
		hstr += '	<table width=75 height=75 border=0 cellpadding=0 cellspacing=0>';
		hstr += '	<tr><td align=center bgcolor=f4f4f4><a href="/GD_Front01.html?ItemCode='+ItemCode+'" title="'+name+'"><img src="'+imgurl+'" width=75 height=75></td>';
		hstr += '	</table>';
		hstr += '<td width=10></td>';
		hstr += '<td valign=top><a href="/GD_Front01.html?ItemCode='+ItemCode+'" title="'+name+'">'+CLen(smallName,40)+'<br><br><span class=price_bold>'+number_format(panmega)+'¿ø</span></td>';
		hstr += '</table>'

		if(i==1) hstr += '<center><table height=10><td></table><table cellpadding=0 cellspacing=0 width=165><td bgcolor=#EBEBEB height=1></table><table height=10><td></table>'
		}

	hstr += '	</table>'
	hstr += '<tr><td height=10>'
	hstr += '</table>'

	LeftModuleSlide.innerHTML += hstr
	}

function print_categorybest_md() {
	if(!categorybest_md) return false

	hstr = '<taBle height=15><td></table>'
	hstr += '<table width="180" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="border:1px #ebebeb solid;">'
	hstr += '<tr><td align="center">'
	hstr += '	<table width="170" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">'
	hstr += '	<tr><td height="25"><img src="http://pics.redmonkey.co.kr/prd/tit_prd_r1_02.gif" width="139" height="18"></td>'
	hstr += '	<tr><td height="1" bgcolor="ebebeb"></td>'
	hstr += '	<tr><td>&nbsp;</td>'
	hstr += '	<tr><td>'

	temp = categorybest_md.split("^//^")
	for(i=0; i<temp.length-1; i++) {
		nodes = temp[i].split("^")
		ItemCode = nodes[1];
		strcode = nodes[2];
		panmega = nodes[3];
		name	=nodes[5];
		smallName = nodes[6];

		code_tmp = strcode.split("_");
		imgurl = "/Image2/goods_IMG/sub" + code_tmp[0] + "/75/" + strcode + ".gif";

		hstr += '<table width=170 border=0 cellspacing=0 cellpadding=0>';
		hstr += '<tr><td width=75 valign=top>';
		hstr += '	<table width=75 height=75 border=0 cellpadding=0 cellspacing=0>';
		hstr += '	<tr><td align=center bgcolor=f4f4f4><a href="/GD_Front01.html?ItemCode='+ItemCode+'" title="'+name+'"><img src="'+imgurl+'" width=75 height=75></td>';
		hstr += '	</table>';
		hstr += '<td width=10></td>';
		hstr += '<td valign=top><a href="/GD_Front01.html?ItemCode='+ItemCode+'" title="'+name+'">'+CLen(smallName,40)+'<br><br><span class=price_bold>'+number_format(panmega)+'¿ø</span></td>';
		hstr += '</table>'

		if(i==0) hstr += '<center><table height=10><td></table><table cellpadding=0 cellspacing=0 width=165><td bgcolor=#EBEBEB height=1></table><table height=10><td></table>'
		}

	hstr += '	</table>'
	hstr += '<tr><td height=10>'
	hstr += '</table>'

	LeftModuleSlide.innerHTML += hstr
	}


function print_categorybest_smart() {
	if(!categorybest_smart) return false

	hstr = '<taBle height=15><td></table>'
	hstr += '<table width="180" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="border:1px #ebebeb solid;">'
	hstr += '<tr><td align="center">'
	hstr += '	<table width="170" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">'
	hstr += '	<tr><td height="25"><img src="http://pics2.gundamshop.co.kr/prd2/tit_prd_r1_04_1.gif" ></td>'
	hstr += '	<tr><td height="1" bgcolor="ebebeb"></td>'
	hstr += '	<tr><td>&nbsp;</td>'
	hstr += '	<tr><td onmouseover="smart_sw=0" onmouseout="smart_sw=1">'

	temp = categorybest_smart.split("^//^")
	for(i=0; i<temp.length-1; i++) {
		nodes = temp[i].split("^")
		ItemCode = nodes[1];
		strcode = nodes[2];
		panmega = nodes[3];
		name	=nodes[5];
		smallName = nodes[6];

		code_tmp = strcode.split("_");
		imgurl = "/Image2/goods_IMG/sub" + code_tmp[0] + "/75/" + strcode + ".gif";

		hstr += '<table width=170 border=0 cellspacing=0 cellpadding=0 id=tb_categorybest_smart_'+i+' style="display:none">';
		hstr += '<tr><td width=75 valign=top>';
		hstr += '	<table width=75 height=75 border=0 cellpadding=0 cellspacing=0>';
		hstr += '	<tr><td align=center bgcolor=f4f4f4><a href="/GD_Front01.html?ItemCode='+ItemCode+'"><img title="'+name+'" src="'+imgurl+'" width=75 height=75></td>';
		hstr += '	</table>';
		hstr += '<td width=10></td>';
		hstr += '<td valign=top><a href="/GD_Front01.html?ItemCode='+ItemCode+'">'+CLen(smallName,40)+'<br><br><span class=price_bold>'+number_format(panmega)+'¿ø</span></td>';
		hstr += '</table>'
		}

	hstr += '	</table>'
	hstr += '<tr><td height=10>'
	hstr += '</table>'

	LeftModuleSlide.innerHTML += hstr
	}

smart_sw = 1
smart_no = 0
smart_max = 5
function interval_categorybest_smart() {
	if(smart_sw) {
		for(i=0; i<smart_max; i++) {
			if(i==smart_no) eval("tb_categorybest_smart_"+i).style.display = "inline"
			else		eval("tb_categorybest_smart_"+i).style.display = "none"
			}
		smart_no++
		if(smart_no>=smart_max) smart_no = 0
		}
	setTimeout("interval_categorybest_smart()",3000)
	}



// °­·ÂÃßÃµ
function print_recommend() {
	document.write('<style>');
	document.write('ul,ol,li		{ margin:0px; padding:0px; list-style:none; }');
	document.write('a#MainB_EZ1_Prev		  { position:absolute; width:14px; height:32px; left:0px; top:35px; }');
	document.write('a#MainB_EZ1_Next		  { position:absolute; width:14px; height:32px; left:762px; top:35px; }');

	document.write('#MainB_EZ1_Sub_Pic ul	  { position:absolute; left:0px;}');
	document.write('#MainB_EZ1_Sub_Pic ul li  { float:left; width:101px; margin:0 5 0 0;}');
	document.write('</style>');

	document.write('<table width="970" border="0" align="center" cellpadding="0" cellspacing="0">');
	document.write('  <tr>');
	document.write('    <td width="10"><img src="http://pics.redmonkey.co.kr/prd/tb_rc_lf.gif" width="10" height="170"></td>');
	document.write('    <td width="950" background="http://pics.redmonkey.co.kr/prd/tb_rc_bg.gif">');
	document.write('      <table width="950" border="0" cellspacing="0" cellpadding="0">');
	document.write('        <tr>');
	document.write('          <td width="781" rowspan="3" valign="top" >');
	document.write('            <table width="200" height="30" border="0" cellpadding="0" cellspacing="0">');
	document.write('              <tr>');
	document.write('                <td style="padding:0 0 0 32"><img src="http://pics.redmonkey.co.kr/prd/tx_prd_d.gif" width="89" height="19"></td>');
	document.write('            </table>');


	document.write('<div id="MainB_EZ1" style="position:relative; top:-10px; width:729px; height:115px;">');
	document.write('	<a href="javascript:goDomainUrl()" id="MainB_EZ1_Prev"><img src="http://pics.redmonkey.co.kr/prd/img_arrow_p1.gif" width="14" height="32"></a>');
	document.write('	<a href="javascript:goDomainUrl()" id="MainB_EZ1_Next"><img src="http://pics.redmonkey.co.kr/prd/img_arrow_n1.gif" width="14" height="32"></a>');
	document.write('	<div id="MainB_EZ1_Sub" style="position:absolute;left:25px; width:729px; height:115px; top:10px; overflow:hidden;">');
	document.write('	<div id="MainB_EZ1_Sub_Pic" style="position:relative;">');
	document.write('	   <ul>');

	temp = categorybest_str.split("^//^")
	for(i=3; i<24; i++) {
		nodes = temp[i].split("^")
		ItemCode = nodes[1];
		strcode = nodes[2];
		panmega = nodes[3];
		name	=nodes[5];
		smallName = nodes[6];

		code_tmp = strcode.split("_");
		imgurl = "/Image2/goods_IMG/sub" + code_tmp[0] + "/75/" + strcode + ".gif";

		document.write('                <li>');
		document.write('                <table width="101" border="0" cellspacing="0" cellpadding="0">');
		document.write('                <tr><td>');
		document.write('			<table width="100" border="0" cellspacing="0" cellpadding="0">');
		document.write('			<tr><td align=center>');
		document.write('				<table width="75" border="0" cellspacing="0" cellpadding="0">');
		document.write('				<tr><td height="75" align="center" bgcolor="f4f4f4"><a href="http://www.gundamshop.co.kr/GD_Front01.html?ItemCode='+ItemCode+'"><img title="'+name+'" src="'+imgurl+'" width=75 height=75></td>');
		document.write('				<tr><td height="5"></td>');
		document.write('				<tr><td height="18" align="center" class="price_bold"><a href="http://www.gundamshop.co.kr/GD_Front01.html?ItemCode='+ItemCode+'"">'+number_format(panmega)+'¿ø</td>');
		document.write('				<tr><td align="center"><img onClick="javascript:OnPreview2(\''+strcode+'\','+ItemCode+',100,\'0\',0,\'\',\'\',1)" src="http://pics.redmonkey.co.kr/prd/bt_view.gif" width="51" height="13" style=cursor:hand></a></td>');
		document.write('				</table>');
		document.write('			</table>');
		document.write('		<td width="1" align="center"><img src="http://pics.redmonkey.co.kr/prd/tx_prd_dt.gif" width="1"></td>');
		document.write('                </table>');
		document.write('                </li>');
		}



	document.write('	  </ul>');
	document.write('	</div>');
	document.write('	</div>');
	document.write('</div>');




	document.write('          <td width="1" height="20" ></td>');
	document.write('          <td width="168" rowspan="3" align="center" valign="top">');


	document.write('            <table width="150" border="0" cellspacing="0" cellpadding="0">');
	document.write('              <tr><td align="center"><img src="http://pics.redmonkey.co.kr/prd/tx_prd_e.gif" width="113" height="20"></td>');
	document.write('              <tr><td height="5"></td>');
	document.write('              <tr><td align="center">');
	document.write('                  <table width="125" height="125" border="0" cellpadding="0" cellspacing="0">');
	document.write('                    <tr><td align="center" bgcolor="f4f4f4">');

		nodes = temp[0].split("^")
		ItemCode = nodes[1];
		strcode = nodes[2];
		panmega = nodes[3];
		name	=nodes[5];
		smallName = nodes[6];

		code_tmp = strcode.split("_");
		imgurl = "/Image2/goods_IMG/sub" + code_tmp[0] + "/130/" + strcode + ".gif";


	document.write('				<a href="http://www.gundamshop.co.kr/GD_Front01.html?ItemCode='+ItemCode+'"><img title="'+name+'" src="'+imgurl+'" width="125" height="125">');
	document.write('                  </table>');
	document.write('            </table>');
	document.write('        <tr><td height="120" background="http://pics.redmonkey.co.kr/prd/bg_dot1.gif"></td>');
	document.write('        <tr><td height="10" ></td>');
	document.write('      </table>');
	document.write('    <td width="10"><img src="http://pics.redmonkey.co.kr/prd/tb_rc_rig.gif" width="10" height="170"></td>');
	document.write('</table>');

	document.write('<table width="10" height="20" border="0" align="center" cellpadding="0" cellspacing="0">');
	document.write('<tr><td>&nbsp;</td>');
	document.write('</table>');

	}

