﻿function js_Vote(logUser,mid,cdiv)
{

	var coo=cookieMemory.get("mmtp");

	if (coo!="" && coo!=null)
	{
		if (coo.indexOf(logUser+"|")>-1)
		{
			alert(lan_todayHasVote);
			return false;
		}
	}
	if(MMPK.FunctionPage.AjaxPage.Vote(mid).value)
	{
		alert(lan_voteSuccess);
		var d =new Date();
		var stimelen =(86400000-(((d.getHours()*60+d.getMinutes())*60)+d.getSeconds())*1000+d.getMilliseconds());
		cookieMemory.set("mmtp",coo+logUser+"|",stimelen)
		cdiv.text(parseInt(cdiv.text())+1)
		this.isTp++;
	}
	else
	{
		alert(lan_voteErr);
	}
}


function js_Vote_Quarter(logUser,mid,cdiv)
{

	var coo=cookieMemory.get("mmtp");

	if (coo!="" && coo!=null)
	{
		if (coo.indexOf(logUser+"|")>-1)
		{
			alert(lan_todayHasVote);
			return false;
		}
	}
	if(MMPK.FunctionPage.AjaxPage.QuarterVote(mid).value)
	{
		alert(lan_voteSuccess);
		var d =new Date();
		var stimelen =(86400000-(((d.getHours()*60+d.getMinutes())*60)+d.getSeconds())*1000+d.getMilliseconds());
		cookieMemory.set("mmtp",coo+logUser+"|",stimelen)
		cdiv.text(parseInt(cdiv.text())+1)
		this.isTp++;
	}
	else
	{
		alert(lan_voteErr);
	}
}
				