﻿function _login()
{
   var u=document.getElementById('UserName');
    if(u.value=='')
    {
        alert('请输入登录帐号!');
        u.focus();
        return false;;
    }
    var p=document.getElementById('Password');
    if(p.value=='')
    {
        alert('请输入登录密码!');
        p.focus();
        return false;
    }
    return true;
}
function ad(arr,e,seek)
{
	this.images=new Array();
	this.source=null;
	this.seek=seek;
	this.init=function(){
		for(var i=0;i<arr.length;i++)
		{
			this.images[i]=new Image();
			this.images[i].src=arr[i];
		}
		document.write('<img src="'+this.images[0].src+'" id="'+e+'_img">');
		this.source=document.getElementById(e+'_img');
		this.run();
	}
	this.run=function(){
		var index=0;
		var e=this.source;
		var image=this.images;
		setInterval(function(){
		 
	        $(e).fadeOut(1000,function(){
	            index=(index>=image.length-1)?0:(index+1);
	            e.src= image[index].src;
	            $(e).fadeIn(1000,function(){
	                
	            });
	        }); 
	
		},this.seek);
	}
	 
}
