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") ;
}

// 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;
}

//°ø°³°­ÀÇ 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");
//}

// openwindow
//function VIEW_RUN1(pcode) { 
//    window.open("/online/13plus/viewer.asp?pcode="+pcode, "_blank", "width=346,height=508,resizable=0,scrollbars=0") ;
//}

// ÂÊÁöÃ¢ ¿­±â
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.lbaedu.com/mypage/memo/memo1.asp?nnow=<%=server.Urlencode(now())%>";
  	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.lbaedu.com/mypage/gift/gift1.asp?nnow=<%=server.Urlencode(now())%>";
  	open(path, "memo", shape);
	window.location.reload();
}
