// JavaScript Document
var imagewidth=150;imageheight=150
var pic1;
var isNS = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4));
var _all = '';
var _style = '';
var wwidth, wheight;
var ydir = '++';
var xdir = '++';
var id1, id2, id3;
var x = 1;
var y = 1;
var x1, y1;
if(!isNS) 
{
_all='all.';
_style='.style';
}

function getwindowsize() 
{
	clearTimeout(id1);
	clearTimeout(id2);
	clearTimeout(id3);	
	if (isNS) 
	{
	wwidth = window.innerWidth - imagewidth;
	wheight = window.innerHeight - imageheight;
	} 
	else 
	{
	wwidth = document.body.clientWidth - imagewidth;
	wheight = document.body.clientHeight - imageheight;
	}
	id3 = setTimeout('randomdir()', 20000);
	animate();
}

function randomdir() 
{
	if (Math.floor(Math.random()*2)) 
	{
	(Math.floor(Math.random()*2)) ? xdir='--': xdir='++';
	} 
	else 
	{
	(Math.floor(Math.random()*2)) ? ydir='--': ydir='++';
	}
	id2 = setTimeout('randomdir()', 20000);
}
function animate() 
{
	eval('x'+xdir);
	eval('y'+ydir);
	try{
		if (isNS) 
		{
		pic1.moveTo((x+pageXOffset),(y+pageYOffset))
		} 
		else 
		{
		pic1.pixelLeft = x+document.body.scrollLeft;
		pic1.pixelTop = y+document.body.scrollTop;
		}
		if (isNS) 
		{
		if (pic1.top <= 5+pageYOffset) ydir = '++';
		if (pic1.top >= wheight+pageYOffset) ydir = '--';
		if (pic1.left >= wwidth+pageXOffset) xdir = '--';
		if (pic1.left <= 5+pageXOffset) xdir = '++';
		} 
		else 
		{
		if (pic1.pixelTop <= 5+document.body.scrollTop) ydir = '++';
		if (pic1.pixelTop >= wheight+document.body.scrollTop) ydir = '--';
		if (pic1.pixelLeft >= wwidth+document.body.scrollLeft) xdir = '--';
		if (pic1.pixelLeft <= 5+document.body.scrollLeft) xdir = '++';
		}
	}
	catch(e){}
	id1 = setTimeout('animate()', 30);
}
function submitcheck()
{
if (document.loginform.Username.value=="")
   {
      alert("您没有输入用户名！");
	  document.loginform.Username.focus();
	  return false;
   }
if (document.loginform.Userpwd.value=="")
   {
      alert("您忘记输入密码了！");
	  document.loginform.Userpwd.focus();
	  return false;
   }
}
function checkloginform()
{
	if (loginform.UserName.value=="") 
	{
	alert('请输入用户名!');
	loginform.UserName.focus();
	return false;
	}
	if (loginform.PassWord.value=="") 
	{
	alert('请输入密码!');
	loginform.PassWord.focus();
	return false;
	}
}
function winopen()
{
//window.open('1026online.asp','','')
//window.open('window.htm','','width=450,height=300,left=0,top=0,toolbar=no, status=no, menubar=no, resizable=no, scrollbars=no')
}

