/*·Ñ¿À¹ö°ü·Ã ½ºÅ©¸³Æ®*/
count=0;var picOff=new Array();var picOn=new Array();
function TurnOn1(num){eval("picV"+num+"=new Image()");eval("picV"+num+".src='"+picOn[num]+"'");eval("document.pic"+num+"a.src=picV"+num+".src");};
function TurnOff1(num1){eval("picZ"+num1+"=new Image()");eval("picZ"+num1+".src='"+picOff[num1]+"'");eval("document.pic"+num1+"a.src=picZ"+num1+".src");};
function rollover(picoff1,picon1,url,target){picOff[count]=picoff1;picOn[count]=picon1;document.write("<a href='"+url+"' target='"+target+"' onmouseover='TurnOn1("+count+")' onmouseout='TurnOff1("+count+")'><img src='"+picoff1+"' border=0 name='pic"+count+"a'></a>");TurnOn1(count);TurnOff1(count);count++;};
/*·Ñ¿À¹ö°ü·Ã ½ºÅ©¸³Æ®*/


/* °Ô½ÃÆÇ ÄÁÅÙÃ÷µî »çÀÌÁî ¿À¹öµÈ ÀÌ¹ÌÁö °­Á¦ Å©±â ÁöÁ¤ */
function ImageAutoResize(MaxWidth) {
  for(var i=0;i<document.images.length;i++) {
    if(document.images[i].width > MaxWidth) {
      document.images[i].width=MaxWidth;
      document.images[i].height-=document.images[i].height*(document.images[i].width-MaxWidth)/document.images[i].width;
    }
  }
}

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_findObj(n, d) 
{ //v4.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);
	if(!x && document.getElementById) 
		x=document.getElementById(n); 
		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];
	}
}

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];
		}
	}
}

//nothing
function nothing() {}

//Á¤ÀÌ»ç´Ô ¿ÀÇÂÆäÀÌÁö
function open_popup(url) {
	var openURL="/download/files/"+url;
	var popup = window.open(openURL,"","toopbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=750,height=660");
	
	if(navigator.appName.substring(0,8) == "Netscape") {
		popup.location = openURL;
	}
}

// openwindow
function OpenWindow(url,intWidth,intHeight) { 
    window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=0,status=1") ;
}

// openwindow ½ºÅ©·ÑÀÌ ÀÖÀ» ¶§
function OpenWindow_s(url,intWidth,intHeight) { 
    window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=1") ;
}

// openwindow popup1
function OpenWindowPopup(url,intWidth,intHeight,intLeft,intScroll) {
	leftPos=0;
	
	if(intLeft >0) {
		if(screen) { 
			leftPos = screen.width-intLeft;
		}
	}
	popup1 = window.open(url,"popup1","width="+intWidth+",height="+intHeight+",left="+leftPos+",scrollbars="+intScroll+",toolbar=no,top=0,status=1");
}

// openwindow popup2
function OpenWindowPopup2(url,intWidth,intHeight,intLeft,intScroll) {
	leftPos=0;
	
	if(intLeft >0) {
		if(screen) { 
			leftPos = screen.width-intLeft;
		}
	}
	popup2 = window.open(url,"popup2","width="+intWidth+",height="+intHeight+",left="+leftPos+",scrollbars="+intScroll+",toolbar=no,top=0,status=1");
}

// openwindow popup3
function OpenWindowPopup3(url,intWidth,intHeight,intLeft,intScroll) {
	leftPos=0;
	
	if(intLeft >0) {
		if(screen) { 
			leftPos = screen.width-intLeft;
		}
	}
	popup3 = window.open(url,"popup3","width="+intWidth+",height="+intHeight+",left="+leftPos+",scrollbars="+intScroll+",toolbar=no,top=0,status=1");
}

// ÇÁ·¹ÀÓ »ðÀÔ½Ã
function parent_content(str) {
	url=str;
	parent.location.href=url;
}
// ÆäÀÌÁö ÀÌµ¿
function Redirect_self(str) {
	url=str;
	location.href=url;
}
//°ø°³°­ÀÇ viewer·Î ÀÌµ¿
//function PREVIEW_RUN(pcode) {
//	window.open("/online/previewer.asp?pcode="+pcode, "win", "left=50,top=0,width=904,height=648,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no");
//}

