//__________________OTWIERANIE OKIEN____________________________

var newwindow = '';

function displayWindow2(url, width, height) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
	else {
		newwindow=window.open(url,"displayWindow2",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=no,screenX=50,screenY=50,dependent=yes,status=yes');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

//__________________KONIEC - OTWIERANIE OKIEN____________________________

//__________________FOCUS____________________________
function setfocus()
{
  if (document.forms.length > 0)
  {
  	if (document.forms[0].elements.length > 0)
        {
  		document.forms[0].elements[0].focus();
        }
  }
}


//__________________KONIEC - FOCUS____________________________


//------------------DODAJ OBIEKT - LINK na GRAFICE------------
	function point_it(e){
	    var posx = 0;
	    var posy = 0;
   		e = e || window.event;
    	if (e.layerX || e.layerY) {
        	posx = e.layerX;
        	posy = e.layerY;
    	} else {
        	posx = e.offsetX;
        	posy = e.offsetY;    		
    	}	    
		if (posx < 77 && posy < 110) {
	    	window.location='WyborPakietuForward.do';
	    }
	}
	function point_it_over(e){
	    var posx = 0;
	    var posy = 0;
	    
   		e = e || window.event;
    	if (e.layerX || e.layerY) {
        	posx = e.layerX;
        	posy = e.layerY;
    	} else {
        	posx = e.offsetX;
        	posy = e.offsetY;    		
    	}	    
	    
	    if (posx < 77 && posy < 110 &&
	    	posx > 0 && posy > 0) {
	    	 document.body.style.cursor = 'pointer';
	    } else {
	    	 document.body.style.cursor = 'default';	    
	    }
	}	
//------------------DODAJ OBIEKT - LINK na GRAFICE - KONIEC---

//------------------SET HOME PAGE---
function setHome()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage("http://bed24.pl");
}
//------------------SET HOME PAGE - KONIEC---

//------------------DO ULUBIONYCH---
function addFav()
{
    var title="bed24.pl - fajne noclegi"
    var url="http://bed24.pl"

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);
}
//------------------DO ULUBIONYCH-- KONIEC -
