
function deleteDBvalue(title,url)
{
	var title;
	var url
	if (confirm(title+" ¸¦ Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		location.href=url;
	}

}


function getSchoolDate()
{
	window.open('program/admin/dal.php','dal','status=yes,resizeable=no,scrollbars=yes,width=350,height=550');
}


function loginMainCheck()
{
	var form	=	document.loginMain;

	if (form.userid.value=='') 
	{
		window.alert('¾ÆÀÌµð¸¦ ÀûÀ¸¼¼¿ä.');
		form.userid.focus();
		return;
	}

	if (form.passwd.value=='') 
	{
		window.alert('ÆÐ½º¿öµå¸¦ ³Ö¾îÁÖ¼¼¿ä');
		form.passwd.focus();
		return;
	}

	form.submit();	
}

function chkform(obj) 
{
	obj.contents.value = myeditor.outputBodyHTML();
	return true;
}



function gg()
{
	var popWidth	=	800;
	var popHeight	=	600; 

	window.open ("/vp/vp.htm","EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,resize=no,toolbar=no,left=50,top=50");

}



function makeVOD(modeValue)
{
	var popWidth	=	700;
	var popHeight	=	730; 

	window.open ("/blog/blog_pop/makeForVodContent.php?tod="+modeValue+"&subsiteNo=<?=$subsiteNo?>","EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,resize=yes,toolbar=no,left=50,top=50");

}



function HeadEditVODTop(modeValue)
{
	var popWidth	=	900;
	var popHeight	=	730; 

	window.open ("/blog/blog_pop/makForVOD.php?mode="+modeValue+"&subsiteNo=<?=$subsiteNo?>","EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=50,top=50");

}

function aviView(modeValue)
{
	var popWidth	=	710;
	var popHeight	=	630; 

	window.open ("/blog/blog_pop/aviView.php?vodNo="+modeValue+"&session_userNo=<?=$COOKIE['s_userno']?>&subsiteNo=<?=$subsiteNo?>&chk=<?=$chk?>","EditForBlofZZ","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,status=yes,left=50,top=50");

}


function aviViewContent(modeValue)
{
	var popWidth	=	500;
	var popHeight	=	400; 

	window.open ("/blog/blog_pop/aviViewContent.php?vodNo="+modeValue+"&session_userNo=<?=$COOKIE['s_userno']?>&subsiteNo=<?=$subsiteNo?>&chk=<?=$chk?>","EditForBlofZZ","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,status=yes,left=50,top=50");

}


function aviViewPage(val,modeValue)
{
	var popWidth	=	710;
	var popHeight	=	630; 

	window.open ("/blog/blog_pop/aviView.php?total="+val+"&vodNo="+modeValue+"&session_userNo=<?=$COOKIE['s_userno']?>&subsiteNo=<?=$subsiteNo?>&chk=<?=$chk?>","EditForBlofZZ","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,status=yes,left=50,top=50");

}


function makeCastingTop(modeValue)
{
	var popWidth	=	700;
	var popHeight	=	700; 
	window.open ("/blog/blog_pop/makeForCastingTop.php?mode="+modeValue+"&session_userNo=<?=$COOKIE['s_userno']?>&chno=<?=$chno?>&chk=<?=$chkChanel?>","EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=50,top=10");

}

function makeCastingContent(modeValue)
{
	var popWidth	=	600;
	var popHeight	=	750; 
	window.open ("/blog/blog_pop/makeForCastingContent.php?mode="+modeValue+"&session_userNo=<?=$COOKIE['s_userno']?>&chno=<?=$chno?>&chk=<?=$chkChanel?>","EditForBlofC","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=5,top=5");

}


function listUp()
{
	var popWidth	=	720;
	var popHeight	=	760; 
	window.open ("/blog/blog_pop/listUp.php","EditForBlofPP","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=5,top=5");

}

function makeForTeacher(modeValue,subsiteNo)
{
	var popWidth	=	800;
	var popHeight	=	730; 

	window.open ("/blog/blog_pop/makeForTeacher.php?mode="+modeValue+"&subsiteNo="+subsiteNo,"te","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=50,top=50");

}

function detailTeacher(modeValue)
{
	var popWidth	=	350;
	var popHeight	=	250; 

	window.open ("/blog/blog_pop/teacherDetail.php?no="+modeValue,"tezz","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=50,top=50");

}

function makeForOffline(modeValue)
{
	var popWidth	=	800;
	var popHeight	=	730; 

	window.open ("/blog/blog_pop/makeForOffline.php?mode=insert&subsiteNo=<?=$subsiteNo?>","fff","width="+popWidth+",height="+popHeight+",scrollbars=yes,toolbar=no,left=10,top=10");

}

function popLogin()
{
	window.open ("/program/member/loginPop.php?subsite=<?=$subsite?>","EditForBlof","width=250,height=150,scrollbars=no,toolbar=no,left=400,top=250");

}

function select_val(val)
{ 
	if(val=='') 
	{
		return;

	} else
	{
	  top.location.href=val;

	}

}

function inputCar(subsite,mode,no)
{
	var popWidth	=	800;
	var popHeight	=	730; 

	if (mode == '')
	{
		mode = 'insert';
	}

	window.open ("/mizcar_input.php?mode="+mode+"&no="+no+"&subsite="+subsite,"EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,resize=yes,toolbar=no,left=50,top=50");

}

function inputCar_exe(subsite,mode,no)
{
	var popWidth	=	50;
	var popHeight	=	30; 

	window.open ("/_exe.php?mode="+mode+"&no="+no+"&subsite="+subsite,"EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,resize=yes,toolbar=no,left=50,top=50");

}

function deleteCar(subsite,mode,no)
{
	if (confirm("Â÷·®À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		inputCar_exe(subsite,mode,no);
	}
}

// °Ô½ÃÆÇ¿¡¼­ »õÃ¢À» ºÒ·¯µå¸°´Ù.
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 + 60; myWidth = eval(pic).width + 12;\n"); 
	imgwin.document.write("  } else { myHeight = eval(pic).height + 9; 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 topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

	imgwin.document.write("<center><a href='javascript:close()'><img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'></a>\n"); 
	imgwin.document.write("</center></body></html>\n"); 
	imgwin.document.close(); 

}



// ÀÌÇÏ Åø¹Ú½º¸¦ ¸¸µç´Ù.
document.write('<st'+'yle>');
document.write('.hide_sub {padding:3px; position:absolute; visibility:hidden; font { font-size: 9pt; border:outset 1px white; background-color: #ffffff;}');
document.write('</st'+'yle>');

function cnj_view(sub_id, opt, evt, cmt) 
{
var plus_left, plus_top;
if(cmt) {
plus_left = 9; // ÅøÆÁ°ú ¸µÅ©¿ÍÀÇ ¿ÞÂÊ °£°Ý
plus_top = 19; // ÅøÆÁ°ú ¸µÅ©¿ÍÀÇ »ó´Ü °£°Ý
} else {
plus_left = 0;
plus_top = 0;
}

if(document.all || document.getElementById) {
if(document.all) {
obj = document.all[sub_id];
if(opt == "") {
obj.style.left = evt.clientX + document.body.scrollLeft + plus_left;
obj.style.top = evt.clientY + document.body.scrollTop + plus_top;
}
} else {
obj = document.getElementById(sub_id);
if(opt == "") {
obj.style.left = evt.clientX + window.scrollX + plus_left;
obj.style.top = evt.clientY + window.scrollY + plus_top;
}
}
obj.style.visibility = "visible";
} else{
obj = document.layers[sub_id];
obj.visibility = "visible";
if(opt == "") {
obj.left = evt.pageX + plus_left;
obj.top = evt.pageY + plus_top;
}
}
}

function cnj_hide(sub_id) {
if(document.all || document.getElementById) {
if(document.all) {
obj = document.all[sub_id];
} else {
obj = document.getElementById(sub_id);
}

obj.style.visibility = "hidden";
} else{
obj = document.layers[sub_id];
obj.visibility = "hidden";
}
}

function getModel1(a)			//2,1°ª
{
	for (i=0; i< lcd1_code_array1.length; i++)
	{
		if (lcd1_code_array1[i] == a)
		{
			document.write (lcd_nm_array1[i]);
		}
	}
	
}

function getModel(a,b)			//2,1°ª
{
	for (i=0; i< lcd1_code_array2.length; i++)
	{
		if (lcd1_code_array2[i] == a)
		{
			if (lcd2_code_array2[i] == b)
			{  
    	    	document.write (lcd_nm_array2[i]);
	    	}
		}
	}
	
}

function getModelDetail(a,b,c)			//2,1°ª
{
	for (i=0; i < lcd1_code_array3.length; i++)	
	{
		if (lcd1_code_array3[i] == a && lcd2_code_array3[i] == b)		
		{
			if (lcd3_code_array3[i] == c) 
			{ 
				document.write (lcd_nm_array3[i]);
			}
		}
	}
	return;
	
}


function getZone01(a)			//2,1°ª
{

	for (ai=0; ai < alcd1_code_array1.length; ai++)
	{
		if (alcd1_code_array1[ai] == a) 
		{ 
			document.write (alcd_nm_array1[ai]);
		}

	}
	
}

function getZone02(a,b)			//2,1°ª
{
	for (ai=0; ai < alcd1_code_array2.length; ai++)
	{
		if (alcd1_code_array2[ai] == a)
		{
			if (alcd2_code_array2[ai] == b) 
			{  
    	    	document.write (alcd_nm_array2[ai]);

	    	}
		}
	}
}

function checkImages() {
if(document.getElementById) {
  var imagesArr = new Array();
  var setDefaultErrImg="main_img/error.jpg"; // ÀÌ¹ÌÁö ¿¡·¯½Ã ´ëÃ¼ÇÒ ÀÌ¹ÌÁö
  var setDefaultErrTxt="Image Not Found"; // ALT¿¡ µé¾î°¥ ÅØ½ºÆ®
  imagesArr = document.getElementsByTagName("img");
  for(var i=0; i<imagesArr.length; i++)
  {
   if(!imagesArr[0].getAttribute("nc")=="1")
   {
    var tempImgAttrib=imagesArr[i].getAttribute("alt");
    imagesArr[i].setAttribute("alt","");


    if((imagesArr[i].width=="28" && imagesArr[i].height=="30"))
    {
		imagesArr[i].src=setDefaultErrImg;
		imagesArr[i].setAttribute("alt",setDefaultErrTxt);
    }
    else
    {
     imagesArr[i].setAttribute("alt",tempImgAttrib);
    }
   }
  }
}
}

function checkPhoto(url,cName)
{
	var img	=	new Image();
	var k	=	eval(img.width);

	alert(k);
	
	if (k < 10)
	{
		img.src = 'main_img/noP.jpg';

	} else
	{
		img.src = url;
	}

}

function chk_id()
{
	if (document.regiform.userid.value.length<4 || document.regiform.userid.value.length>8) {
		window.alert('ID´Â 4~8ÀÚ ¿µ¹®(¼Ò¹®ÀÚ), ¼ýÀÚ ¶Ç´Â ¿µ¹®(¼Ò¹®ÀÚ)°ú ¼ýÀÚ¸¸ °¡´É ÇÕ´Ï´Ù');
		document.regiform.userid.focus();
		return;
		}
	window.open('program/member/add_id_check.php?retid='+document.regiform.userid.value,'chkid', 'status=yes, width=350, height=150')
}


function _Q_(url,field,value,infor)
{
	if (confirm(infor))
	{
		location.href= url+"&"+field+"="+value;
	}

}



function money_exe(mode,val1,val2)		// ¼ø¼­, ±âÁØ
{
	var popWidth	=	50;
	var popHeight	=	50; 

	if (confirm('½ÇÇàÇÏ½Ã°Ú½À´Ï±î? ½ÇÇàÇÏ½Ã¸é »õÃ¢ÀÌ ¶å´Ï´Ù.'))
	{
		window.open ("program/school/exe.php?mode="+mode+"&no="+val1+"&id="+val2,"EditForBlof","width="+popWidth+",height="+popHeight+",scrollbars=yes,resize=yes,toolbar=no,left=50,top=50");
	}

}


// Á¤Áß¾Ó¿¡¼­ ÆË¾÷
//<a href="http://www.blueb.co.kr/" onclick="newWindow(this.href, 'popup', 300, 300, 1, 1, 1, 0, 0, 1, 0); return false;" target="_blank">È­¸é Á¤Áß¾Ó¿¡ ÆË¾÷Ã¢ ¶ç¿ì±â</a>
//°¡·Î»çÀÌÁî¼³Á¤ 
//¼¼·Î»çÀÌÁî¼³Á¤ 
//½ºÅ©·Ñ¹Ù :1,º¸ÀÌ±â 0,¾Èº¸ÀÌ±â
//¸®»çÀÌÁî :1,°¡´É 0,ºÒ°¡´É
//¸Þ´º¹Ù : 1,º¸ÀÌ±â 0,¾Èº¸ÀÌ±â
//Åø¹Ù : 1,º¸ÀÌ±â 0,¾Èº¸ÀÌ±â
//ÁÖ¼ÒÃ¢ : 1,º¸ÀÌ±â 0,¾Èº¸ÀÌ±â
//»óÅÂ¹Ù : 1, º¸ÀÌ±â 0,¾Èº¸ÀÌ±â
//Ç®½ºÅ©¸° : 1,Ç®½ºÅ©¸° 0,ÀÏ¹ÝÆË¾÷ 
function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}