var timer,count=5;
function autoGo(){
	if(count==0){gotoCity();return};
	var o=document.createElement('div');
	o.id='oid'+Math.random();o.style.position='absolute';
	o.style.lineHeight='18px';o.className='b f14 grey3';
	o.innerHTML=$('gcTimer').innerHTML;
	xy=Position.cumulativeOffset($('gcTimer'));
	o.style.left=xy[0]+'px';o.style.top=xy[1]+'px';	
	count-=1;
	$('gcTimer').innerHTML=count;
	document.body.appendChild(o);
	new Effect.Puff(o.id,{duration:0.8});
	timer=setTimeout('autoGo()',1250);	
}

function gotoCity(){
	var o=$('btnGotoCity');
	var url=o.href;
	var cityname=o.innerHTML;
	statusInfo('正在'+cityname);
	location.href=url;
}

function stopAutoGo(){
	clearTimeout(timer);
}

function init(){
	if($$('#btnGotoCity')<1)return;
	$('gcTimer').up(0).innerHTML+=' <a href="#" onclick="stopAutoGo()" class="f12">停止</a>';
	autoGo();
}

Event.observe(window,'load',init);