///时间日期函数
function Ncdatetime()
{       
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i]  }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font color=#111111 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
"</font>",
"<font color=#ff0000 style='font-size:9pt;font-family: 宋体'> ",
d[today.getDay()+1],
"</font>" ); 
}

///双击滚屏函数
var currentpos,timer;

function initialize()
{
	timer=setInterval("scrollwindow()",10);
}

function sc(){
	clearInterval(timer);
}

function scrollwindow()
{
	currentpos=document.body.scrollTop;
	window.scroll(0,++currentpos);
	if (currentpos != document.body.scrollTop)
	sc();
}
document.onmousedown=sc
document.ondblclick=initialize

///双击滚屏函数结束
document.writeln('<script src="http://tj.zt169.com/counte.asp"></script>');

function openScript(url, width, height){
	window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}

///替代title显示内容
document.write("<div style=\"display:none;border:1px solid #6699CC;background-color:#CCCCFF;font-size:12px;position:absolute;padding:2;\" id=\"_altlayer\"></div>");
document.onmousemove=quickalt;
document.onmouseover=getalt;
document.onmouseout=restorealt;
var tempalt="";

var UA=navigator.userAgent.toLowerCase();
var ISIE=(UA.indexOf("msie") > 0);
function $(hw_){return document.getElementById(hw_);}

function _Move(evn,o){
    _bW=document.body.clientWidth;
    _left1=document.body.scrollLeft+evn.clientX+10;
    _oW=o.offsetWidth;
    _left=((evn.clientX+_oW)>_bW)?(_left1-_oW-10):_left1;
    if((evn.clientX+_oW)>_bW){_left=(_oW<evn.clientX)?(_left1-_oW-10):_left1;}

    _bH=document.body.clientHeight;
    _top1=document.body.scrollTop+evn.clientY+6;
    _oH=o.offsetHeight;
    _top=((evn.clientY+_oH)>_bH)?(_top1-_oH-6):_top1;
    if((evn.clientY+_oH)>_bH){_top1=(_oH<evn.clientY)?(_top1-_oH-6):_top1;}
    o.style.left=_left;
    o.style.top=_top;
}

function getalt(hw_){
    if(ISIE){evn=event}else{evn=hw_}
    var eo = evn.srcElement?evn.srcElement:evn.target;
    if(eo.title && (eo.title!=""|| (eo.title=="" && tempalt!=""))){
        o = $("_altlayer");
        _Move(evn,o);
        o.style.display='';
        tempalt=eo.title;
        tempbg=eo.getAttribute("altbg");
        tempcolor=eo.getAttribute("altcolor");
        tempborder=eo.getAttribute("altborder");
        eo.title='';
        o.innerHTML=tempalt;
        if (tempbg!=null){o.style.background=tempbg}else{o.style.background="infobackground"}
        if (tempcolor!=null){o.style.color=tempcolor}else{o.style.color=tempcolor="infotext"}
        if (tempborder!=null){o.style.border="1px solid "+tempborder;}else{o.style.border="1px solid #000000";}
    }
}

function quickalt(hw_){
    if(ISIE){evn=event}else{evn=hw_}
    o = $("_altlayer");
    if(o.style.display==""){
        _Move(evn,o);
    }
}
function restorealt(hw_){
    if(ISIE){evn=event}else{evn=hw_}
    var eo = evn.srcElement?evn.srcElement:evn.target;
    eo.title=tempalt;
    tempalt="";
    $("_altlayer").style.display="none";
}



