﻿// JScript 文件

// 弹出窗口
    function PopWin(url,target,width,height,top,left)
    {
        this.url = url;
        this.target=target;
        this.width=width;
        this.height=height;
        this.top=top;
        this.left=left;
    }
    
    PopWin.prototype.Show=function ()
    {
        var _param = "scrollbars=yes";
        if(this.width)
        {
            _param+=",width="+this.width;
        }
        if(this.height)
        {
            _param+=",height="+this.height;
        }
        if(this.top)
        {
            _param+=",top="+this.top;
        }
        if(this.left)
        {
            _param+=",left="+this.left;
        }
        if(!this.target)
        {
            this.target="PW_"+Math.random();
        }
        window.open(this.url,this.target,_param);
    }
    var PopWins = {Pages:new Array()}  
    PopWins.AddWin = function (url,target,width,height,top,left)
    {
          this.Pages.push(new PopWin(url,target,width,height,top,left));
    }

    PopWins.PopupWin = function ()
    {
        
        for(var i=0;i<this.Pages.length;i++)
        {
            this.Pages[i].Show();
        }
    }

    //添加弹出窗口
//    PopWins.AddWin("http://resource.zotye.com/flash/popup_ad/summer_Hurricane.html","summer_Hurricane",250,230);//庆祝网站正式开通
    
    function MyPopWin()
    {
        PopWins.PopupWin()
    }
    
    if(window.addEventListener)
    {
        window.addEventListener('load',MyPopWin , false); 
    }
    else if(window.attachEvent)
    {
        window.attachEvent('onload', MyPopWin);
    }
    else
    {
        window.onload=MyPopWin;
    }

// 弹出窗口管理结束