function vote_re(num){
	exefield.document.location.href = '/poll/rebuild_poll.html?num='+num;
}
function Vote(docnum,num,ans,sess) {
	var now = new Date();
	var votes = window.open('/poll/?act=vote&docnum='+docnum+'&num='+num+'&ans='+ans+'&sess='+sess+'&tmp='+now,'act','width=300,height=300,scrollbars=no');
	votes.focus();
}		
function Zoom(num) {
	var Zoom = window.open('/bbs/zoom.html?num='+num,'Zoom','width=900,height=750,scrollbars=no');
	Zoom.focus();
}

function Zoom_memo(num) {
	var Zoom2 = 	window.open('/bbs/zoom_memo.html?num='+num,'Zoom2','width=1000,height=800,scrollbars=yes');
	Zoom2.focus();
}
function login(num) {
	var tmp = new Date();
	window.open('/login/pop.html?tmp='+tmp,'zoom','width=400,height=400,scrollbars=no');
}
function Delete_bbs(tkind,lkind,mkind,skind,num,page) {
	var id=confirm('Áö±Ý º¸°í °è½Å °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?');
	if (id==1)
	{
		document.location.href = 'delete.html?tkind='+tkind+'&lkind='+lkind+'&mkind='+mkind+'&skind='+skind+'&num='+num+'&page='+page;
	}
}
function alidel(num,no) {
	var  time = new Date();
	var id=confirm('ÀÇ°ßÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?');
	if (id==1) {
		exefield.document.location.href='./alidel.html?num='+num+'&no='+no+'&time='+time,'act_frame';
	}
}

function police(no,num) {
	var police = window.open('police.html?no='+no+'&num='+num,'police', 'width=430,height=471,scrollbars=no');
	police.focus();
}

function toggle_menu(contents) {
	if(contents.style.display == 'none') {
		contents.style.display = '';
	} else {
		contents.style.display = 'none';
	} 
}

function headline_admin(num) {
	var adm = window.open('/admin/headline.html?num='+num,'admin','width=500,height=600,scrollbars=yes');
	adm.focus();
}

function AddReple(num,no) {

	eval('var res = reple_'+no+';	');
	if(res.style.height != '80px') {
		res.style.display='block';
		res.style.width='600px';
		res.style.height='80px';
		inform = '<form class="rereple" target="exefield" action="/bbs/ali.html" method="post" name="rereple_'+no+'" id="rereple_'+no+'"><input type="hidden" name="no" value="'+no+'"><input type="hidden" name="num" value="'+num+'"><textarea name="form_text"><';
		inform += '/textarea onfocus="document.getElementById(\'onkeys\').innerHTML =\'\';" onblur="document.getElementById(\'onkeys\').innerHTML =\'1\';"><a class="save_rerepl" href="javascript:this.document.rereple_'+no+'.submit()"><img src="/bbs/images/btn_recomment.gif" alt="ÀúÀåÇÕ´Ï´Ù" border=0 width=45 height=58></a><';
		inform += '/form>';
		res.innerHTML = inform;
	} else {
		eval('var res2 = rereple_'+no+';');
		res.style.height='1px';
		res.style.display='none';
		res2.style.display='none';

	}
}

function big_text() {
	var form_height = window.screen.height/2;
	this.document.write_comment.form_text.style.height=form_height;
}
function normal_text() {
	this.document.write_comment.form_text.style.height=100;
}	
function Login_Need() {
	alert('·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ±â´ÉÀÔ´Ï´Ù.');
}


function loginNeed() {
	var  time = new Date();
	var id=confirm('·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ±â´ÉÀÔ´Ï´Ù. Áö±Ý ·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?');
	if (id==1) {
		Login();
	}
}



	function setCookie( name, value, expiredays ) { 
		var todayDate = new Date(); 
		todayDate.setDate( todayDate.getDate() + expiredays ); 
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"; 
	} 

	function nocommnet() {

		if( document.getElementById("comment").style.display == 'none' ) {

			setCookie('nocommnet','1','1');

			document.getElementById("comment").style.display = '';

		} else {

			setCookie('nocommnet','0','1');
			
			document.getElementById("comment").style.display = 'none';
		}

	}

	function vswitch(retval) {

		if( retval == '1' ) {

			setCookie('vswitch','1','1');
			setCookie('nocommnet','1','1');

			document.getElementById("comment").style.display = '';
			document.getElementById("comment1").style.display = '';
			document.getElementById("comment2").style.display = 'none';

		} else {

			setCookie('vswitch','2','1');
			setCookie('nocommnet','1','1');

			document.getElementById("comment").style.display = '';
			document.getElementById("comment1").style.display = 'none';
			document.getElementById("comment2").style.display = '';

		}
	}

	// ´ñ±Û¿øº» º¸±â/´Ý±â - »ç¿ëÇÏÁö¾ÊÀ½
	function view_orgtext(val) {
		eval('var obj = document.getElementById("rep_org_'+val+'"); ');
		if(obj.style.display == 'block') {
			obj.style.display = 'none';
		} else {
			obj.style.display = 'block';
		}
	}

	function ViewBlogComments(val,switchs) {
		eval('var obj =  document.getElementById("blog_'+val+'"); ');
		
		if(switchs == 'on') {
			obj.style.display='block';
		} else {
			obj.style.display='none';
		}

	}

