var d_domain = ".netscape.com";
// var d_domain = "";

function myIs() {
 var agent = navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);
 this.minor = parseFloat(navigator.appVersion);
 this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
 this.ns2 = (this.ns && (this.major == 2));
 this.ns3 = (this.ns && (this.major == 3));
 this.ns4 = (this.ns && (this.major == 4));
 this.ns5 = (this.ns && (this.major > 4));
 this.ns6 = (this.ns && (agent.indexOf('netscape6')!=-1) );
 this.ns7 = (this.ns && (agent.indexOf('netscape/7')!=-1) );
 this.ns7pr = (this.ns && (agent.indexOf('netscape/7.0b1')!=-1) );
 this.ns71 = (this.ns && (agent.indexOf('netscape/7.1')!=-1) );
 this.ie = (agent.indexOf("msie") != -1);
 this.ie3 = (this.ie && (this.major == 2));
 this.ie4 = (this.ie && (this.major >= 4));
 this.op3 = (agent.indexOf("opera") != -1);
 this.pc  = (agent.indexOf("win") != -1);
 this.moz = ( this.ns && (agent.indexOf("netscape/") == -1) );
 if (this.moz) this.ns = 0;
}

var myis = new myIs()

function exit_proc() {
  var doit = (location.hostname.toLowerCase().indexOf('.netscape.com') != -1) ? 1 : 0;
  var r_syspop = getCookie("NSCPHPAD2");
  //var o_cd = getCookie("OrderedCD");
  width=422;
  height=200;
  URL = (myis.ns) ? "http://wp.netscape.com/ex/shak/home_popups/popup_hp3.html" : "http://wp.netscape.com/ex/shak/home_popups/popup_hp4.html";
  winname = "popupwin";
  options  = "scrollbars=no,resizable=no,menubar=no,status=no,toolbar=no,location=no,directories=no,width=" + width + ",height=" + height;
  if (!myis.ns71 && !r_syspop && doit)
  {
    var dopop = null;
    dopop = setCookie("NSCPHPAD2","set",47,"/",d_domain);
    if (dopop)
      var remote2 = window.open(URL,winname,options);
  }
}

function setCookie(cookieName, cookieValue, hours, path, domain, secure) 
{
 var expires=new Date();
 expires=new Date(expires.getTime()+(hours*60*60*1000));
 document.cookie = 
  escape(cookieName) + '=' + escape(cookieValue) 
  + (expires ? '; EXPIRES=' + expires.toGMTString() : '')
  + (path ? '; PATH=' + path : '')
  + (domain ? '; DOMAIN=' + domain : '')
  + (secure ? '; SECURE' : '');
 cookieValue = null;
 return getCookie(cookieName);
}

function getCookie (cookieName) {
 var cookieValue = null;
 var posName = document.cookie.indexOf(escape(cookieName) + '=');
 if (posName != -1) {
  var posValue = posName + (escape(cookieName) + '=').length;
  var endPos = document.cookie.indexOf(';', posValue);
  if (endPos != -1)
   cookieValue = unescape(document.cookie.substring(posValue,endPos));
 else
  cookieValue = unescape(document.cookie.substring(posValue));
 }
 return cookieValue;
}


