

/*
-- ------ Vote ------ --
*/
function Vote(){}
//-- ------ #Parameters ------ --

Vote.prototype.sAjax_0=new netsSingleAjax();

//-- ------ #Methods ------ --
//#Navigation
Vote.prototype.sNavigationCount=5;
Vote.prototype.OnNavigation=function(pIndex){
	var Coun0=0;
	while(Coun0<this.sNavigationCount){
		document.getElementById("MainNavigation_"+Coun0).className="Groupsale_Navigation_2";
		Coun0++;
	}
	
	document.getElementById("MainNavigation_"+pIndex).className="Groupsale_Navigation_2_A";
	return 0;
}

//#Ques
Vote.prototype.Ques_Count=0;
Vote.prototype.OnQues_Next=function(){
	var tmpID=parseInt(document.getElementById("mainID").value);
	var tmpPageindex=parseInt(document.getElementById("votePageindexTxt").value);
	var tmpResult=document.getElementById("voteResultTxt").value;
	
	//Make now result
	var Coun0=0;
	while(this.Ques_Count>Coun0){
		tmpElement=document.getElementById("Voteobject_"+Coun0+"Txt");
		if(tmpElement!=undefined){
			if(tmpElement.tagName=="INPUT"){
				if(tmpElement.type=="radio" || tmpElement.type=="checkbox"){
					Coun1=0;
					while(document.getElementById("Voteobject_"+Coun0+"Txt"+Coun1)!=undefined){
						if(document.getElementById("Voteobject_"+Coun0+"Txt"+Coun1).checked){
							if(document.getElementById("Voteobject_"+Coun0+"Txt"+Coun1).value==-1){
								tmpResult+=document.getElementById("Voteobject_"+Coun0+"Txt_Other").value+tmpCommon.sysSPLIT2;
							}else{
								tmpResult+=document.getElementById("Voteobject_"+Coun0+"Txt"+Coun1).value+tmpCommon.sysSPLIT2;
							}
						}
						Coun1++;
					}
					
				}else if(tmpElement.type=="text"){
					tmpResult+=tmpElement.value;
				}
			}else if(tmpElement.tagName=="TEXTAREA"){
				tmpResult+=tmpElement.value;
			}
			tmpResult+=tmpCommon.sysSPLIT5+document.getElementById("Voteobject_"+Coun0+"TxtID").value+tmpCommon.sysSPLIT6;
		}
		
		Coun0++;
	}

	tmpPageindex++;
	document.getElementById(tmpCommon.sysForm).action=tmpCommon.sysPage+"?ID="+tmpID;
	document.getElementById("votePageindexTxt").value=tmpPageindex;
	document.getElementById("voteResultTxt").value=tmpResult;
	return 0;
}


