var tabtopMenu_on = new Array() ;
var tabtopMenu_off = new Array() ;
var tabtopMenuImgName, tabtopMenuLayName ;

for (i=1; i<=9; i++){ 
	tabtopMenu_on[i] = new Image() ;
	tabtopMenu_off[i] = new Image() ;
	if(i>9){
		tabtopMenu_on[i].src = "../img/main_market/top_memu_on_" + i + ".gif" ;
		tabtopMenu_off[i].src = "../img/main_market/top_memu_off_" + i + ".gif" ;
	}else{
		tabtopMenu_on[i].src = "../img/main_market/top_memu_on_0" + i + ".gif" ;		
		tabtopMenu_off[i].src = "../img/main_market/top_memu_off_0" + i + ".gif" ;
	}
}


function tabtopMenuAct() {
	for (i=1; i<=9; i++){
		tabtopMenuImgName = "tabtopMenu" + i ;
		document.images[tabtopMenuImgName].src = tabtopMenu_off[i].src ;
		tabtopMenuLayName = document.all["tabtopMenuLay"+i] ;
		tabtopMenuLayName.style.display = "none";
	}
	tabtopMenuImgName = "tabtopMenu" + arguments[0] ;
	document.images[tabtopMenuImgName].src = tabtopMenu_on[arguments[0]].src ;
	document.all["tabtopMenuLay"+arguments[0]].style.display = "" ;
}

function popco_start(w){
	var rstr ="<table cellpadding=0 cellspacing=0 border=0 width=" +(w+4) + " align=center><tr><td colspan=2 width=2></td><td width=" +w +" class=pbox_tb></td><td colspan=2 width=2></td></tr><tr><td width=1></td><td width=1 class=pbox_tb></td><td bgcolor=ffffff></td><td width=1 class=pbox_tb></td><td width=1></td></tr><tr><td colspan=5 align=center>";
	document.write(rstr);
}
function popco_end(){
	var rstr ="</td></tr><tr height=1><td width=1></td><td width=1 bgcolor=#cdcdcd></td><td  bgcolor=ffffff></td><td width=1 bgcolor=#cdcdcd></td><td width=1></td></tr><tr height=1><td colspan=2 width=2></td><td bgcolor=#cdcdcd></td><td colspan=2 width=2></td></tr></td></tr></table>";
	document.write(rstr);
}

function popco_bold_start(w){
	var rstr ="<table cellpadding=0 cellspacing=0 border=0 width=" +(w+4) + " align=center><tr><td colspan=2 width=2></td><td width=" +w +" class=pbox_bold></td><td colspan=2 width=2></td></tr><tr><td width=1></td><td width=1 class=pbox_bold></td><td bgcolor=ffffff></td><td width=1 class=pbox_bold></td><td width=1></td></tr><tr><td colspan=5 align=center>";
	document.write(rstr);
}
function popco_bold_end(){
	var rstr ="</td></tr><tr height=1><td width=1></td><td width=1 bgcolor=#C9C9C9></td><td  bgcolor=ffffff></td><td width=1 bgcolor=#C9C9C9></td><td width=1></td></tr><tr height=1><td colspan=2 width=2></td><td bgcolor=#C9C9C9></td><td colspan=2 width=2></td></tr></td></tr></table>";
	document.write(rstr);
}


function popco_sep(){
	var rstr ="<table cellpadding=0 cellspacing=0 border=0  width=100%><tr height=10><td  bgcolor=ffffff></td></tr></table>";
	document.write(rstr);
}

function popco_cp(){ 
	alert("ÀÌº¥Æ® ÆäÀÌÁö°¡ ÀúÀåµÇ¾ú½À´Ï´Ù.\n ÇØ´ç Ä«Æä,ºí·Î±×,Ä¿¹Â´ÏÆ¼¿¡ ºÙ¿©³Ö±â ¶Ç´Â [Ctrl + V]Å°¸¦ ´©¸£½Ã¸é º¹»çµË´Ï´Ù."); 
	var event_copy = document.getElementById("copy_memo").createTextRange(); 
	event_copy.select(); 
	event_copy.execCommand('copy'); 
}

function clear_string() { 
		document.getElementById("loginvalue").value = ""; 
		
		document.getElementById("pwvalue").value = ""; 
		
		document.getElementById("pwvalue").style.display="none";
		document.getElementById("pwvalue2").style.display="";
		document.getElementById("loginvalue").focus();
	}
function dc_menu(val){
		if(val=='compact')
		{
			document.all('compact').style.display='';
			document.all('slr').style.display='none';
		}else{
			document.all('slr').style.display='';
			document.all('compact').style.display='none';
		}
}

function image_auto_resize(this_s,width,height){ 
 var ta_image = new Image(); 
 ta_image.src = this_s.src; 
  if(!width){this_s.removeAttribute('width'); 
  this_s.style.width='auto';} 
  else if(width < ta_image.width){ 
  this_s.width = width; 
  }else{ 
  this_s.width = ta_image.width; 
  } 
  if(!height){this_s.removeAttribute('height'); 
  this_s.style.height='auto';} 
  else if(height < ta_image.height){ 
  this_s.height = height; 
  }else{ 
  this_s.height = ta_image.height; 
  } 
} 
