/**/
function popup(width,height,left,top,url,name)
{
	
	window.open(url,name,'height='+height+', width ='+width+',left='+left+',top='+top+', scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,status=yes');
}

function popup_y(width,height,left,top,url,name)
{
	
	window.open(url,name,'height='+height+', width ='+width+',left='+left+',top='+top+', scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,status=yes');
}

// Ä«Å×°í¸® ¼±ÅÃ
function select_cate(mode_name, value)
{
	if(mode_name == "site_code" && value != "") {

		location.href='advertise.htm?mode=keyword_group&bd_fg='+ cate.bd_fg.value +'&site_code=' + value;	
	}
	else if(mode_name == "site_code" && value == "") {
	
		location.href='advertise.htm?mode=ad_site&bd_fg='+ cate.bd_fg.value +'';
	}
	else if(mode_name == "group_code" && value != "") {
	
		location.href='advertise.htm?mode=keyword_list&bd_fg='+ cate.bd_fg.value +'&group_code=' + value + '&site_code=' + cate.site_code.value ;
	}
	else if(mode_name == "group_code" && value == "") {
	
		location.href='advertise.htm?mode=keyword_group&bd_fg='+ cate.bd_fg.value +'&site_code=' + cate.site_code.value ;
	}
}

function window_top(url,width,hight) {
	
	if (document.all&&window.print) {

		eval('window.showModalDialog(url,window,"help:no;resizable:no;status:no;center:yes;scroll:no;form;dialogHide:yes;dialogWidth:'+width+'px;dialogHeight:'+hight+'px")') ;
	}
	else {

		eval('window.open(url,window,"width='+width+'px,height='+hight+'px,resizable=1,scrollbars=1")') ;
	}
} 

// ¼³¹®Á¶»ç
function poll_check()
{
	var len = document.poll.code_idx.length;

	k = 0;
	for(i = 0 ; i < len ; i++) {

		if(document.poll.code_idx[i].checked) {

			k = 1;
			document.poll.submit();
		}
	}
	if(k != 1) alert("¼³¹®À» ¼±ÅÃÇØÁÖ¼¼¿ä");

}

// ÀÏ°ýÃ¼Å©
function Select_All()
{
	if(document.frm_list.code_check.value == "check")
	{
		for(i=0; i < frm_list.elements.length ; i++) {

			if(frm_list.elements[i].name.substring(0,5) == "check") frm_list.elements[i].checked = true; document.frm_list.code_check.value = "";document.frm_list.bt.value = "ÀüÃ¼Ãë¼Ò"; 
		}
	}
	else {

		for(i=0; i < frm_list.elements.length ; i++) {

			if(frm_list.elements[i].name.substring(0,5) == "check") frm_list.elements[i].checked = false; document.frm_list.code_check.value = "check";document.frm_list.bt.value = "ÀüÃ¼¼±ÅÃ"; 
		}
	}
}

//	¼±ÅÃÁ¤º¸
function list_check(frm_list)
{
	for(i=0; i < frm_list.elements.length ; i++) {

		if(frm_list.elements[i].name.substring(0,5) == "check" && frm_list.elements[i].checked == true) {

			if(frm_list.mtype.value == "update") {

				msg_str="¼±ÅÃÇÑ Ç×¸ñÀ» ¼öÁ¤ÇÏ½Ã°Ú½À´Ï±î?";
			}
			else if(frm_list.mtype.value == "delete") {

				msg_str="¼±ÅÃÇÑ Ç×¸ñÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?";
			}

			if(confirm(msg_str)) return true;	else return false;
		}
	}
	alert("¼±ÅÃµÈ Ç×¸ñÀÌ ¾ø½À´Ï´Ù.");
	return false;     
}