// JavaScript Document 首页
var s_speed=3;
var s_rate=0.1;
var s_rate2=0.7;
var larger=3;
var curr=[];
var items=[];
var starswidth=[[82.0,82.0],[108.0,70.0],[104.0,78.0],[65.0,65.0],[66.0,66.0],[79.0,79.0],[66.0,66.0],[63.0,63.0],[119.0,62.0],[80.0,80.0]];
var floatX=[431,496,686,601,616,452,290,300,153,347];
var floatY=[103,209,245,333,452,397,460,336,245,200];
var interfloat=[];
itemimg=document.getElementsByTagName('img');
for(i=0;i<itemimg.length;i++){
	if(itemimg[i].getAttribute('actions')!='stars')continue;
	items.push(itemimg[i].parentNode);
	curr.push(0);
	interfloat.push(0);
	activeImgFloat(i);
}
function activeImgFloat(id){
	System.Events.addEvent(items[id],function(){
										 clearInterval(interfloat[id]);
										 items[id].style.zIndex=2100;
										 interfloat[id]=setInterval(function(){
														var width=parseInt(items[id].style.width);
														var top;
														var left;
														curr[id]+=(starswidth[id][0]*3-width)*s_speed;
														curr[id]*=s_rate2;
														width+=curr[id]*s_rate;
														width=parseInt(width);
														items[id].style.width=width+'px';
														var height=parseInt(width*starswidth[id][1]/starswidth[id][0]);
														items[id].style.height=height+'px';
														top=-(height-starswidth[id][1])/2+floatY[id];
														top=parseInt(top);
														left=-(width-starswidth[id][0])/2+floatX[id];
														left=parseInt(left);
														items[id].style.top=top+'px';
														items[id].style.left=left+'px';
														var flashsIE='flashperson'+id+'IE';
														var flashsNIE='flashperson'+id+'NIE';
														/*if(System.app.IE){
															$(flashsIE).csize(width/starswidth[id][0],height/starswidth[id][1]);
														}else{
															$(flashsNIE).csize(width/starswidth[id][0],height/starswidth[id][1]);
														}*/
														if(width==starswidth[id][0]*3)clearInterval(interfloat[id]);
														
																		 },20);
										 },'mouseover',false);
System.Events.addEvent(items[id],function(){
										 clearInterval(interfloat[id]);
										 items[id].style.zIndex=2000+id;
										 interfloat[id]=setInterval(function(){
														var width=parseInt(items[id].style.width);
														curr[id]+=(starswidth[id][0]-width)*s_speed;
														var top;
														var left;
														curr[id]*=s_rate2;
														width+=curr[id]*s_rate;
														width=parseInt(width);
														items[id].style.width=width+'px';
														var height=parseInt(width*starswidth[id][1]/starswidth[id][0]);
														items[id].style.height=height+'px';
														top=-(height-starswidth[id][1])/2+floatY[id];
														top=parseInt(top);
														left=-(width-starswidth[id][0])/2+floatX[id];
														left=parseInt(left);
														items[id].style.top=top+'px';
														items[id].style.left=left+'px';
														if(width==starswidth[id][0])clearInterval(interfloat[id]);
																		 },20);
										 },'mouseout',false);
}

