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.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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

function newWindow1(imgname,name,width,height)
{
	url="gallery_zoom.html?imgname="+imgname+"&width="+width+"&height="+height;
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=680,height=655");
}

function newWindow2(url,name)
{
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=705,height=610");
}

function newWindow3(url,name)
	{
		window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=670,height=610");
	}
	
function newWindow4(url,name)
	{
		window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=460,height=490");
	}
function newWindow5(url,name)
	{
		window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=563,height=490");
	}
function newWindow6(url,name)
	{
		window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=615,height=700");
	}
/*
function setCookie( name, value, expiredays )
{
 var todayDate = new Date(); 
 todayDate.setDate( todayDate.getDate() + expiredays );
 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name ){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
			endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		
		x = document.cookie.indexOf( " ", x ) + 1;
		
		if ( x == 0 ) break;
	}
			return "";
}
*/
function pagemove(form,formselect)
{
	var gval="";
	gval = formselect.options[formselect.selectedIndex].value;

	if(gval=="") {
		return false;
	}
	else 
	{
		form.action= gval;
		if(gval.substring(0,4)=="http") form.target="_blank";
		else  form.target="_self";
		form.submit();
	}
}

function ZoomWindow(imgname,name,width,height,title)
{
	url="gallery_zoom.html?imgname="+imgname+"&width="+width+"&height="+height+"&title="+title;
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=535,height=493");
}

function ZoomWindow2(imgname,name,width,height,title)
{
	url="gallery_zoom_02.html?imgname="+imgname+"&width="+width+"&height="+height+"&title="+title;
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=630,height=620");
}


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


function viewImage1(img,W,H){ 
	str = 'height=' + H + ',innerHeight=' + H;
	str += ',width=' + W + ',innerWidth=' + W;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - W) / 2;
		var yc = (ah - H) / 2;
		
		str += ',left=' + xc + ',screenX=' + xc;
		str += ',top=' + yc + ',screenY=' + yc;
		if(scroll==1) str += ',scrollbars=yes';
	}
	img = escape(img);            
	imgWin=window.open('/gallery/zoom.html?img='+img,'img',str); 
}

function viewImage2(img){ 
        W=document.imagezoom.winwidth.value; 
        H=document.imagezoom.winheight.value; 

	str = 'height=' + H + ',innerHeight=' + H;
	str += ',width=' + W + ',innerWidth=' + W;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - W) / 2;
		var yc = (ah - H) / 2;
		
		str += ',left=' + xc + ',screenX=' + xc;
		str += ',top=' + yc + ',screenY=' + yc;
		if(scroll==1) str += ',scrollbars=yes';
	}
	img = escape(img);
	imgWin=window.open('/gallery/zoom.html?img='+img,'img',str); 
}

function viewImage3(img,W,H){ 

	str = 'height=' + H + ',innerHeight=' + H;
	str += ',width=' + W + ',innerWidth=' + W;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - W) / 2;
		var yc = (ah - H) / 2;
		
		str += ',left=' + xc + ',screenX=' + xc;
		str += ',top=' + yc + ',screenY=' + yc;
		if(scroll==1) str += ',scrollbars=yes';
	}
	img = escape(img);
	imgWin=window.open('/gallery/zoom.html?img='+img,'img',str); 
}
function view_detail(img,W,H){ 

	str = 'height=' + H + ',innerHeight=' + H;
	str += ',width=' + W + ',innerWidth=' + W;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - W) / 2;
		var yc = (ah - H) / 2;
		
		str += ',left=' + xc + ',screenX=' + xc;
		str += ',top=' + yc + ',screenY=' + yc;
		if(scroll==1) str += ',scrollbars=yes';
	}
	img = escape(img);
	imgWin=window.open('/dong/common/zoom.html?img='+img,'img',str); 
}

function change_img(img_big){
	var img_big = img_big;
	document.big_photo.src=img_big;
}

function performyear(f,url)
{
	window.location.href=url+"?year="+f.year.options[f.year.selectedIndex].value;
}

function performmonth(f,url)
{
	window.location.href=url+"?year="+f.year.options[f.year.selectedIndex].value+"&mon="+f.mon.options[f.mon.selectedIndex].value;
}  


