if  ((document.getElementById) && 
window.addEventListener || window.attachEvent){
(function(){
var e_img = new Image();
e_img.src = "/images/logo.gif"; 
var p_img = new Image();
p_img.src = "/images/pupils.gif";
var d = document;
var pix = "px";
var idx = document.images.length;
if (document.getElementById("cont"+idx)) idx++;
var eyeballs = "";
var pupil1 = "";
var pupil2 = "";
d.write('<div id="cont'+idx+'" class="eyestyle"  style="width:178px;height:60px;PADDING-RIGHT: 25px; PADDING-LEFT: 25px; FONT-SIZE: 84%; PADDING-BOTTOM: 4px; PADDING-TOP: 0px;float:left">'
+'<div id="eyblls'+idx+'" style="position:relative;width:178px;height:60px"><a href="/"><img src="'+e_img.src+'" alt=""/></a>'
+'<img id="ppl1'+idx+'" src="'+p_img.src+'" style="position:absolute;top:38px;left:75px;width:5px;height:5px"/>'
+'<img id="ppl2'+idx+'" src="'+p_img.src+'" style="position:absolute;top:36px;left:100px;width:5px;height:5px"/>'
+'<\/div><\/div>');
function watchTheMouse(y,x){
var osy = eyeballs.offsetTop;
var osx = eyeballs.offsetLeft;
var c1y = osy + 38;
var c1x = osx + 75;
var c2y = osy + 36;
var c2x = osx + 104;
var dy1 = y - c1y;
var dx1 = x - c1x;
var d1 = Math.sqrt(dy1*dy1 + dx1*dx1);
var dy2 = y - c2y;
var dx2 = x - c2x;
var d2 = Math.sqrt(dy2*dy2 + dx2*dx2);
var ay1 = y - c1y;
var ax1 = x - c1x;
var angle1 = Math.atan2(ay1,ax1)*180/Math.PI;
var ay2 = y - c2y;
var ax2 = x - c2x;
var angle2 = Math.atan2(ay2,ax2)*180/Math.PI;
var dv = 1.7;
var onEyeBall1 = (d1 < 10)?d1/dv:4;
var onEyeBall2 = (d2 < 10)?d2/dv:4;
pupil1.top = c1y-6+onEyeBall1 * Math.sin(angle1*Math.PI/180)-osy+pix;
pupil1.left = c1x-6+onEyeBall1 * Math.cos(angle1*Math.PI/180)-osx+pix;
pupil2.top = c2y-6+onEyeBall2 * Math.sin(angle2*Math.PI/180)-osy+pix;
pupil2.left = c2x-6+onEyeBall2  *Math.cos(angle2*Math.PI/180)-osx+pix;
}
function mouse(e){
var y,x;
if (!e) e = window.event;    
 if (typeof e.pageY == 'number'){
  y = e.pageY;
  x = e.pageX;
 }
 else{
 var ref = document.documentElement||document.body;
 y = e.clientY + ref.scrollTop;
 x = e.clientX + ref.scrollLeft;
}
watchTheMouse(y,x);
}
function init(){
eyeballs = d.getElementById("eyblls"+idx);
pupil1 = d.getElementById("ppl1"+idx).style;
pupil2 = d.getElementById("ppl2"+idx).style;
}
if (window.addEventListener){
 window.addEventListener("load",init,false);
 document.addEventListener("mousemove",mouse,false);
}  
else if (window.attachEvent){
 window.attachEvent("onload",init);
 document.attachEvent("onmousemove",mouse);
} 
})();
}//End.


var isIe=(document.all)?true:false; 
//设置select的可见状态 
function setSelectState(state) 
{ 
 var objl=document.getElementsByTagName('select'); 
 for(var i=0;i<objl.length;i++) 
 { 
 objl[i].style.visibility=state; 
 } 
} 
function mousePosition(ev) 
 { 
 if(ev.pageX || ev.pageY) 
 { 
 return {x:ev.pageX, y:ev.pageY}; 
 } 
 return { 
x:(document.body.offsetWidth-document.body.offsetLeft-350)/2,y:200
 }; 
 } 
//弹出方法 
function showMessageBox(wTitle,content,pos,wWidth) 
{ 
 closeWindow(); 
var bWidth=parseInt(document.documentElement.offsetWidth); 
var bHeight=parseInt(document.documentElement.offsetHeight); 
 if(isIe){ 
 setSelectState('hidden');} 
 var back=document.createElement("div"); 
 back.id="back"; 
 var styleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;"; 
 styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;"; 
 back.style.cssText=styleStr; 
 document.body.appendChild(back); 
 showBackground(back,50); 
 var mesW=document.createElement("div"); 
 mesW.id="mesWindow"; 
 mesW.className="mesWindow"; 

mesW.innerHTML="<div class='mesWindowTop'><div class='left'>"+wTitle+"</div><div class='right'><a onclick='closeWindow();' title='关闭窗口' href='#'/>关闭</a></div></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div>";

//styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;width:"+wWidth+"px;"; 
styleStr="left:"+pos.x+"px;top:"+pos.y+"px;position:absolute;width:"+wWidth+"px;"; 
 mesW.style.cssText=styleStr; 
 document.body.appendChild(mesW); 
} 
//让背景渐渐变暗 
 function showBackground(obj,endInt) 
{ 
 if(isIe) 
 { 
 obj.filters.alpha.opacity+=10; 
 if(obj.filters.alpha.opacity<endInt) 
 { 
 setTimeout(function(){showBackground(obj,endInt)},20); 
 } 
 }else{ 
 var al=parseFloat(obj.style.opacity);al+=0.01; 
 obj.style.opacity=al; 
 if(al<(endInt/100)) 
 {setTimeout(function(){showBackground(obj,endInt)},20);} 
 } 
} 
//关闭窗口 
function closeWindow() 
{ 
 if(document.getElementById('back')!=null) 
 { 
 document.getElementById('back').parentNode.removeChild(document.getElementById('back')); 
 } 
 if(document.getElementById('mesWindow')!=null) 
 { 
 document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow')); 
 } 
 
 if(isIe){ 
 setSelectState('');} 
} 
login="<center><form name='form' method='post' action='/user/login.asp?do=yes'>用户账号：<INPUT name='numname'  type='text' value='' size='12' maxlength='20'>&nbsp;&nbsp;用户密码：<INPUT name='userpwd'  type='password' value='' size='12' maxlength='20'><br><br><input type='submit' value=' 立即登录 '>&nbsp;<input type='reset' value=' 重填 '></form><br><a href='../reg/pwdback.asp'>忘记密码？</a></center>";
//if (location.hostname.indexOf("yiloo.com") < 0) {
//top.location="http://yiloo.com";
//}