// ÂÊÁöÃ¢ ¿­±â
function memo()
{                              
	//window.location.href="http://www.lba21.com/mypage/";

	shape  = "width=535,height=360,";
	shape += "toolbar=no,location=no,directories=no,status=no,";
	shape += "menubar=no,scrollbars=yes,resizable=yes";
	//path   = "http://www.lba21.com/mypage/memo/memo1.asp?nnow=<%=server.Urlencode(now())%>&mem_level=<%=mem_level%>";
	path   = "http://www.lba21.com/mypage/memo/memo1.asp";
  	open(path, "memo", shape);
	//window.location.reload();
}                              
//¼±¹°Ã¢ ¿­±â
function gift()
{
	//window.location.href="http://www.lba21.com/mypage/";

	shape  = "width=535,height=360,";
	shape += "toolbar=no,location=no,directories=no,status=no,";
	shape += "menubar=no,scrollbars=yes,resizable=yes";
	//path   = "http://www.lba21.com/mypage/gift/gift1.asp?nnow=<%=server.Urlencode(now())%>";
	path   = "http://www.lba21.com/mypage/gift/gift1.asp";
  	open(path, "memo", shape);
	//window.location.reload();
}

// ÆË¾÷¸Þ´º ÂÊÁöÃ¢ ¿­±â  num = 1 ¹ÞÀºÂÊÁö¸Þ´º
//				num = 2 º¸³½ÂÊÁö¸Þ´º
//				num = 3 º¸³»±â¸Þ´º
function memo_open(num)
{                              
    recv_user = user_id;
	shape  = "width=535,height=360,";
	shape += "toolbar=no,location=no,directories=no,status=no,";
	shape += "menubar=no,scrollbars=yes,resizable=yes";
	switch(num){
	case "1" :
	//path   = "http://www.lba21.com/mypage/memo/memo1.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/memo/memo1.asp?recv_user="+recv_user;
	break;	
	case "2":
	//path   = "http://www.lba21.com/mypage/memo/memo2.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/memo/memo2.asp?recv_user="+recv_user;
	break;	
	case "3":
	//path   = "http://www.lba21.com/mypage/memo/memo3.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/memo/memo3.asp?recv_user="+recv_user;
	break;	
	default : alert("ÀÎ¼öÀß¸øÀÔ·Â");
	}
  	open(path, "memo", shape);
//	window.location.reload();
}                              

// ÆË¾÷¸Þ´º ¼±¹°Ã¢ ¿­±â  num = 1 ¹ÞÀº¼±¹°¸Þ´º
//				num = 2 º¸³½¼±¹°¸Þ´º
//				num = 3 º¸³»±â¸Þ´º

function gift_open(num)
{
	shape  = "width=535,height=360,";
	shape += "toolbar=no,location=no,directories=no,status=no,";
	shape += "menubar=no,scrollbars=yes,resizable=yes";
    recv_user = user_id;
	switch(num){
	case "1":
	//path   = "http://www.lba21.com/mypage/gift/gift1.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/gift/gift1.asp?recv_user="+recv_user;
	break;
	case "2":
	//path   = "http://www.lba21.com/mypage/gift/gift2.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/gift/gift2.asp?recv_user="+recv_user;
	break;	
	case "3":
	//path   = "http://www.lba21.com/mypage/gift/gift_people_list.asp?nnow=<%=server.Urlencode(now())%>&recv_user="+recv_user;
	path   = "http://www.lba21.com/mypage/gift/gift_people_list.asp?recv_user="+recv_user;
	break;	
	default : alert("ÀÎ¼öÀß¸øÀÔ·Â");
	}
  	open(path, "memo", shape);
//	window.location.reload();
}


//±ÛÀÚ Å©±â Á¶Àý  --> +:Ä¿Áü , -:ÀÛ¾ÆÁü
// var fontSize = 13 ; 
 var nowFontSz = 9 ; 
 var nowlineHei= 1 ;
function fontsz(){
//	if (document.getElementById) fontObj = document.getElementById("fontSzArea").style ;
//	else if (document.all) fontObj = document.all("fontSzArea").style ;
	fontObj = document.getElementById("fontSzArea").style ;
	// Font Resize
		if (arguments[0] == "-")
		{
			if (nowFontSz <= 9) return ;
				fontObj.fontSize = nowFontSz-1 + "pt" ;		
			nowFontSz = eval(nowFontSz-1) ;		
			if(nowFontSz < 12)
			{
				fontObj.lineHeight = nowlineHei-0.1 ;
				nowlineHei = nowlineHei-0.1 ;
			}			
		}
		else if (arguments[0] == "+")
		{
			if (nowFontSz >= 21) return ;
				fontObj.fontSize = nowFontSz+1 + "pt" ;
			nowFontSz = eval(nowFontSz+1) ;		
			if(nowFontSz < 13)
			{
				fontObj.lineHeight = nowlineHei+0.2 ;
				nowlineHei = nowlineHei+0.2 ;
			}  
		}
//	alert(nowFontSz);		
}

