
function addFav(url,title,txtalert) {
  if(window.external &&
     typeof window.external.AddFavorite != "undefined")
    window.external.AddFavorite(url,title);
  else{
	if (typeof txtalert=="undefined") txtalert = "Proszę użyć skrutu CTRL+D";
	alert (txtalert);
  }
}


function createMarker(point) {
  var marker = new GMarker(point);
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml("<b>Siedziba firmy IQhouse.pl</b><br/>Bydgoszcz<br/>ul. Gdańska 131");
  });
  return marker;
}
	 
    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(53.135873,18.013026), 14);
		  var point = new GLatLng(53.135773,18.013026);
		  map.addOverlay(createMarker(point));	
      }
    }
	 
licz=0;
function otworz(nazwa,szer,wys) {
config='left=10,top=10,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
kitekSC='okno' + licz;
stadion=window.open('',kitekSC,config)
stadion.document.write('<html><head>');
stadion.document.write('<title>IQ House | kliknij na zdjęciu aby zamknać</title>');
stadion.document.write('<script language="javascript">');
stadion.document.write('setTimeout(');
stadion.document.write('"self.close()');
stadion.document.write(';",120000)');stadion.document.write('</');
stadion.document.write('script>');
stadion.document.write('</HEAD>');
stadion.document.write('<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>');
stadion.document.write('<DIV align=center><a href=# onclick="javascript:self.close();"><img src='+nazwa+' border=0></A></DIV>');
stadion.document.write('</body></html>');
stadion.focus();
licz+=1;
}


$(document).ready(function(){

$("#pasek_news").liScroll(); 

$('#baner_glowny').cycle({ 
    fx:    'fade',
	 timeout: 5000,  
    speed:  5000 
 });
 
$('#nowosci').cycle({ 
    fx:    'scrollRight', 
    delay: 4000 
});

$('#zapis_news').click(function(){
var adres=$('#email').val();
if(adres!='' && !/.+@.+\.[a-zA-Z]{2,4}$/.test(adres))
{
$('#komunikat').fadeIn('slow');;
window.setInterval(function(){$('#komunikat').fadeOut('slow');}, 3000);

}
else
{
$('#formularz_zapisu').submit();
}

return false;
})
});