(top.location == self.location) || (top.location = self.location)

function nwin(page, x, y, scr)
{
 sx = screen.availWidth;
 sy = screen.availHeight;
 px = (sx/2)-(x/2);
 py = (sy/2)-(y/2);
 window.open(page,'','top='+py+',left='+px+',width='+x+',height='+y+'resizable=no,scrollbars='+scr+',status=yes');
 return;
}

function enqcheck()
{
 var ret = true;
 var d = document;
 if(d.getElementById('name').value == '') { ret = false; alert('Please enter your name.'); }
 
 return ret;
}

function addfav()
{
  var msg_netscape = "Netscape Message";
  var msg_opera    = "Opera doesnt support this function.";
  var msg_other    = "Browser error. Add us to favourites manually.";
  var agt          = navigator.userAgent.toLowerCase();
  var title        = "SolarAge - Renewable Energy for a Sustainable Future";
  var url          = "http://www.solarage.co.uk/";

  if (agt.indexOf("opera") != -1) 
  {
    if (window.opera && window.print)
    {
      return true;
    } else 
    {
      alert(msg_other);
    }
  }    
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title); 
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")         
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,""); 
  else alert(msg_other);

 return false;
}
