function check_login() {
	var check_log=document.loginform;
	if (!check_log.memberid.value) {
		alert ('È¸¿ø ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		check_log.memberid.focus();
		return false;
		}
	if (!check_log.passwd.value) {
	alert ('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
	check_log.passwd.focus();
	return false;
	}
}
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 OpenAnotherWin(szhref){
	AnotherWin = window.open(szhref,"AnotherWin", 
	"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=370,height=330");
}

var nk = 0;
function rndhphoto(){
	setTimeout("hphotoChange()",2000);
}

function hphotoChange(now){
	max = hphoto.length;
	hphoto[nk].style.display='none';

	++nk;
	nk=nk==max?0:nk;

	hphoto[nk].style.display='block';

	if(!now)rndhphoto();
}

var o = 0;
function ondhphoto(){
	setTimeout("ophotoChange()",2500);
}

function ophotoChange(now){
	max = ophoto.length;
	ophoto[o].style.display='none';

	++o;
	o=o==max?0:o;

	ophoto[o].style.display='block';

	if(!now)ondhphoto();
}

today = new Date();
var tyear = today.getYear(), tmonth = today.getMonth()+1, tday = today.getDate();
function setDate(val){
	if (val != "all"){
		var stmonth, stday;
		pday = tday - eval(val);
		date = new Date(tyear,tmonth,pday);
		stmonth = date.getMonth();
		stday = date.getDate();
		if (stmonth < 10) stmonth = "0" + stmonth;
		if (stmonth == 00) stmonth = "01";
		if (stday < 10) stday = "0" + stday;
		if (stday == 00) stday = "01";
		search_result.s_day.value = date.getYear() + '-' + stmonth + '-' + stday;
	} else {
		search_result.s_day.value = "2000-11-15";
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function check_comment() {
	var check_comm=document.comm;
	if (!check_comm.member_name.value) {
		alert ('ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		check_comm.member_name.focus();
		return false;
	}

	if (!check_comm.subject.value) {
		alert ('Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		check_comm.subject.focus();
		return false;
	}

	if (!check_comm.comment.value) {
		alert ('³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		check_comm.comment.focus();
		return false;
	}

	if (!check_comm.del_pass.value) {
		alert ('µ¶ÀÚÀÇ°ß »èÁ¦½Ã ÇÊ¿äÇÕ´Ï´Ù. ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		check_comm.del_pass.focus();
		return false;
	}

}

function setCookie(name,value,expires) { 
	document.cookie=name + "=" + escape(value) + ((expires == null)? "" : (" ; expires=" + expires.toGMTString()));
}

function getCookie(name) { 
	var arg = name + "="; 
	var alen = arg.length; 
	var clen = document.cookie.length; 
	var i = 0; while(i< clen) { 
	var j = i + alen; 
	if(document.cookie.substring(i,j)==arg){ 
		var end = document.cookie.indexOf(";",j);
		if(end == -1) end = document.cookie.length; 
		return unescape(document.cookie.substring(j,end)); 
		}
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
		} 
		return null;
}

function getFontCookie() { 
	var cookie = getCookie("news_font_size");
	if ( cookie == null ) return 16;
	if ( cookie.length ) return cookie; else return 16; 
}

function scaleFont(val) {
	var content, lineHeight; 
	content = document.getElementById("content"); 

	if (val > 0) {
		if (fontSize <= 18) { 
			fontSize = fontSize + val; 
			lineHeight = fontSize+Math.round(1.1*fontSize); 
			content.style.fontSize = fontSize + "px"; 
		} 
	} else {
		if (fontSize > 12) { 
			fontSize = fontSize + val; 
			lineHeight = fontSize+Math.round(1.1*fontSize); 
			content.style.fontSize = fontSize + "px"; 
		} 
	} 
	var mydate = new Date; 
	mydate.setDate(mydate.getDate()+1000); 
	//setCookie("news_font_size", fontSize, mydate); 
}

var fontSize = parseInt(getFontCookie());

function Add_edu() {

	var checkRow = edu.rows.length;
	if (checkRow > 30){
		alert("´õÀÌ»ó Ãß°¡ÇÒ¼ö ¾ø½À´Ï´Ù.")
		return;
	}

	var eduRow=edu.insertRow(checkRow);
	var aRows=edu.rows;
	var aCells=eduRow.cells;
	var TargetCell1 = aRows(eduRow.rowIndex).insertCell(aCells.length);
	var TargetCell2 = aRows(eduRow.rowIndex).insertCell(aCells.length);
	var TargetCell3 = aRows(eduRow.rowIndex).insertCell(aCells.length);

	eduRow.style.backgroundColor = "#f7f7f7"
	TargetCell1.align = "center"
	TargetCell2.align = "left"
	TargetCell3.align = "center"

	imgname = eduRow.rowIndex + 1

	TargetCell1.innerHTML="-±×¸²"+imgname+"-<br>-±×¸²"+imgname+"¼³¸í-<br><br><@"+imgname+">";
	TargetCell2.innerHTML="<input type=file name='file[]' size='50' class='input' style='width=80%;' onFocus='preview_new(this);'><input type='checkbox' name='pts"+imgname+"' value='Y'>ÃÖÀûÈ­<br><textarea name='img_con[]' cols='50' class='txtbox'></textarea><br><input type=radio name='malign"+imgname+"' value='L' checked><img src='/img/align_left.gif' align='absmiddle'><input type=radio name='malign"+imgname+"' value='C'><img src='/img/align_center.gif' align='absmiddle'><input type=radio name='malign"+imgname+"' value='R'><img src='/img/align_right.gif' align='absmiddle'> <input type='text' name='pids"+imgname+"' size='7' class='fbox1'><input type='button' value='°Ë»ö' onClick='files("+imgname+")' class='fbox2'>";
	TargetCell3.innerHTML=" ";
}


function Del_edu() {
	var myCheckRow = edu.rows.length;

	if (myCheckRow > 0) {
		document.all.edu.deleteRow()
	} else {
		alert("´õÀÌ»ó »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù.")
	}
}

function preview_new(obj,num){
	var preview="pre"+num;

	img = obj.value;
	if (img.length == 0) return;
	idx = img.lastIndexOf("\\");
	filename = img.substring(idx+1);
	idx2 = filename.lastIndexOf(".");
	ext = filename.substring(idx2+1);
	ext2 = ext.toLowerCase();
	if( ext2 != "jpg" && ext2 != "gif" & ext2 != "jpeg" ){
		alert('ÆÄÀÏÈ®ÀåÀÚ°¡ jpg³ª gif Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.\nÀÌ ÆÄÀÏÀº ¾÷·Îµå¸¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.');
		obj.select();
	} else{
		preview.innerHTML = "<table width='110' border='0' cellpadding='5' cellspacing='1' bgcolor='#CCCCCC'><tr><td align='center' valign='middle' bgcolor='#FFFFFF'><img src=\"file://" + img + "\" width=120></td></tr></table>";
	}
}

function addon(t) {
	var old = document.insertform.title1;
	old.value = old.value + t;
}

function Add_mov() {

	var checkRowmov = mov.rows.length;
	if (checkRowmov > 20){
		alert("´õÀÌ»ó Ãß°¡ÇÒ¼ö ¾ø½À´Ï´Ù.")
		return;
	}

	var movRow=mov.insertRow(checkRowmov);
		movRow.style.backgroundColor = "#FFFFFF"
	var aRows=mov.rows;
	var aCells=movRow.cells;
	var TargetCell1 = aRows(movRow.rowIndex).insertCell(aCells.length);
	var TargetCell2 = aRows(movRow.rowIndex).insertCell(aCells.length);

	TargetCell1.align = "center"
	TargetCell2.align = "left"
	imgname = movRow.rowIndex + 1

TargetCell1.innerHTML="µ¿¿µ»ó"+imgname+"";
	TargetCell2.innerHTML="<input type='text' name='mov_con[]' size='100' class='box' value=''>";
}


function Del_mov() {
	var mycheckRowmov = mov.rows.length;
	if (mycheckRowmov > 0) {
		document.all.mov.deleteRow()
	} else {
		alert("´õÀÌ»ó »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù.")
	}
}

function mView(url) {
document.write("<object width='600' height='511' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0' id='V000057294'><param name='allowScriptAccess' value='always'><param name='movie' value='"+ url +"'><param name='allowFullScreen' value='true'><param name='quality' value='high'><embed src='"+ url +"' width='600' height='511' id='V000057294' allowScriptAccess='always'  allowFullScreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>");
}

function m_Movie(wmv,w,h) {
document.write("<object classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width='"+ w +"' height='"+ h +"' id='mmPlayer' name='mmPlayer' type='application/x-oleobject' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' style='FILTER: xray()'><param name='Filename' value='"+ wmv +"'><param name='AutoStart' VALUE='1'><param name='AnimationAtStart' value='1'><param name='AllowChangeDisplaySize' value='1'><param name='EnableContextMenu' value='0'><param name='ShowControls' VALUE='1'><param name='ShowStatusBar' VALUE='0'><param name='ShowDisplay' VALUE='0'><param name='ShowTracker' VALUE='1'><param name='showpositioncontrols' VALUE='0'><param name='SendMouseClickEvents' VALUE='-1'><param name='Buffer' VALUE='3'></object>");
}

function m_Swf(wmv,w,h) {
document.write("<object width='"+ w +"'  height='"+ h +"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' id='V000248491'><param name='movie' value='"+ wmv +"' /><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='true' /><param name='quality' value='high' /><embed src='"+ wmv +"' width='"+ w +"' height='"+ h +"' name='V000248491' allowScriptAccess='always' allowFullScreen='true' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>");
}

function trackbac(id) {
document.write("<table align='center' style='margin:20 0 20 0'><tr><td><embed src='http://api.bloggernews.media.daum.net/static/recombox1.swf?nid="+ id +"' quality='high' bgcolor='#ffffff' width='400' height='80' type='application/x-shockwave-flash'></embed></td></tr></table>");
}

function daum_view(aid) {
document.write("<table align='center' style='margin:20 0 20 0'><tr><td><embed src='http://api.v.daum.net/static/recombox2_newscp.swf?nurl=http://www.tvdaily.co.kr/xml/?aid="+ aid +"&channel=star' quality='high' bgcolor='#ffffff' width='400' height='80' type='application/x-shockwave-flash'></embed></td></tr></table>");
}

function photoPicCtr(){
 var photoPicName ;
 for (i=1; i<=3; i++){
  photoPicName = "photoPic" + i ;
  document.getElementById(photoPicName).style.display = "none" ;
 }
 photoPicName = "photoPic" + arguments[0] ;
 document.getElementById(photoPicName).style.display = "" ;

}

function cphotoPicCtr(){
 var cphotoPicName ;
 for (i=1; i<=9; i++){
  cphotoPicName = "cphotoPic" + i ;
  document.getElementById(cphotoPicName).style.display = "none" ;
 }
 cphotoPicName = "cphotoPic" + arguments[0] ;
 document.getElementById(cphotoPicName).style.display = "" ;

}

function timeout(h){
var tout = h * 1000;
setTimeout("hide()",tout)
}

function  hide() {
	document.getElementById("pop").style.display = 'none';
	document.getElementById("gimg").style.display = '';
}

function  show() {
	document.getElementById("gimg").style.display = 'none';
	document.getElementById("movie").style.display = '';
}

function Change_Tab(f,s,c,w) {
	var tab_cnt = c;
	for(var i=1; i<=tab_cnt; i++) {
		if(i == s) {
			document.getElementById('LAY_' + f + '_' + i).style.display = 'block';
			document.getElementById('TAB_' + f + '_' + i).style.backgroundImage = 'url(/nimg/tab_' + w + '_on.gif)';
			document.getElementById('TAB_' + f + '_' + i).className = 'tab_on';
		} else {
			document.getElementById('LAY_' + f + '_' + i).style.display = 'none';
			document.getElementById('TAB_' + f + '_' + i).style.backgroundImage = 'url(/nimg/tab_' + w + '_off.gif)';
			document.getElementById('TAB_' + f + '_' + i).className = 'tab_off';
		}
	}
}

function slide(aid){
	var window_left = (screen.width-800)/2;
	var window_top = (screen.height-710)/2;
	ref = "/slide/nslide.php?aid=" + aid;      
	window.open(ref,"slide",'width=800,height=710,status=no,top=' + window_top + ',left=' + window_left + '');
}

function schange (val) {
	if (val == null || val == "")
		return;

	location.href = "nslide.php?aid=" + val;
}

function gohome(www){
	window.open(www,"home");
}

function daum(vid) {
document.write("<object id=¡¯player¡¯ type='application/x-shockwave-flash' width='502px' height='399px' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#vesion=8,0,0,0'><param name='movie' value='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' /><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='true' /><param name='bgcolor' value='#000000' /><embed src='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' width='502px' height='399px'allowScriptAccess='always' type='application/x-shockwave-flash' allowFullScreen='true' bgcolor='#000000' ></embed></object>");
}
function daum1(vid) {
document.write("<object id=¡¯player¡¯ type='application/x-shockwave-flash' width='354' height='247' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#vesion=8,0,0,0'><param name='movie' value='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' /><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='true' /><param name='bgcolor' value='#000000' /><embed src='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' width='469' height='340'allowScriptAccess='always' type='application/x-shockwave-flash' allowFullScreen='true' bgcolor='#000000' ></embed></object>");
}

function daum2(vid) {
document.write("<object id=¡¯player¡¯ type='application/x-shockwave-flash' width='220' height='150' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#vesion=8,0,0,0'><param name='movie' value='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' /><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='true' /><param name='bgcolor' value='#000000' /><embed src='http://flvs.daum.net/flvPlayerOut.swf?vid="+ vid +"' width='469' height='340'allowScriptAccess='always' type='application/x-shockwave-flash' allowFullScreen='true' bgcolor='#000000' ></embed></object>");
}

var fileUpload="false";
function setVideoInfo(movieId,mainImgUrl,time)
{
	document.insertform.vid.value=movieId;
	fileUpload='true';
}

function vodUpPopup(){
	var t= window.open('/insertdata/daum.php', 'popup1', 'width=458, height=434');	
}


function luckytime(){
	var s= window.open('http://www.luckytime.co.kr/9_daily07','luckytime');
}


if (document.all) {
	layerview='document.all'
	styleview='.style.'
} else if (document.layers) {
	layerview='document.layers'
	styleview='.'
}

function tmenu_view() {
	eval(layerview+'["tLayer"]'+styleview+'visibility="visible"')
}
function tmenu_close(){
	eval(layerview+'["tLayer"]'+styleview+'visibility="hidden"') 
}

function chglayer(ln,n){
	for(var i = 1; i <=2; i++) {
		if ( n == i ) {
			document.getElementById(ln+i).style.display = "block";
		}else{
			document.getElementById(ln+i).style.display = "none";
		}
	}
}

function cglayer(ln,n){
	for(var i = 1; i <=3; i++) {
		if ( n == i ) {
			document.getElementById(ln+i).style.display = "block";
		}else{
			document.getElementById(ln+i).style.display = "none";
		}
	}
}

function stop(id) {
	var obj = document.all('ttimg');
	var j=1;

	for(i=0; i<12; ++i) {
		if(eval(id)==i) {
			obj[i].src='/nimg/top'+j+'_over.gif';
		} else {
			obj[i].src='/nimg/top'+j+'.gif';
		}
		++j
	}
}


function SoftCheck(form) {
{
	var i,currEl,f;

	// Æû¿¡ ¸ðµç ¿ä¼ÒµéÀ» º¸ÀÚ
	for(i = 0; i < form.elements.length; i++)
	{
		currEl = form.elements[i];

		// required°¡ ÀÖ´Â°Í¸¸
		if (currEl.getAttribute("required") != null)
		{
			if(currEl.type == "TEXT" || currEl.type == "text" ||
				currEl.tagName == "SELECT" || currEl.tagName == "select" ||
				currEl.tagName == "TEXTAREA" || currEl.tagName == "textarea"){
				if(!chkText(currEl,currEl.msg)) return false;

			} else if(currEl.type == "PASSWORD" || currEl.type == "password"){
				if(!chkText(currEl,currEl.msg)) return false;

			} else if(currEl.type == "CHECKBOX" || currEl.type == "checkbox"){
				if(!chkCheckbox(currEl,currEl.msg)) return false;

			} else if(currEl.type == "RADIO" || currEl.type == "radio"){
				if(!chkRadio(currEl,currEl.msg)) return false;

			}
		}

		// ÀÔ·Â ÆäÅÏÀ» Ã¼Å©ÇÑ´Ù.
		if(currEl.getAttribute("option") != null && currEl.value.length > 0){
			if(!chkPatten(currEl,currEl.option,currEl.omsg)) return false;
		}

		if(currEl.getAttribute("ssame") != null && currEl.value != "") {
			ssameEI = eval("form." + currEl.ssame + ".value");
			if(currEl.value != ssameEI) {
				return Do_Error(currEl, "ssame");
			}
		}

		if(currEl.getAttribute("smsize") != null && currEl.value != "") {
			if(currEl.smsize > currEl.value.length) {
				return Do_Error(currEl, "smsize");
			}
		}

		if(currEl.getAttribute("mxsize") != null && currEl.value != "") {
			if(currEl.mxsize < currEl.value.length) {
				return Do_Error(currEl, "mxsize");
			}
		}
	}
}

function chkPatten(field,patten,name)
{
	var regNum		  =/^[0-9]+$/;											// ¼ýÀÚ
	var regPhone	  =/^[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$/;                  // Çü½Ä : 033-1234-5678
	var regMail		  =/^[_a-zA-Z0-9-]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/;		// ÀÌ¸ÞÀÏ
	var regDomain	  =/[a-zA-Z0-9-]+\.[a-zA-Z]+$/;						    // µµ¸ÞÀÎ
	var regEng		  =/^[[:alpha:]|[:space:]]+/;										// ¿µ¹®
	var regEngNum	  =/^[:alnum:]+/;									// ¿µ¹®+¼ýÀÚ
	var regHangul	  =/[°¡-ÆR]/;											// ÇÑ±Û
	var regHangulEng  =/[°¡-ÆRa-zA-Z]/;										// ÇÑ±Û¿µ¾î
//    var regHangulOnly =/^[°¡-ÆR]*$/;										// ÇÑ±Û¸¸
	var regId	      = /^[a-zA-Z]{1}[a-zA-Z0-9_-]{4,15}$/;					// 4~15ÀÚ ¿µ¹®¸¸
	var regDate		  =/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;                      // Çü½Ä : 2002-08-15
	var regVar		  =/-/;

	patten = eval(patten);
	if(!patten.test(field.value)){

		if (field.option == 'regNum')
			alert('¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
		else if (field.option == 'regPhone')
			alert('ÀüÈ­¹øÈ£ Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù. -¸¦ Æ÷ÇÔÇØ¼­ ³Ö¾îÁÖ¼¼¿ä');
		else if (field.option == 'regMail')
			alert('¸ÞÀÏÁÖ¼Ò Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù.');
		else if (field.option == 'regDomain')
			alert('µµ¸ÞÀÎ Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù.');
		else if (field.option == 'regEng')
			alert('¿µ¹®¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
		else if (field.option == 'regEngNum')
			alert('¿µ¹®,¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
		else if (field.option == 'regHangul')
			alert('ÇÑ±Û¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
		else if (field.option == 'regHangulEng')
			alert('ÇÑ±Û,¿µ¹®¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
		else if (field.option == 'regId')
			alert('¾ÆÀÌµð´Â ÃÖ¼Ò 4, ÃÖ´ë 15±ÛÀÚ, ¿µ¹®¸¸ °¡´ÉÇÕ´Ï´Ù.');
		else if (field.option == 'regDate')
			alert('³¯Â¥ Çü½Ä¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù. 0000-00-00 °°ÀÌ ³Ö¾îÁÖ¼¼¿ä');
		else
			alert(name);

		field.focus();
		field.style.backgroundColor=focusColor;
		return false;
	}
	return true;
}


function chkText(field, name)
{
	fieldvalue = field.value;
	fieldvalue = fieldvalue.split(" ");

	if(field.value.length + 1 == fieldvalue.length){
		alert(name);
		field.value = "";
		field.focus();
		return false;
	}
	return true;
}

function chkCheckbox(field, name)
{
	if (!field.checked){
		alert(name);
		field.focus();
		return false;
	}
	return true;
}

function chkRadio(field, name)
{
	var bChk = false;
	var obj = form.elements[field.name];
	var length = obj.length;
	var i;

	for (i=0;i<length;i++) {
		if (obj[i].checked)
			return true;
	}
	alert(name);
	field.focus();
	return false;
}


function Do_Error(el,type)
{
	name = (el.msg) ? el.msg : el.name;
	switch(type) {
		case "ssame":
			alert(name + " Ç×¸ñÀº " + el.ssame + " Ç×¸ñ°ú °°¾Æ¾ß ÇÕ´Ï´Ù.");
			break;
		case "smsize":
			alert(el.smsize + "ÀÚ ÀÌ»óÀ¸·Î " + name);
			break;
		case "mxsize":
			alert(el.mxsize + "ÀÚ ÀÌÇÏ·Î " + name);
			break;
		}
	el.focus();
	return false;
}

}

function chg_movie(no) {
	DOM = document.createElement("script"); 
	DOM.src = '/movie/get_movie.php?no='+no; 
	document.body.appendChild(DOM); 
}

function gmovie(no) {
	DOM = document.createElement("script"); 
	DOM.src = '/movie/gmovie.php?no='+no; 
	document.body.appendChild(DOM); 
}

function photoPicCtr(){
 var photoPicName ;
 for (i=1; i<=4; i++){
  photoPicName = "photoPic" + i ;
  document.getElementById(photoPicName).style.display = "none" ;
 }
 photoPicName = "photoPic" + arguments[0] ;
 document.getElementById(photoPicName).style.display = "" ;

}

var po = 1;
function aphoto(){
	setTimeout("aChange()",300000);
}

function aChange(now){
	++po;
	po=po==4?1:po;

	photoPicCtr(po);

	if(!now)aphoto();
}

function ViewDiv(vnum,divname,cnt ) {
	var i,n,o;
	n = cnt;

	for(i = 1; i <= n; i++) {
		o = document.getElementById(divname + i);
		if(i == vnum) {
			o.style.display = '';
		} else {
			o.style.display = 'none';
		}
	}
}

//---------------------------------------------------------------------------------------------------
// className display º¯°æ
//---------------------------------------------------------------------------------------------------
function ViewClassname(vnum,divname,cnt,sclass ) {
	var i,n,o;
	n = cnt;

	for(i = 1; i <= n; i++) {
		o = document.getElementById(divname + i);
		if(i == vnum) {
			o.className = sclass;
		} else {
			o.className = 'none';
		}
	}
}

function files(n){
	var f = document.getElementById("pids"+n);
	var window_left = (screen.width-900)/2;
	var window_top = (screen.height-700)/2;
	ref = "/photo/search.php?id="+f.name;
	window.open(ref,"fbox",'width=900,height=700,scrollbar=yes,status=no,top=' + window_top + ',left=' + window_left + '');
}

function mainFlashclose() {
	eval(layerview+'["photoad"]'+styleview+'visibility="hidden"') 
}
