//**************************************
// 帲 ϴ Լ̺귯
//**************************************


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_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];}}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//trimü
String.prototype.trim = function(){
	return this.replace(/(^[ \f\n\r\t]*)|([ \f\n\r\t]*$)/g, "");
}
//ֹιȣ ˻
function juminCheck(jumin){
	if(jumin.length != 13)
		return false;


	total = 0;
	temp = new Array(13);
	for(i = 1; i <= 13; i++){
		temp[i] = jumin.charAt(i-1);
	}
	for(i = 1; i<=12; i++){
		k = i+1;
		if(k >=10)
			k = k % 10 + 2;
		total = total + temp[i] * k;
	}
	mm = temp[3] + temp[4];
	dd = temp[5] + temp[6];
	totalmod = total % 11;
	chd = (11 - totalmod)%10;
	if(chd == temp[13] && mm < 13 && dd < 32 && (temp[7] == 1 || temp[7] == 2|| temp[7] == 3|| temp[7] == 4))
		return true;

	return false;
}

// ũ κп <a href="javascript:catalog_open('ī޷α ̸');">  ۼ
function catalog_open(ecatalog_name){
	var win = window.open("http://www.n-catalog.com/album_db/main_album.htm?ecatalog_name="+ecatalog_name,"wCatalog","width=1024,height=768,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");	
	win.focus();
}


//Ŭϸ ˾ ū̹ 
<!--
function OpenImage(s){
        //
        //  
        // 
        srcImg = new Image();
        clientWidth = screen.width;
        clientHeight = screen.height;
        srcImg.src = s;
  //
  //   ̸
  //
        var srcFileName = srcImg.src.substr(srcImg.src.lastIndexOf("/")+1, srcImg.src.length);
        //
        // â  ̹ 
        //
        win = window.open("","","width=15,height=15,scrollbars=no,resizable=no,left="+(clientWidth/2-15)+",top="+(clientHeight/2-15)+"");
        win.document.writeln("<html>");
        win.document.writeln("<head>");
        win.document.writeln("<title>"+document.title+" ["+srcFileName+"]</title>");
        win.document.writeln("</head>");
        win.document.writeln("<body style='margin:0px;' bgcolor='#ffffff' oncontextmenu='return false' onselectstart='return false' ondragstart='return false'>");
        win.document.writeln("<table border='0' cellpadding='0' cellspacing='0' style='cursor:hand' onclick='self.close()'>");
        win.document.writeln(" <tr>");
        win.document.writeln("  <td align='center'><img src="+s+" name='winImg' style='cursor:hand' onclick='self.close()' alt='Ŭϸ ϴ'></td>");
        win.document.writeln(" </tr>");
        win.document.writeln("</table>");
        win.document.writeln("</body>");
        win.document.writeln("</html>");

        srcImg = win.document.winImg;
        //
        // ̹  εɶ ٸ
        //
        while(true)
                if(srcImg.readyState == "complete")
                        break;
        
        //
        // â ũ 
        //
        var winWidth = srcImg.width+10;
        var winHeight = srcImg.height+50;
        //
        // â  ġ 
        //
        var left = (clientWidth/2)-(srcImg.width/2);
        var top = (clientHeight/2)-(srcImg.height/2);
	//	win.moveTo(left, top);
	//	win.resizeTo(winWidth, winHeight);

        //
        // ̹ ũ overflow Ȯ â ũ ġ 缳
        //
        if(clientWidth <= srcImg.width){
                winWidth = clientWidth;
                left = 0;
                win.document.body.scroll = "auto";
        }
        if(clientHeight <= srcImg.height){
                winHeight = clientHeight-30;
                top = 0;
                win.document.body.scroll = "auto";
        }
        //
        // ̹ε  ̹ ũ⸦ Ҽ ִ.
        // ش ̹  ° 츦 缳Ѵ.
        win.moveTo(left, top);
        win.resizeTo(winWidth, winHeight);
}

function adminOpen(){
	var win = window.open("/admin/login.htm","Admin_smh","width=990,height=800,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");	
	win.focus();
}

function keypressed(){
  if(event.button==2){      
    alert("右側マウスを使うことができないです。");
	return false;
  }
}
document.onmousedown=keypressed;

//-->