

	function GoGoGo(objName)
	{
		var img=document.getElementById(objName) ;
		img.style.position="absolute";
		img.style.left=parseInt(window.screen.availWidth*Math.random()) + "px";
		img.style.top=parseInt(window.screen.availHeight*Math.random()) + "px";
		img.setAttribute("xDir",1);//&para;¡§&Ograve;&aring;&iquest;&ordf;&Ecirc;&frac14;x&micro;&Auml;¡¤&frac12;&Iuml;¨°
		img.setAttribute("yDir",1);//&para;¡§&Ograve;&aring;&iquest;&ordf;&Ecirc;&frac14;x&micro;&Auml;¡¤&frac12;&Iuml;¨°
		return window.setInterval("randPosition(" + objName + ")","20","JavaScript");
	}

	function randPosition(obj)
	{
		var x=parseInt(obj.style.left);
		if(x>=window.screen.availWidth-obj.width-20)
		obj.setAttribute("xDir",-1);
		if(x<=0)
		obj.setAttribute("xDir",1);
		x+=parseInt(obj.getAttribute("xDir"));
		
		var y=parseInt(obj.style.top);
		if(y>=window.document.body.scrollTop + window.screen.availHeight-obj.height-100)
			obj.setAttribute("yDir",-1);
		if(y<=window.document.body.scrollTop)
		obj.setAttribute("yDir",1);
		y+=parseInt(obj.getAttribute("yDir"));
		 
		obj.style.left=x +"px";
		obj.style.top =y +"px";
	
	}


	function initBlink(){
		window.blinks = [];
		for(var i=0;i<document.links.length;i++){
			if(document.links[i].blink=="true"){
				window.blinks[window.blinks.length] = document.links[i];
			}
		}
		var colors = ["CC0000","ffff00"];
		var curColorIndex = 0;
		var curStep = 0;
		var step = 5 ;
		var totalStep = 100;
		var delay = 25;
		setInterval(function(){
			if(curColorIndex==colors.length){
				curColorIndex = 0;
			}
			var startColor = colors[curColorIndex];
			
			var nextColorIndex;
			if(curColorIndex==colors.length-1){
				nextColorIndex = 0;
			}else{
				nextColorIndex = curColorIndex + 1;
			}
			var endColor = colors[nextColorIndex].toUpperCase();

			var startR = parseInt(startColor.substr(0,2),16);
			var startG = parseInt(startColor.substr(2,2),16);
			var startB = parseInt(startColor.substr(4,2),16);
 	
			var endR = parseInt(endColor.substr(0,2),16);
			var endG = parseInt(endColor.substr(2,2),16);
			var endB = parseInt(endColor.substr(4,2),16);

			var curR = startR + Math.round((endR-startR)/totalStep*curStep);
			var curG = startG + Math.round((endG-startG)/totalStep*curStep);
			var curB = startB + Math.round((endB-startB)/totalStep*curStep);

			var curColor = fixHex(curR,2) + fixHex(curG,2) + fixHex(curB,2);
			if(curColor==endColor){

				curColorIndex ++;
				curStep = 0;
			}
			startBlink("#"+curColor);

			curStep += step;
			curStep = Math.min(curStep,totalStep);
		},delay);
	}
	
	function startBlink(color){
		for(var i=0;window.blinks!=null && i<window.blinks.length;i++){
			window.blinks[i].style.color = color;
		}
	}
	
	function fixHex(num,len){
		var hex = num.toString(16).toUpperCase();
		hex = new Array(len+1).join("0").substring(hex.length) + hex;
		return hex;
	}
	
	function closePic(){
		window.clearInterval(imgObj);
		divTp.style.position='absolute'; 
		divTp.style.height=0; 
		divTp.style.zIndex=-1;
		divTp.innerHTML="";
	}

