function CheckAll(formname, allbox){
	if (formname.allbox.value =="0"){
		all = 1;
		formname.allbox.value = "1";
	}else {
		all = 0;
		formname.allbox.value = "0";	
	}
	for (i=0;i<formname.elements.length;i++){
    	var e = formname.elements[i];
    	if (all==0) e.checked = true;
    	else e.checked = false;
    }
}

function Change_Sel(form, selobj, selfield)
{
	if(selobj == 2)
	{
		form.options[0] = new Option("&#x719F;&#x60C6;&#x9761;", 1);
		form.options[1] = null;
		form.options[1] = new Option("&#x6F60;&#x8CE1;", 4);
		form.options[2] = null;
		//form.options[2] = new Option("&#xF81F;&#xF6EA;", 5);
		//form.options[3] = null;

		if(selfield == 4)
			form.options[1].selected = true;
		//else if(selfield == 5)
		//	form.options[2].selected = true;
		else
			form.options[selfield - 1].selected = true;
	}
	else
	{
		form.options[0] = new Option("&#x628E;&#x9761;", 1);
		form.options[1] = new Option("&#x91EC;&#x6C2A;", 2);
		form.options[2] = new Option("&#x5824;&#x5533;&#x6266;", 3);
		form.options[3] = new Option("&#x6F60;&#x8CE1;", 4);

		form.options[selfield - 1].selected = true;
	}
}

function Change_Input(selobj, obj1, obj2)
{
	//obj1.style.visibility = 'visible';
	//obj2.style.visibility = 'hidden';
	if(selobj == "MY")
	{
		obj1.style.visibility = 'visible';
		obj2.style.visibility = 'hidden';
	}
	else
	{
		obj1.style.visibility = 'hidden';
		obj2.style.visibility = 'visible';
	}
}
/*
function Change_Form(number)
{
	data = "";    
	if(number == 5)
	{
		data = "&#xF700;<input type='text' size='12' id='search_date_from' name='search_date_from' value='&#xF798;&#x8438;&#x8875;&#x829E;&#x6041;&#x5BC1;' maxlength='12' class='bg' readonly><img src='images/date_selector.gif' width='16' height='18' vspace='0' hspace='3' border='0' onClick=\"popUpCalendar(this , formsearch.search_date_from, 'yyyy-mm-dd');\">";
		data = data + "&#x796B;<input type='text' size='12' id='search_date_to' name='search_date_to' value='&#xF798;&#x8438;&#x8875;&#x829E;&#x6041;&#x5BC1;' maxlength='12' class='bg' readonly><img src='images/date_selector.gif' width='16' height='18' vspace='0' hspace='3' border='0' onClick=\"popUpCalendar(this ,  formsearch.search_date_to, 'yyyy-mm-dd');\">";
*/
		/*year = "&#xF700;<input type='text' name='begin_year' size='4' maxlength='4' class='bg'>&#x721B; ";
		month = "<select name='begin_month' class='bg'>";
		for(i = 1; i <= 12; i++)
			month = month + "<option value='" + i + "'>" + i + "</option>";

		month = month + "</select>&#x580E; ";

		day = "<select name='begin_day' class='bg'>";
		for(i = 1; i <= 31; i++)
			day = day + "<option value='" + i + "'>" + i + "</option>";

		day = day + "</select>&#xF81F;<br>";

		data = data + year + month + day;

		year = "&#x796B;<input type='text' name='end_year' size='4' maxlength='4' class='bg'>&#x721B; ";
		month = "<select name='end_month' class='bg'>";
		for(i = 1; i <= 12; i++)
			month = month + "<option value='" + i + "'>" + i + "</option>";

		month = month + "</select>&#x580E; ";

		day = "<select name='end_day' class='bg'>";
		for(i = 1; i <= 31; i++)
			day = day + "<option value='" + i + "'>" + i + "</option>";

		day = day + "</select>&#xF81F; ";

		data = data + year + month + day;*/
/*	}
	else
		data = data + "<input name='search_str' type='text' size='30' class='bg'>\n";

	if(document.layers)
	{
		document.layers.cust.document.write(data);
		document.layers.cust.document.close();
	}
	else 
	{
		if(document.all)
			cust.innerHTML = data;
	}
}
*/
function MM_openBrWindow2(param, vid, num)
{
	var temp;
	temp = 0;
	for (var i=0; i < document.voteform.vote_answer.length; i++) {
		if (document.voteform.vote_answer[i].checked) {
			temp = i + 1;
			//x = i + 1;
			//strURL = strURL + "?choice=c" + x
		}
	}
if(num == 1)
	open("vote_result.php?vote_answer=" + temp + "&vid=" + vid, "popupWindow", "menubar=no,toolbar=no,locationbar=no,personalbar=no,status=no,scrollbars=yes,resizable=yes,width=350,height=350");
else if(num == 2)
	open("vote_result.php", "popupWindow", "menubar=no,toolbar=no,locationbar=no,personalbar=no,status=no,scrollbars=yes,resizable=yes,width=620,height=520");
else if(num == 3)
	open("vote_result.php?vote_answer=-1&vid=" + vid + "&seeresult=1", "popupWindow", "menubar=no,toolbar=no,locationbar=no,personalbar=no,status=no,scrollbars=yes,resizable=yes,width=350,height=350");
}