/*
'=================================================================================
'
'    Designer's site Program 全站静态系统
'    xizon@c945.com
'    www.c945.com
'    技术支持：没位道
'    未经允许不得私自用于任何商业用途
'    产品官方网站：http://www.badpark.net   http://www.c945.com/d-s
'
'=================================================================================
*/
var MyrootPath;
var attitudezt = 0;//初始化
var attitudeztNum;//cookies


//-----栏目投票（未使用cookie功能）
function get_attitude(attitude_id,sinfo){
	
	var imga = vProperty[0];
	var imgb = vProperty[1];
	var color1 = vProperty[2];
	var color2 = vProperty[3];
	var heightz = vProperty[4];	//图片100%时的高
		
	cookieVID = vtype + "voteTypeID" + titleID;
	
	if (vtype == "article"){

		if (sinfo == 0){
			
			//----------------数据添加并显示
			if (attitudezt != 1){
				$.post(MyrootPath + 'admin/root_client_action/catvoteArt.asp?m=' + Math.random() +'&action=attitude&titleID='+titleID+'&typee='+attitude_id+'', function(data) {
				   
						$.get(MyrootPath + "admin/root_client_action/catvoteArt.asp?m=" + Math.random() +"&action=show&titleID="+titleID, function(data) {
							var thisVoteArtArr = new Array();
							thisVoteArtArr = data.split(",");					
							$("#attitudeinfo0").html("<span style='color: "+color2+";'>"+thisVoteArtArr[0]+"</span>");
							$("#attitudeinfo1").html("<span style='color: "+color1+";'>"+thisVoteArtArr[1]+"</span>");
	
						});
				   
				   
				});
				setTimeout(function(){
					attitudezt = 1;
				},1000);
			}
			

		}else{
			
			//------------------数据查看
			attitudezt = 0;
			$.get(MyrootPath + "admin/root_client_action/catvoteArt.asp?m=" + Math.random() +"&action=show&titleID="+titleID, function(data) {
				var thisVoteArtArr = new Array();
				thisVoteArtArr = data.split(",");					
				$("#attitudeinfo0").html("<span style='color: "+color2+";'>"+thisVoteArtArr[0]+"</span>");
				$("#attitudeinfo1").html("<span style='color: "+color1+";'>"+thisVoteArtArr[1]+"</span>");

			});
			
		}
	
	}
	
	
	if (vtype == "works"){

		if (sinfo == 0){
			
			//----------------数据添加并显示
			if (attitudezt != 1){
				$.post(MyrootPath + 'admin/root_client_action/catvoteWorks.asp?m=' + Math.random() +'&action=attitude&titleID='+titleID+'&typee='+attitude_id+'', function(data) {
				   
						$.get(MyrootPath + "admin/root_client_action/catvoteWorks.asp?m=" + Math.random() +"&action=show&titleID="+titleID, function(data) {
							var thisVoteArtArr = new Array();
							thisVoteArtArr = data.split(",");					
							$("#attitudeinfo0").html("<span style='color: "+color2+";'>"+thisVoteArtArr[0]+"</span>");
							$("#attitudeinfo1").html("<span style='color: "+color1+";'>"+thisVoteArtArr[1]+"</span>");
	
						});
				   
				   
				});
				setTimeout(function(){
					attitudezt = 1;
				},1000);
			}
			

		}else{
			
			//------------------数据查看
			attitudezt = 0;
			$.get(MyrootPath + "admin/root_client_action/catvoteWorks.asp?m=" + Math.random() +"&action=show&titleID="+titleID, function(data) {
				var thisVoteArtArr = new Array();
				thisVoteArtArr = data.split(",");					
				$("#attitudeinfo0").html("<span style='color: "+color2+";'>"+thisVoteArtArr[0]+"</span>");
				$("#attitudeinfo1").html("<span style='color: "+color1+";'>"+thisVoteArtArr[1]+"</span>");

			});
			
		}
	
	}
	
	
	
	MySite.Cookie.set(cookieVID,attitudeztNum);
	//已点击提示
	if (attitudezt == 1){
		floatWin('温馨提示','<center><br /><br /><img src=' + MyrootPath + 'images/error.gif border=0/>&nbsp;' + vProperty[5] + '</center>',430,120,170,0,1,0);
	}

	

}

//输出信息
get_attitude('_good',1)
