﻿// JScript 文件

 //弹出一个新窗口  
function ShowNewWindow( wWidth, wHeight, webFile)
{   
     //var wHeight = 400;
     //var wWidth = 550;
     var t = ( screen.availHeight - wHeight ) / 2; 
     var l = ( screen.availWidth - wWidth ) / 2;
     var var_win=window.open( webFile,"新窗体", "left=" + l + ",top=" + t + ",height=" + wHeight + ",width=" + wWidth + ",toolbar=no,status=yes,scrollbars=no,resizable=no" );
     if(var_win)
     {
        var_win.focus();
     }
 }

//在线服务 
function initEcAd() {
    document.getElementById("AdLayer2").style.posTop = -200;
    document.getElementById("AdLayer2").style.visibility = 'visible'
    MoveRightLayer('AdLayer2');
}
function MoveRightLayer(layerName) {
    var obj = document.getElementById(layerName);
    var x = -5;
    var y = -150;      // 右侧广告距离页首高度
    var diff = (document.documentElement.scrollTop + y - obj.style.posTop)*.40;
    var y = document.documentElement.scrollTop + y - diff;
    obj.style.posTop = y;
    obj.style.posRight = x;
    setTimeout("MoveRightLayer('AdLayer2');", 20);
}

function KillErrors()
{
    return true;
}
//window.onerror = KillErrors();