function pagemove(form,formselect)
{
	var gval="";
	gval = formselect.options[formselect.selectedIndex].value;
	if(gval=="minwon_08_01_05.html") {
		openwin1('minwonselect','minwon_08_01_05.html',466,500,1);
		return false;
	}
	
	if(gval=="welfare_05_03.html" || gval=="/welfare/welfare_05_03.html") {
		openwin1('welfareselect','/welfare/jawon2.htm',587,500,1);
		return false;
	}
	
	if(gval=="welfare_05_05.html") {
		openwin1('welfareselect','/welfare/welfare_05_05.html',587,500,1);
		return false;
	}


	if(gval=="") {
		return false;
	}
	else 
	{
		form.action= gval;
		if(gval.substring(0,4)=="http") form.target="_blank";
		else  form.target="_self";
		form.submit();
	}
}

function pagemove2(form,formselect)
{
	var gval="";
	gval = formselect.options[formselect.selectedIndex].value;
	if(gval=="") {
		return false;
	}
	else 
	{
		location.href= gval;
	}
	
}

function newWindow1(url,name)
	{
		window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=550,height=545");
	}




	  function comment_chk(){


	if(!comment_form.writer.value){
		alert('ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä!');
		comment_form.writer.focus();
		return false;
	}
	if(!comment_form.password.value){
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!');
		comment_form.password.focus();
		return false;
	}
	if(!comment_form.comment.value){
		alert('³»¿ëÀÌ ¾ø½À´Ï´Ù.');
		comment_form.comment.focus();
		return false;
	}

	//form.submit();
}

function openwin(code,linkurl,width,height,scroll)
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/
	
	if ( getCookie(code) != "done" )	{
	    var str;
	    
	    str = "height=" + height + ",innerHeight=" + height;
	    str += ",width=" + width + ",innerWidth=" + width;
	    if(scroll==1) str += ",scrollbars=yes";
	
	    if (window.screen) {
	        var ah = screen.availHeight - 30;
	        var aw = screen.availWidth - 10;
	        var xc = (aw - width) / 2;
	        var yc = (ah - height) / 2;
	
	        str += ",left=" + xc + ",screenX=" + xc;
	        str += ",top=" + yc + ",screenY=" + yc;

	    }
		//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	    noticeWindow = window.open(linkurl, code , str);
	    //noticeWindow.opener = self;
	    noticeWindow.focus();
	}
}

function openwin1(code,linkurl,width,height,scroll)
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/
	
	if ( getCookie(code) != "done" )	{
	    var str;
	    
	    str = "height=" + height + ",innerHeight=" + height;
	    str += ",width=" + width + ",innerWidth=" + width;
	    if(scroll==1) str += ",scrollbars=yes";
	
	    if (window.screen) {
	        var ah = screen.availHeight - 30;
	        var aw = screen.availWidth - 10;
	        var xc = (aw - width) / 2;
	        var yc = (ah - height) / 2;
	
	        str += ",left=" + xc + ",screenX=" + xc;
	        str += ",top=" + yc + ",screenY=" + yc;

	    }
		//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	    noticeWindow = window.open(linkurl, code , str);
	    //noticeWindow.opener = self;
	    noticeWindow.focus();
	}
}


function openwin2(code,linkurl,width,height,top,left,scroll)
{		

	if ( getCookie(code) != "done" )
	{
		 //ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
		
		str = "scrollbars=yes,width=" + width +", height="+ height +", top="+ top +", left=" + left;
		
		if(scroll==1) str += ",scrollbars=yes";
		else  str += ",scrollbars=no";
		noticeWindow = window.open(linkurl, code , str);
		
		//noticeWindow.opener = self;
	}
}

