	var topFlashImage;
	var topFlashText;
	var topFlashLink;
	var currend_item = 0;
	var item_length = 0;
	
	$(function(){
		initTopFlash();
		setInterval("showTopFlashItem()",3000);		   
	});

	function initTopFlash(){
		topFlashImage = $("#topFlashImage li");
		topFlashText = $("#topFlashText li");
		topFlashLink = $("#topFlashLink li");
		
		item_length = (topFlashImage.length>topFlashText.length)?topFlashText.length:topFlashImage.length;
		$("#topFlashText,#topFlashImage").hover(function(){
				item_length = 0;						  
			},function(){
				item_length = topFlashImage.length>topFlashText.length?topFlashText.length:topFlashImage.length;
		});
		topFlashImage.hide();
		topFlashText.hide();
		topFlashLink.hide();
		
		showTopFlashItem();
		
	}
	
	function showTopFlashItem(){
		
		if(item_length == 0)
			return;
		
		c_Id = currend_item++;
		if(c_Id>= item_length-1){
			currend_item = 0;
		}
		
		topFlashImage.hide();
		topFlashText.hide();
		topFlashLink.hide();
		
		var c_image = $(topFlashImage[c_Id]);
		var c_text = $(topFlashText[c_Id]);
		var c_link = $(topFlashLink[c_Id]);
		
		if(c_text.html().length>0){
			$("#topFlashTextBG").show();
			if(c_link.html().length>0){
				var i_link = "<a href='"+c_link.html()+"' target='_blank'>"+c_image.html()+"</a>";
				var t_link = "<a href='"+c_link.html()+"' target='_blank'>"+c_text.html()+"</a>";
				c_image.html("");
				c_text.html("");
				
				$(i_link).appendTo(c_image);
				$(t_link).appendTo(c_text);
				
			}
		}else{
			$("#topFlashTextBG").hide();
		}
		
		
		c_image.show();
		c_text.addClass("current_select").show();
	}