//01 ·Î±×ÀÎ
function submit(form) {
		if (form_minilog.membership_id.value == "") {alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");form_minilog.membership_id.focus();return;}
		if (form_minilog.membership_password.value == "") {alert("¾ÏÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");form_minilog.membership_password.focus();return;}
		{ form_minilog.submit();}		

		}

function focusmove() {
  document.form_minilog.membership_id.focus();
  return;
}



//02 Á¡¼±¾ø¾Ö±â
function bluring(){ 

		if (document.body)	{
			if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
		}
} 



//03 png24 ÀÌ¹ÌÁö ÆÄÀÏÀ» À¥¿¡¼­ Åõ¸íÇÏ°Ô º¯°æÇÏ´Â ½ºÅ©¸³Æ® 
function setPNG24(obj) { 
	obj.width=obj.height=1; 
	obj.className=obj.className.replace(/\bPNG24\b/i,''); 
	obj.style.filter = 
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
	obj.src=''; 
	return ''; 
} 



//04 ¸ÞÀÎ °Ô½ÃÆÇ ÅÇ
function cu(stat){
	if (stat == 1){ 
		document.all.cu1.style.display = "block"; 
		document.all.cu2.style.display = "none";

		} else if (stat == 2){  
		document.all.cu1.style.display = "none"; 
		document.all.cu2.style.display = "block"; 
		} 
}



//05 ÇÃ·¡½ÃÁ¦¾î <script type="text/javascript">flashObj("http://image.campushomepage.com/users/cerc/swf/sub_tt.swf", 947, 172, "main");</script>
function flashObj(src,w,h,id){ 
html = '';
html += '<object type="application/x-shockwave-flash"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase=http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36  id="'+id+'" width="'+w+'" align="center" height="'+h+'">';  
html += '<param name="movie" value="'+src+'" />'; 
html += '<param name="quality" value="high" />'; 
html += '<param name="bgcolor" value="#ffffff" />';
html += '<param name="wmode" value="transparent" />';		
html += '<param name="menu" value="false" />';  
html += '<param name="allowScriptAccess" value="always" />';  
html += '<embed src="'+src+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" id="'+id+'"></embed>'; 
html += '<\/object>'; 
document.write(html);
}


//06 »çÀÌÁî¿¡ ¸Â°Ô ÀÌ¹ÌÁö ÆË¾÷À¸·Î//<a href="javascript:view('ÀÌ¹ÌÁö°æ·Î')">¸µÅ©³»¿ë</a>
function view(what) { 
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title></title>\n"); 
imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 
imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).height);\n"); 
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 30; myWidth = eval(pic).width + 12;\n"); 
imgwin.document.write("  } else { myHeight = eval(pic).height + 0; myWidth = eval(pic).width; }\n"); 
imgwin.document.write("  clearTimeout();\n"); 
imgwin.document.write("  var height = screen.height;\n"); 
imgwin.document.write("  var width = screen.width;\n"); 
imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
imgwin.document.write("  self.resizeTo(myWidth, myHeight);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
imgwin.document.write("</sc"+"ript>\n"); 
imgwin.document.write("</head>\n"); 
imgwin.document.write('<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" bgcolor="#FFFFFF" onClick="self.close()">\n'); 
imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=0 name=il onload='resize();'>\n"); 
imgwin.document.write("</body>\n"); 
imgwin.document.close(); 
} 


//07 ¸Þ´º ¹Ù²î´Â ½ºÅ©¸³Æ®
function bt(id,kacsn) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+kacsn+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
}  


//08 Ç®´Ù¿î ¸Þ´º·Î Å¸ »çÀÌÆ® ÀÌµ¿ÇÏ±â
function channelChange(url)
{
    if (url != "") {
//        top.location.href = url;
        window.open(url);
    }
}

//09 ÇÁ¸°Æ®
function printit()  
{
    window.print() ;  
}



