function NeatDialog(sHTML, sTitle, bCancel)
{
  window.neatDialog = null;
  this.elt = null;
  if (document.createElement  &&  document.getElementById)
  {
    var dg = document.createElement("div");
    dg.className = "neat-dialog";
    if (sTitle)
      sHTML = '<div class="neat-dialog-title">'+sTitle+
              ((bCancel)?
                '<img src="x.gif" alt="Cancel" class="nd-cancel" />':'')+
                '</div>\n' + sHTML;
    dg.innerHTML = sHTML;

    var dbg = document.createElement("div");
    dbg.id = "nd-bdg";
    dbg.className = "neat-dialog-bg";

    var dgc = document.createElement("div");
    dgc.className = "neat-dialog-cont";
    dgc.appendChild(dbg);
    dgc.appendChild(dg);

    //adjust positioning if body has a margin
    if (document.body.offsetLeft > 0)
      dgc.style.marginLeft = document.body.offsetLeft + "px";

    document.body.appendChild(dgc);
    if (bCancel) document.getElementById("nd-cancel").onclick = function()
    {
      window.neatDialog.close();
    };
    this.elt = dgc;
    window.neatDialog = this;
  }
}
NeatDialog.prototype.close = function()
{
  if (this.elt)
  {
    this.elt.style.display = "none";
    this.elt.parentNode.removeChild(this.elt);
  }
  window.neatDialog = null;
}

function openDialog()
  {

var sHTML = '<p class="win">您现在所访问的页面属于老版本的页面，部分软件可能无法下载。<br />请点击&nbsp;<a href="http://www.fangyu.org"><B><FONT COLOR="#FF6600">www.fangyu.org</FONT></B></a>&nbsp;进入新版网站搜索下载,谢谢!</p>'+
      '<p class="openurl"><a href="http://www.fangyu.org">┊到新版网站上看看┊</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="window.neatDialog.close()">┊继续访问这个页面┊</a></p>';
    new NeatDialog(sHTML, "<B>┊圣盾防御友情提示┊</B>", false);
  
}
  