function open_win(code,linkurl,width,height,scroll)
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/
	
	if ( getCookie(code) != "done" )	{
	    var str;
	    
	    str = "height=" + height + ",innerHeight=" + height;
	    str += ",width=" + width + ",innerWidth=" + width;
	
	    if (window.screen) {
	        var ah = screen.availHeight - 30;
	        var aw = screen.availWidth - 10;
	        var xc = (aw - width) / 2;
	        var yc = (ah - height) / 2;
	
	        str += ",left=" + xc + ",screenX=" + xc;
	        str += ",top=" + yc + ",screenY=" + yc;
	        if(scroll==1) str += ",scrollbars=yes";

	    }
		//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	    bannerWindow = window.open(linkurl, code , str);
	    //bannerWindow.opener = self;
	    bannerWindow.focus();
	}
}

function openwin_f(code,linkurl,width,height,scroll) // ÇÃ·¡½Ã È£Ãâ
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/
	
	if ( getCookie(code) != "done" )	{
	    var str;
	    
	    str = "height=" + height + ",innerHeight=" + height;
	    str += ",width=" + width + ",innerWidth=" + width;

		linkurl = "http://" + linkurl;
	
	    if (window.screen) {
	        var ah = screen.availHeight - 30;
	        var aw = screen.availWidth - 10;
	        var xc = (aw - width) / 2;
	        var yc = (ah - height) / 2;
	
	        str += ",left=" + xc + ",screenX=" + xc;
	        str += ",top=" + yc + ",screenY=" + yc;
	        if(scroll==1) str += ",scrollbars=yes";

	    }
		//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	    bannerWindow = window.open(linkurl, code , str);
	    //bannerWindow.opener = self;
	    bannerWindow.focus();
	}
}


function open_win_all(code,linkurl,width,height,scroll)
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/
	    
	    str = "height=" + height + ",innerHeight=" + height;
	    str += ",width=" + width + ",innerWidth=" + width;
	
	    if (window.screen) {
	        var ah = screen.availHeight - 30;
	        var aw = screen.availWidth - 10;
	        var xc = (aw - width) / 2;
	        var yc = (ah - height) / 2;
	
	        str += ",left=" + xc + ",screenX=" + xc;
	        str += ",top=" + yc + ",screenY=" + yc;
	        if(scroll==1) str += ",scrollbars=yes";

	    }
		//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	    bannerWindow = window.open(linkurl, code , str);
	    //bannerWindow.opener = self;
	    bannerWindow.focus();
}
function ecatalogOpen(url)
{
	if(screen.width>1024) openwin1('e_catalog',url,1000,768,0);
	else {
		if(screen.width==1024) window.open(url,"e_catalog","fullscreen,scrollbars=no");
		else alert('ÇØ»óµµ 1024¡¿768 ºÎÅÍ Áö¿øÀÌ µË´Ï´Ù.');
	}
	
}


function openTour(linkurl,width,height)
{		
	/*** ÆË¾÷ Ã¢ È­¸é Áß¾Ó¿¡ ¿ÀÇÂ½ÃÅ°±â**/	
	var str;
	  
	str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;	
	
	if (window.screen) {
	    var ah = screen.availHeight - 30;
	    var aw = screen.availWidth - 10;
	    var xc = (aw - width) / 2;
	    var yc = (ah - height) / 2;
	
	    str += ",left=" + xc + ",screenX=" + xc;
	    str += ",top=" + yc + ",screenY=" + yc;
	}
	//ÆË¾÷ÀÌ ¾øÀ»½Ã ¾Æ·¡ 2ÁÙ ¾ÕºÎºÐÀ» "//"À¸·Î °¡·ÁÁÜ
	vtourWindow = window.open(linkurl, "virtualtour" , str);
	//noticeWindow.opener = self;
	vtourWindow.focus();	
}

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("gongju_font_size"); 
	if ( cookie == null ) 
	return 16; 
	if ( cookie.length ) 
	return cookie; 
	else return 16; 
}

function FontSize(val)
{
	var mydate = new Date; 
	mydate.setDate(mydate.getDate()+1000); 

	var set_font;
	var fontSize;
	set_font = parseInt(getCookie("gongju_font_size")); // ÀúÀåµÈ Æ÷Æ°°ªÀ» °¡Á®¿Â´Ù
	//alert(set_font);
	
	setCookie("gongju_font_size",12,mydate); // 

	if (val == "+") 
	{
		if (set_font <= 18) {
		fontSize = eval(set_font + 1)
		setCookie("gongju_font_size", fontSize, mydate); 
		}
	}else{
	    if (set_font > 11) {
		fontSize = eval(set_font - 1)
		setCookie("gongju_font_size", fontSize, mydate); 
		}
	}

	window.location.reload();
}


