 	 var str ='';
 	 var b='';
 	 var zp ='';
 	 var Id='';
 	 var obj111;
 	 var tagg;
	 function loadMirror(obj)
	 {
	 	obj111=obj;
		document.body.onmousedown='';
		document.body.onmousemove='';
		document.onmousemove=tp_move;
		document.body.onmousedown=function(){by_down(obj);};
		if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
//浏览器为IE
if(obj.style.backgroundColor!='rgb(216,231,231)')
		{
		obj.className='diaocha_In_border';
		obj.style.backgroundColor='rgb(230,240,240)';
		}
}else{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
//浏览器为Firefox
if(obj.style.backgroundColor!='rgb(216, 231, 231)')
		{
		obj.className='diaocha_In_border';
		obj.style.backgroundColor='rgb(230, 240, 240)';
		}
}else{
//浏览器为其他
}
}
		
		
	}
	 function by_down(obj)
	 {
		var obj1 = obj;
		if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
//浏览器为IE
		if(obj.style.backgroundColor!='rgb(216,231,231)')
		{
		var sip = obj.id.substring(3)+'☆';
		str+=sip;
		obj1.className='diaocha_In_border';
		obj1.style.backgroundColor ='rgb(216,231,231)';
		}
		else
		{
			var sip1 = obj.id.substring(3)+'☆';
			if(str!='')
			{
			var a = str.split(sip1);
			}
			str=a[0]+a[1];
			obj1.className='diaocha_In';
			obj1.style.backgroundColor='rgb(255,255,255)';		
		}
}else{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
//浏览器为Firefox
		if(obj.style.backgroundColor!='rgb(216, 231, 231)')
		{
		var sip = obj.id.substring(3)+'☆';
		str+=sip;
		obj1.className='diaocha_In_border';
		obj1.style.backgroundColor ='rgb(216, 231, 231)';
		}
		else
		{
			var sip1 = obj.id.substring(3)+'☆';
			if(str!='')
			{
			var a = str.split(sip1);
			}
			str=a[0]+a[1];
			obj1.className='diaocha_In';
			obj1.style.backgroundColor='rgb(255, 255, 255)';		
		}
}else{
//浏览器为其他
}
}
		

		if(str!='')
		{
		document.getElementById('queding').style.display='block';
		document.getElementById('tit').style.display='none';
		}else
		{
			document.getElementById('queding').style.display='none';
			document.getElementById('tit').style.display='block';
		}
	 }
	 function tp_move(ev)
	 {
	 ev= ev || window.event; 
		var obj1=obj111;
		var	m_x=document.documentElement.scrollLeft+ev.clientX; 
		var m_y=document.documentElement.scrollTop+ev.clientY;
		var w = obj1.offsetWidth;
		var h = obj1.offsetHeight;
		var x = obj1.offsetLeft;
		var y = obj1.offsetTop;   
		while(obj1=obj1.offsetParent) 
		{ 
		x   +=   obj1.offsetLeft;   
		y   +=   obj1.offsetTop;
		}
		if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
//浏览器为IE
if((m_x<x||m_x>(x+w))||(m_y<y||m_y>(y+h)))
		{
			if(obj111.style.backgroundColor!='rgb(216,231,231)')
			{
			obj111.className='diaocha_In';
			obj111.style.backgroundColor='rgb(255,255,255)';
			}
			document.onmousemove='';
			document.body.onmousedown='';
		}
}else{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
//浏览器为Firefox
if((m_x<x||m_x>(x+w))||(m_y<y||m_y>(y+h)))
		{
			if(obj111.style.backgroundColor!='rgb(216, 231, 231)')
			{
			obj111.className='diaocha_In';
			obj111.style.backgroundColor='rgb(255, 255, 255)';
			}
			document.onmousemove='';
			document.body.onmousedown='';
		}
}else{
//浏览器为其他
}
}
		
		
	 }
	 function p_move(obj)
	 {
	 if(obj.id=='qd')
	 {
		obj.src='../images/qd_2.gif';
	}else
	{
		obj.src='../images/qx_2.gif';
	}
	 }
	 function p_out(obj)
	 {
	if(obj.id=='qd')
	 {
		obj.src='../images/qd_1.gif';
	}else
	{
		obj.src='../images/qx_1.gif';
	}
	}
	function click_qx()
	{
		document.getElementById('queding').style.display='none';
		document.getElementById('tit').style.display='block';
		for(var i =1;i<5;i++)
		{
			document.getElementById('tag'+i).className='diaocha_In';
			document.getElementById('tag'+i).style.backgroundColor='rgb(255,255,255)';
			str='';
		}
	}
function click_qd()
{
for(var i =1;i<5;i++)
{
document.getElementById('t_p'+i).style.width=1;
}
document.getElementById('queding').style.display='none';
document.getElementById('tit').style.display='block';
var IP= document.getElementById('IP').innerHTML;
str = str.split('☆');
var str1 ='';
for(var e=0;e<str.length;e++)
{
str1 += str[e];
}
Vote_add.vote_add(IP,str1,Id,ddd);

		for(var i =1;i<5;i++)
		{
			document.getElementById('tag'+i).className='diaocha_In';
			document.getElementById('tag'+i).style.backgroundColor='rgb(255,255,255)';
			str='';
		}
	vote_load();
}
function ddd(f)
{
if(f=='')
{
alert('您已投票！')
}
else
{
callback(f);
}
}
	function vote_load()
	{
		Vote.vote(callback);
	}
	function callback(a)
	{
		var b =a.split('☆');
		Id =b[9];
		
		zp =parseInt(b[1])+parseInt(b[3])+parseInt(b[5])+parseInt(b[7]);
		document.getElementById('t_title').innerHTML='<a href=\"vote/index.jsp\">'+b[0]+'</a>'+'<span>&nbsp;&nbsp;&nbsp;&nbsp;总票数'+zp+'</span>';
		for(var i=1,j=1;i<5;i++,j=j+2)
		{
			document.getElementById('t'+i).innerHTML='<span>票'+b[j]+'</span>&nbsp;&nbsp;'+b[j+1];
		}
		
		t_p1(b);
		t_p2(b);
		t_p3(b);
		t_p4(b);
	}
	function t_p1(b)
	{
		if(parseInt(document.getElementById('t_p1').style.width)<((b[1]/zp)*170))
		{
		document.getElementById('t_p1').style.width =parseInt(document.getElementById('t_p1').style.width)+2+'px';
		setTimeout(function (){t_p1(b);},1);
		}
	}
		function t_p2(b)
	{
		if(parseInt(document.getElementById('t_p2').style.width)<((b[3]/zp)*170))
		{
		document.getElementById('t_p2').style.width =parseInt(document.getElementById('t_p2').style.width)+2+'px';
		setTimeout(function (){t_p2(b);},1);
		}
	}
		function t_p3(b)
	{
		if(parseInt(document.getElementById('t_p3').style.width)<((b[5]/zp)*170))
		{
		document.getElementById('t_p3').style.width =parseInt(document.getElementById('t_p3').style.width)+2+'px';
		setTimeout(function (){t_p3(b);},1);
		}
	}
		function t_p4(b)
	{
		if(parseInt(document.getElementById('t_p4').style.width)<((b[7]/zp)*170))
		{
		document.getElementById('t_p4').style.width =parseInt(document.getElementById('t_p4').style.width)+2+'px';
		setTimeout(function (){t_p4(b);},1);
		}
	}
	
		
	