function setCookie(name, value, expiredays, path, domain, secure) {
   if (expiredays) {
      var exdate=new Date();
      exdate.setDate(exdate.getDate()+expiredays);
      var expires = exdate.toGMTString();
   }
   document.cookie = name + "=" + escape(value) +
   ((expiredays) ? "; expires=" + expires : "") +
   ((path) ? "; path=" + path : "") +
   ((domain) ? "; domain=" + domain : "") +
   ((secure) ? "; secure" : "");
}

function vote(num, id)
{
	setCookie("vote", document.getElementById('vote_id').value, 7, "/"); 
	$('.check').html('<img style="margin:25px 0 50px 70px" src="img/89.gif" />');
	setTimeout(function(){bodyContent = $.ajax({
	url: url + "ajax.php",
	type: "GET",
	cache: false,
	data: ({vote : num, id: id}),
	dataType: "text",
	async:true,
	success: function(msg){
		 $('.interview_content').html(msg)
	  }
	 }).responseText}, 1000);
	//$url = 'vote=' + $num + '&id=' + $id;
	//ajaxQuery('vote', $url)
}

function vote_result(id)
{
	$('.check').html('<img style="margin:25px 0 50px 70px" src="img/89.gif" />');
	setTimeout(function(){bodyContent = $.ajax({
	url: url + "ajax.php",
	type: "GET",
	cache: false,
	data: ({result : 1, id: id}),
	dataType: "text",
	async:true,
	success: function(msg){
		 $('.interview_content').html(msg)
	  }
	 }).responseText}, 1000);
}