/*** FAQ**/	
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 viewImage1(img,W,H){ 
	str = 'height=' + H + ',innerHeight=' + H;
	str += ',width=' + W + ',innerWidth=' + W;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - W) / 2;
		var yc = (ah - H) / 2;
		
		str += ',left=' + xc + ',screenX=' + xc;
		str += ',top=' + yc + ',screenY=' + yc;
		if(scroll==1) str += ',scrollbars=yes';
	}
	img = escape(img);            
	imgWin=window.open('/bodo/zoom.html?img='+img,'img',str); 
}

//°Ô½ÃÆÇ °Ë»ö Ã¼Å©
function SearchChk()
{
	if(document.srForm.sval.value == '') {
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
		document.srForm.sval.focus();
		return false;
	}
}
// ¸ðµç top °Ë»ö Ã¼Å©
function SearchChk_Top()
{
	if(srForm.searchval.value == '') {
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
		srForm.searchval.focus();
		return false;
	}
}

// ¸ÞÀÏ¸µ ½ÅÃ» Ã¼Å© 
function Email_chk()
{
	if(mailling.email.value == '') {
		alert('¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
		mailling.email.focus();
		return false;
	}else if ((mailling.email.value != '') && (mailling.email.value.indexOf('@',0) == -1 || mailling.email.value.indexOf('.',0) == -1))
	{
		alert("Á¦´ë·Î µÈ e-Mail ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
	    document.mailling.email.value="";
	    document.mailling.email.focus();
		return false;
	}
	if(mailling.name.value == '') {
		alert('ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.');
		mailling.name.focus();
		return false;
	}
}

// select box
function pagemove(form,formselect)
{
	var gval="";
	gval = formselect.options[formselect.selectedIndex].value;
	if(gval=="") {
		return false;
	}
	else 
	{
		form.action= gval;
		form.submit();
	}
	
}

//»õÃ¢¶ç¿ì±â
function newWindow(url,name)
{
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=816,height=537");
}


// ÁÖ¿ä¾Ë¸²ÀÌ ÇÃ·¡½Ã, È¿µ¹ÀÌ ÇÃ·¡½Ã °ü·Ã
var kyIE = document.all;
var fbar_itv = 0;
var isHide_ani = false;

function getFr_stat() {
	if( parent.fr_stat == 1 ) {
		fhelper.SetVariable( "_jsc_fr", "1");
	}
	else {
		fhelper.SetVariable( "_jsc_fr", "0");
	}
}

function getCk_stat() {
	if( getCookie("_fhelper_ck") == null ) {
		fhelper.SetVariable( "_jsc_show", "1");
	}
	else {
		fhelper.SetVariable( "_jsc_show", "0");
	}
}

function hideFhelper() {
	var mydate = new Date; 
	mydate.setDate(mydate.getDate()+1); 
	setCookie("_fhelper_ck",1, mydate);	
}

function hideBottomFrame() {
	parent.hideBottom();
}

function showBottomFrame() {
	parent.showBottom();
}

function toggleBottomFrame() {
	hideBottomFrame();
	showBottomFrame();
}

function fbar_menuPosing()
{
  var docH, docW, scrollT, scrollL, layer;
  if(kyIE) {
  	layer =  document.all.fbar_menu;
    layer.height = 307;
    var layerH = layer.style.height = 307;
    layer.width = 222;
    var layerW = layer.style.width = 222;
    
    docH = document.body.clientHeight;
    docW = document.body.clientWidth;        
    scrollT = document.body.scrollTop;
    scrollL = document.body.scrollLeft;
    layer.style.posTop =  scrollT + (docH - layerH);
    layer.style.posLeft = scrollL + 10;
    layer.style.visibility = "visible";  
  }
  else {	// not IE
    layer = document.layers.fbar_menu;
    layerH = 307;
    layerW = 222;
    
    docH = window.innerHeight;
    docW = window.innerWidth;    
    scrollT = window.pageYOffset;
    scrollL = window.pageXOffset + 10;
    layer.moveTo(scrollL, scrollT + (docH - layerH));
    layer.visibility = "show";
  }
}

function actFBarMenu( isSyncFr ) {	
	if( isHide_ani ) return ;
	var layer;
	if( kyIE ) {
		layer = document.all.fbar_menu;
		if( layer.style.visibility == "visible"  ) {			
			hideFBarMenu_pre();
			set_Fvar( "_jsc_menuShow", "hide" );
		}
		else {
			if( isSyncFr ) return ;
			layer.style.visibility = "visible";
			fbar_itv = setInterval( fbar_menuPosing, 200 );
			set_Fvar( "_jsc_menuShow", "show" );					
		}
	}
	else {
		layer = document.layers.fbar_menu;
		if( layer.visibility == "show" ) {			
			hideFBarMenu_pre();
			set_Fvar( "_jsc_menuShow", "hide" );
		}
		else {
			if( isSyncFr ) return ;
			layer.visibility = "show";
			fbar_itv = setInterval( fbar_menuPosing, 200 );
			set_Fvar( "_jsc_menuShow", "show" );		
		}
	}	
}

function hideFBarMenu() {
	var layer;
	if( kyIE ) {
		layer = document.all.fbar_menu;
		layer.style.visibility = "hidden";
	}
	else {
		layer = document.layers.fbar_menu;
		layer.visibility = "hide";
	}	
	isHide_ani = false;		
}

function hideFBarMenu_pre() {
	isHide_ani = true;
	clearInterval( fbar_itv );
}

function set_Fvar( vname, val ) {	
	btool_fmenu.SetVariable( vname, val);
}
 
//ÀÎ¼â ÆäÀÌÁö
function printContent(gubun) 
{
	window.open("/include/print_contents.php?gubun="+gubun,"print","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=700");
}
//ÀÎ¼â ÆäÀÌÁö
function printContent_news(code,num) 
{
	window.open("/news/print_contents.php?code="+code+"&num="+num,"print","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=700");
}
//¸ÞÀÏ º¸³»±â
function printMail()
{
	//	window.open("/include/mail_send.html","mail","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=655,height=500");
	openwin1('mailsend','/include/mail.html',476,530,0);
}
//¸ÞÀÏ º¸³»±â
function newsMail(code,num)
{
	window.open("/news/mail_send.html?code="+code+"&num="+num,"mail","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=476,height=530");
}
 function flash_echo(width,height,url) {
	var flash_tag = "";
 	flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 	flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	flash_tag +='WIDTH="'+width+'" HEIGHT="'+height+'" >';
	flash_tag +='<param name="movie" value="'+url+'">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<param name="wmode" value="transparent">';
	flash_tag +='<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+width+'" HEIGHT="'+height+'"></embed></object>'

 	document.write(flash_tag);
}

//width , height , movielink , autostart
function movie_view(width,height,movielink,autostart) {
	var movie_play = "";
 	movie_echo = '<EMBED pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp" ';
 	movie_echo +=' src="'+movielink+'" ';
	movie_echo +=' width="'+width+'" height="'+height+'" ';
	movie_echo +=' type=application/x-mplayer2 border="0" vspace="0" hspace="0" playcount="1" showdisplay="false" showstatusbar="true" ';
	movie_echo +=' showtracker="true" showpositioncontrols="true" showaudiocontrols="true" showcontrols="true" ';
	movie_echo +=' autostart="'+autostart+'" >'

 	document.write(movie_echo);
}

function setClock() 
{ 
  var now = new Date(); 
  var Hours= now.getHours(); 
  var Minutes= now.getMinutes(); 
  var Seconds= now.getSeconds(); 
  var Value = Hours;
  Value+= ((Minutes <10) ? " ½Ã 0" : " ½Ã ") + Minutes 
  Value+= ((Seconds <10) ? " ºÐ 0" : " ºÐ ") + Seconds + " ÃÊ"
  document.clockform.clock.value = Value; 
  setTimeout ("setClock()", 1000); 
} 

function calender_press()
{
	document.boardform.s_date.value="";
}