//10 Á¦Ç°º° ÆË¾÷Ã¢¶ç¿ì±â//<a href="javascript:win('ÆäÀÌÁö°æ·Î','',°¡·Î,¼¼·Î)" >
var page,wid,hit,nam;
function win(page,nam,wid,hit){
var  windo=eval('window.open("'+page+'","'+nam+'","status=no,toolbar=no,resizable=no,scrollbars=yes, menubar=no,width='+wid+',height='+hit+',top=20,left=20")');
  }



//11 TD¿¡ ¸µÅ©°É±â
//<td  onclick="javascript:self.close()" style="cursor:hand;">
//<TD onclick="Url('¸µÅ©ÁÖ¼Ò')" style="cursor:hand;"></TD>
function Url(url) {
document.location.href=url;
}


//12 ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ ÀÚµ¿Á¶Àý
function resizeFrame(iframeObj){
        var innerBody = iframeObj.contentWindow.document.body;
        oldEvent = innerBody.onclick;
        innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
        var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
        iframeObj.style.height = innerHeight;
        var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
        iframeObj.style.width = innerWidth;     
        if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
        this.scrollTo(1,1);
}






// ¸Þ´º ¹Ù²î´Â ½ºÅ©¸³Æ®
function bt(id,kacsn) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+kacsn+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
}

//Ç®´Ù¿î ¸Þ´º·Î Å¸ »çÀÌÆ® ÀÌµ¿ÇÏ±â
function channelChange(url)
{
    if (url != "") {
//        top.location.href = url;
        window.open(url);
    }
}

//ÁÖ¹Î¹øÈ£ Ã¼Å© (¿Ã¹Ù¸¥ ÁÖ¹Î¹øÈ£ Çü½Ä)
function Socno_chk(number) 
{
	IDtot = 0;
	IDAdd="234567892345";

	for(i=0;i<12;i++) {	
		IDtot=IDtot+parseInt(number.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1));
	}
	
	IDtot=11-(IDtot%11);

	if(IDtot==10){
		IDtot=0;
	}else if(IDtot==11){
		IDtot=1;
	}
	if(parseInt(number.substring(12,13))!=IDtot) return true;
} 

//ÆË¾÷ »çÀÌÁî º¯°æ
function PopResize(w, h){
	resizeTo(w,h);
}

//ÀÌ¹ÌÁö ¸®»çÀÌÂ¡
function img_resize(maxsize) {
	// DivContents ¿µ¿ª¿¡¼­ ÀÌ¹ÌÁö°¡ maxsize º¸´Ù Å©¸é ÀÚµ¿ ¸®»çÀÌÁî ½ÃÄÑÁÜ
    var content = document.getElementById("DivContents");
    var img = content.getElementsByTagName("img");
    for(i=0; i<img.length; i++)
    {

        if ( eval('img[' + i + '].width > maxsize') )
        {
            var heightSize = ( eval('img[' + i + '].height')*maxsize )/eval('img[' + i + '].width') ;
            eval('img[' + i + '].width = maxsize') ;
            eval('img[' + i + '].height = heightSize') ;
        }
    }
}

// ÇüÅÂÀÇ string °´Ã¼¸¦ date °´Ã¼·Î º¯È¯
function toTimeObject(time) { //parseTime(time)
	var year  = time.substr(0,4);
	var month = time.substr(5,2) - 1; // 1¿ù=0,12¿ù=11
	var day   = time.substr(8,2);
	var hour  = "00"
	var min   = "00"

	return new Date(year,month,day,hour,min);
}

// ÇüÅÂÀÇ string °´Ã¼ÀÎ µÎ ³¯Â¥ÀÇ ÀÏ(ìí) Â÷ÀÌ¸¦ Integer ÇüÅÂ·Î ¹ÝÈ¯
function getDayInterval(time1,time2) {
	var date1 = toTimeObject(time1);
	var date2 = toTimeObject(time2);
	var day   = 1000 * 3600 * 24; //24½Ã°£

	return parseInt((date2 - date1) / day, 10);
}

