// 셀프폴 메인 리스트 옵션/페이지 변경
function LoadSelfPollList(opt, page) {
	SPListForm.sp_idx.value = "";
	SPListForm.opt.value = opt;
	SPListForm.page.value = page;
	SPListForm.action = SPListInfoForm.list_url.value; 

	GetAjaxInfoB(true,SPListForm,"LoadSelfPollList_result")	
}

function LoadSelfPollList_result(msg) {
	if(msg.indexOf("-1[sp]")==-1) {
		document.getElementById("area_selfpoll_list").innerHTML = msg;
	}
}

function SPView(n)
{
	SPListForm.sp_idx.value = n;
	SPListForm.c_idx.value = n;
	//SPListForm.method = "post"
	SPListForm.action = SPListInfoForm.view_url.value; 
	SPListForm.submit();
}

function SelfPollList(mid)
{
	SPViewForm.page.value = 1;
	SPViewForm.opt.value = 3;
	SPViewForm.menu_id.value = "";
	SPViewForm.method = "post";
	SPViewForm.action = SPViewInfoForm.list_url.value + '?menu_id='+mid;
	SPViewForm.submit();
}

// 셀프폴 결과
function LoadSelfPollRst(sp_idx){
	var get_url;
	get_url = "/voguegirl/selfpoll/sp_view_rst.asp?sp_idx="+sp_idx;
	GetAjaxInfoA(true,get_url,"LoadSelfPollRst_result");
}

function LoadSelfPollRst_result(msg){
	document.getElementById("area_spview_rst").style.display="";
	if(msg.indexOf("-1[sp]")==-1) {
		document.getElementById("area_spview_rst").innerHTML = msg;
	}
	document.getElementById("poll_btn_01").style.display="";
	document.getElementById("poll_btn_02").style.display="none";
}

function SPBottomView(n)
{
	SPViewForm.sp_idx.value = n;
	SPViewForm.c_idx.value = n;
	//SPListForm.method = "post"
	SPViewForm.action = SPViewInfoForm.view_url.value; 
	SPViewForm.submit();
}

function SelfPollList_opt(mid,n)
{
	SPViewForm.page.value = 1;
	SPViewForm.opt.value = n;
	SPViewForm.menu_id.value = "";
	SPViewForm.method = "post";
	SPViewForm.action = SPViewInfoForm.list_url.value + '?menu_id='+mid;
	SPViewForm.submit();
}

function SPoll_Del(n)
{
	if(confirm("삭제하시겠습니까?"))
	{
		SPViewForm.page.value = 1;
		SPViewForm.opt.value = n;
		//SPViewForm.menu_id.value = "";
		SPViewForm.method = "post";
		SPViewForm.action = SPViewInfoForm.proc_delete_url.value;// + '?menu_id='+mid;
		SPViewForm.submit();
	}
	return;
}

function SPoll_Edit(n)
{
	if(confirm("수정하시겠습니까?"))
	{
		SPViewForm.page.value = 1;
		SPViewForm.opt.value = n;
		SPViewForm.mode.value = "edit";
		SPViewForm.method = "post";
		SPViewForm.action = SPViewInfoForm.input_url.value;// + '?menu_id='+mid;
		SPViewForm.submit();
	}
	return;
}