//½ºÅ©·¦
function scrap(bm_boardname,page,list_id,wt) {
	if (confirm("½ºÅ©·¦ ÇÏ½Ã°Ú½À´Ï±î?")) {
		strURL = "/board/scrap_prog.asp?bm_boardname="+bm_boardname+"&page="+page+"&list_id="+list_id;
		window.location = strURL;
	}
	else {
		strURL = "content.asp?bm_boardname="+bm_boardname+"&page="+page+"&id="+list_id;
		window.location = strURL;		
		//return false;
	}
}

//»ýÁß°è¼¼¹Ì³ª...
function LIVEVIEW_RUN() {
    //window.open("/online/viewer/liveviewer_NoMagicLock.asp", "_blank", "width=640,height=550,resizable=0,scrollbars=0");	
}

//etc ¸â¹ö½Ê Æ¯º° °­ÀÇ...
function ETCVIEW_RUN(pcode) { 
	//44¹ø ¹Ìµð¾î¼­¹ö
    window.open("/online/viewer/etcviewer.asp", "_blank", "width=346,height=508,resizable=0,scrollbars=0");
}

//AIÆÄÀÏ ´Ù¿î·Îµå
function DOWN_AI_FILE(pcode) {
	leftPos=0;
	topPos=0;
	widBox=520;
	heiBox=320;
	if(screen){ 
		leftPos = (screen.width/2)-(widBox/2);
		topPos = (screen.height/2)-(widBox/2);
	}
	window.open("/lawm/DownLoadFilesOnly.asp?pcode="+pcode,"","scrollbars=no,toolbar=no,width="+widBox+",height="+heiBox+",left="+leftPos+", top="+topPos);
}

//ÀÏ¹ÝÆÄÀÏ´Ù¿î·Îµå ÆÄÀÌ¸ÞÅ¸ : ÀüÃ¼°æ·Î ¿¹:F:\img.lba21.com\21\img\notice\1229_MB_DOWN..pdf
function DOWN_FILES(filepath) {
	leftPos=0;
	topPos=0;
	widBox=520;
	heiBox=230;
	if(screen){ 
		leftPos = (screen.width/2)-(widBox/2);
		topPos = (screen.height/2)-(widBox/2);
	}
	window.open("/DownLoads/DownLoadFilesOnly.asp?filepath="+filepath,"","scrollbars=no,toolbar=no,width="+widBox+",height="+heiBox+",left="+leftPos+", top="+topPos);
}

//ÀÏ¹ÝÆÄÀÏ´Ù¿î·Îµå ÆÄÀÌ¸ÞÅ¸ : ÀüÃ¼°æ·Î ¿¹:F:\img.lba21.com\21\img\notice\1229_MB_DOWN..pdf
function DOWN_FILES2(filepath) {
	leftPos=0;
	topPos=0;
	widBox=520;
	heiBox=235;
	if(screen){ 
		leftPos = (screen.width/2)-(widBox/2);
		topPos = (screen.height/2)-(widBox/2);
	}
	window.open("/DownLoads/DownLoadFilesOnly.asp?filepath="+filepath,"","scrollbars=no,toolbar=no,width="+widBox+",height="+heiBox+",left="+leftPos+", top="+topPos);	
}


//www.lba21.com ¿¡¼­ ¹Ì´ÏÈ¨ÇÇ¿­±â
function lba_minihome(memid){
		window.open('/inc/lba_miniwd_go.asp?user_id='+memid,'mini01','location=no,directories=no,resizable=no,status=no,toolbar=no,menubar=no,scrollbars=no,width=920,height=600,top=100,left=100');
}

//www.lba21.com ¾ÆÀÌµðÆË¾÷Ã¢¿¡¼­ ¹Ì´ÏÈ¨ÇÇ¿­±â
function lba_minihome_pop(){
		window.open('/inc/lba_miniwd_go.asp?user_id='+user_id,'mini01','location=no,directories=no,resizable=no,status=no,toolbar=no,menubar=no,scrollbars=no,width=920,height=600,top=100,left=100');
}
