(top.location == self.location) || (top.location = self.location)

sfHover = function()
{
 var sfEls = document.getElementById("nav").getElementsByTagName("LI");
 for (var i=0; i<sfEls.length; i++)
 {
  sfEls[i].onmouseover=function()
  {
   this.className+=" sfhover";
  }
  sfEls[i].onmouseout=function()
  {
   this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
  }
 }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function noeolas()
{
 var fo = new FlashObject("top_fx.swf", "topswf", "740", "181", "7", "#FFFFFF");
 fo.addParam("movie", "top_fx.swf");
 fo.addParam("quality", "high");
 fo.addParam("bgcolor", "#1B1B1B");
 fo.addParam("menu", "false");
 fo.addParam("allowScriptAccess", "sameDomain");
 fo.write("tfl");
}

function addfav()
{
  var msg_netscape = "Wiadomość Netscape";
  var msg_opera    = "Ta funkcja nie działa z tą wersją Opery. Dodaj nas do ulubionych ręcznie.";
  var msg_other    = "Twoja przeglądarka nie wspiera automatycznego dodawania do ulubionych. Dodaj nas do ulubionych ręcznie.";
  var agt          = navigator.userAgent.toLowerCase();
  var title        = "NO-EL";
  var url          = "http://www.no-el.pl/";

  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;  
}

function startowa()
{
 document.body.style.behavior='url(#default#homepage)';
 document.body.setHomePage('http://www.no-el.pl/');
 return false;
}

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 chkzamow()
{
 ok = true;
 if(document.getElementById("imienaz").value == "") { ok=false; alert('Pole "Imię i nazwisko" jest wymagane.'); } else
 if(document.getElementById("miasto").value == "") { ok=false; alert('Pole "Miasto" jest wymagane.'); } else
 if(document.getElementById("ulica").value == "") { ok=false; alert('Pole "Ulica" jest wymagane.'); } else
 if(document.getElementById("kod").value == "") { ok=false; alert('Pole "Kod pocztowy" jest wymagane.'); }
 return ok;
}

function fakturka()
{
 if (document.getElementById) //IE5, FF, OPERA lub NN6
  {
   if(document.getElementById("fvat").checked)
   {
	document.getElementById("fvnip").style.height = 'auto';
	if(document.getElementById("dane_zam").checked) { document.getElementById("fvdane").style.height = '0px'; }
	 else { document.getElementById("fvdane").style.height = 'auto'; }
   }
    else { document.getElementById("fvnip").style.height = '0px'; document.getElementById("fvdane").style.height = '0px'; }
 }
  else if (document.layers) //NN4
 {
  if(document.layers["fvat"].checked)
   { document.layers["fvnip"].height = 'auto'; }
    else { document.layers["fvnip"].height = '0px'; document.layers["fvdane"].height = '0px'; }
 }
 return 0;
}
