function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)
{
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
function alertFocus(obj, msg)
{
alert(msg);
try{obj.focus();}
catch(e){}
}
function checkdata()
{
if( isNumberString(Login.user.value,"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_")!=1 || Login.user.value.length<2 || Login.user.value.length>16) {alertFocus(Login.user,"\提示:下面是产生错误的可能原因:\n\n·用户名必须是2-16位的数字、英文或下划线");return false;}
if( Login.pass.value =="" || Login.pass.value.length<4 || Login.pass.value.length>16) {alertFocus(Login.pass,"\提示:下面是产生错误的可能原因:\n\n·请输入 4-16 位的密码");return false;}
//if( Login.regjm.value=="" || Login.regjm.value=="验证码→") {alertFocus(Login.regjm,"\提示:下面是产生错误的可能原因:\n\n·请输入验证码!");return false;}
}
var tempstr="";
tempstr=tempstr +"
";
document.write(tempstr);
document.write("");
var lastScrollY=0;
function heartBeat()
{
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop;
else
{/*Netscape stuff*/}
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
try{
//document.getElementById("adleft").style.top=parseInt(document.getElementById("adleft").style.top)+percent+"px";
document.getElementById("adright").style.top=parseInt(document.getElementById("adright").style.top)+percent+"px";
}
catch(e){}
lastScrollY=lastScrollY+percent;
}
function adhide(names){document.getElementById(names).style.display='none';register("isok");}
function screencl(names){if(screen.width<=800){adhide(names);}}
function setCookie(name, value, expire)
{
window.document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))+";path=/;";
}
function getCookie(Name)
{
var search = Name + "=";
if (window.document.cookie.length > 0)
{
offset = window.document.cookie.indexOf(search);
if (offset != -1)
{
offset += search.length;
end = window.document.cookie.indexOf(";", offset)
if (end == -1)
end = window.document.cookie.length;
return unescape(window.document.cookie.substring(offset, end));
}
}
return null;
}
function register(name)
{
var today = new Date();
var expires = new Date();
//1小时 1000*60*60*1
expires.setTime(today.getTime() + 100*60*60*1);
setCookie("my232s", name, expires);
}
function showdl() {
var c = getCookie("my232s");
if (c != null) {return;}
//ycode="";
//document.write(zcode);
document.write(ycode);
//screencl('adleft');
screencl('adright');
window.setInterval("heartBeat()",1);
}
showdl();
//下面是广告
function addEvent(obj,evtType,func,cap){
cap=cap||false;
if(obj.addEventListener){
obj.addEventListener(evtType,func,cap);
return true;
}else if(obj.attachEvent){
if(cap){
obj.setCapture();
return true;
}else{
return obj.attachEvent("on" + evtType,func);
}
}else{
return false;
}
}
function getPageScroll(){
var xScroll,yScroll;
if (self.pageXOffset) {
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollLeft){
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {
xScroll = document.body.scrollLeft;
}
if (self.pageYOffset) {
yScroll = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){
yScroll = document.documentElement.scrollTop;
} else if (document.body) {
yScroll = document.body.scrollTop;
}
arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
}
function GetPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) {
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
var flyingConfig=new Object();
flyingConfig.IsInitialized=false;
flyingConfig.ScrollX=0;
flyingConfig.ScrollY=0;
flyingConfig.MoveWidth=0;
flyingConfig.MoveHeight=0;
flyingConfig.Resize=function(){
var winsize=GetPageSize();
flyingConfig.MoveWidth=winsize[2];
flyingConfig.MoveHeight=winsize[3];
flyingConfig.Scroll();
}
flyingConfig.Scroll=function(){
var winscroll=getPageScroll();
flyingConfig.ScrollX=winscroll[0];
flyingConfig.ScrollY=winscroll[1];
}
addEvent(window,"resize",flyingConfig.Resize);
addEvent(window,"scroll",flyingConfig.Scroll);
function flying(id){
if(!flyingConfig.IsInitialized){
flyingConfig.Resize();
flyingConfig.IsInitialized=true;
}
var obj=document.getElementById(id);
obj.style.position="absolute";
var W=flyingConfig.MoveWidth-obj.offsetWidth;
var H=flyingConfig.MoveHeight-obj.offsetHeight;
var x = W*Math.random(),y = H*Math.random();
var rad=(Math.random()+1)*Math.PI/6;
var kx=Math.sin(rad),ky=Math.cos(rad);
var dirx = (Math.random()<0.5?1:-1), diry = (Math.random()<0.5?1:-1);
var step = 1;
var interval;
this.SetLocation=function(vx,vy){x=vx;y=vy;}
this.SetDirection=function(vx,vy){dirx=vx;diry=vy;}
obj.CustomMethod=function(){
obj.style.left = (x + flyingConfig.ScrollX) + "px";
obj.style.top = (y + flyingConfig.ScrollY) + "px";
rad=(Math.random()+1)*Math.PI/6;
W=flyingConfig.MoveWidth-obj.offsetWidth;
H=flyingConfig.MoveHeight-obj.offsetHeight;
x = x + step*kx*dirx;
if (x < 0){dirx = 1;x = 0;kx=Math.sin(rad);ky=Math.cos(rad);}
if (x > W){dirx = -1;x = W;kx=Math.sin(rad);ky=Math.cos(rad);}
y = y + step*ky*diry;
if (y < 0){diry = 1;y = 0;kx=Math.sin(rad);ky=Math.cos(rad);}
if (y > H){diry = -1;y = H;kx=Math.sin(rad);ky=Math.cos(rad);}
}
this.Run=function(){
var c = getCookie("my232s");
if (c != null) {document.getElementById("flysoulad").style.display = "none";return;}
var delay = 50;
interval=setInterval(obj.CustomMethod,delay);
obj.onmouseover=function(){clearInterval(interval);}
obj.onmouseout=function(){interval=setInterval(obj.CustomMethod, delay);}
}
}
document.write('');
//setTimeout("showfd()",2000);
function showfd()
{
var ad1=new flying("flysoulad");
ad1.Run();
}