
//Multi-browser compatible function that returns a reference to any object in the page
function GetObject(strWindow, strObjectName,strParent)
{	
	var objItem;
	
	if (document.all)
		objItem = strWindow.document.all[strObjectName];
	else
	{
		objItem = strWindow.document.getElementById(strObjectName);
		if (objItem==null)
			objItem=strWindow.document.getElementsByName(strObjectName)[0];
		if (strWindow.document.getElementsByName(strObjectName).length>1)
			objItem=strWindow.document.getElementsByName(strObjectName);	
	}

	return (objItem);
};


function cOn(td,color)
{
	if(document.getElementById||(document.all && !(document.getElementById)))
		td.style.backgroundColor=color;
}

function cOut(td,color)
	{
	if(document.getElementById||(document.all && !(document.getElementById)))
		td.style.backgroundColor=color;
}


//More compatible ShowDiv and HideDiv functions
//Use these instead of the ones above
//										--Arbi
function HideDiv(strWindow, strDivID, strParent)
{
	objDIV = GetObject(strWindow, strDivID, strParent);
	if (typeof(objDIV) == 'object')
	{
		objDIV.style.display = "none";
		objDIV.style.visibility = "hidden";	
		
	}

};

function ShowDiv(strWindow, strDivID, strParent)
{
	objDIV = GetObject(strWindow, strDivID, strParent);	
	if (typeof(objDIV) == 'object')
	{
		objDIV.style.display = "";
		objDIV.style.visibility = "visible";
	
	}
};

function ShowHideDiv(strWindow, strDivID, strParent)
{
	objDIV = GetObject(strWindow, strDivID, strParent);
	if (typeof(objDIV) == 'object')
		if (objDIV.style.visibility=='visible')
			HideDiv (strWindow,strDivID,strParent) ;
		else
			ShowDiv (strWindow,strDivID,strParent) ;
};
<!--
if (document.images) {
     button1 = new Image
     button2 = new Image

	 button3 = new Image
     button4 = new Image

	 button5 = new Image
     button6 = new Image

	 button7 = new Image
     button8 = new Image

	 button9 = new Image
     button10 = new Image

	 button11 = new Image
     button12 = new Image

     button1.src = 'pic/btn_firma.gif'
     button2.src = 'pic/btn_firma_on.gif'

     button3.src = 'pic/btn_produkty.gif'
     button4.src = 'pic/btn_produkty_on.gif'

     button5.src = 'pic/btn_naswietlarnia.gif'
     button6.src = 'pic/btn_naswietlarnia_on.gif'

     button7.src = 'pic/btn_kontakt.gif'
     button8.src = 'pic/btn_kontakt_on.gif'

     button9.src = 'pic/btn_aktualnosci.gif'
     button10.src = 'pic/btn_aktualnosci_on.gif'

     button11.src = 'pic/btn_praca.gif'
     button12.src = 'pic/btn_praca_on.gif'

 }
function delSzukaj(i)
{
if (i.value=="szukaj w serwisie") i.value="";
}
function chSzukaj(i)
{
if (i.value=="") i.value="szukaj w serwisie";
}