// <!--


function sprawdzWstaw() {
document.wstaw.wstaw_button.disabled=false
}

function sprawdzFormat(formaty) {
var wstawianyplik=document.sendfile.plik.value
//document.wstaw.wstaw_button.disabled=false
//1. przejscie przez wpisywanie http://
//2! Po wipsaniu sledzimy rozszerzenie .*{3,4}
dobreznaki = "htp:/"
if(wstawianyplik=="") {
	return false
}

}

// OK or ANULUJ - sprawdzanie
function confirmLink(theLink, theSqlQuery,confirmMsg)
{
    // Confirmation is not required in the configuration file
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' ? ' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '';
    }

    return is_confirmed;
}

//---------
//	Zmiana,  prawdopodobnie odwolamy się do formularza, a nie do calego okna
//---------
function zmienLokalizacje (m, a) {
parent.lokalizacja.document.location.href = 'lokalizacja.php?modul=' + m + '&action=' + a;
}


//przy tej funkcji do zrobienie UNDEFINED
//nadac nazwe dla odswierzanego okna
function OdswiezContent(ciag) {
window.location="index.php?"+ciag;
}
function OdswiezModul(ciag) {
window.location="content.php?"+ciag;
}


//---
//		OKNA
//---
function Okno(url, width, height) {
var Win = window.open(url, "Okno",'width=' + width + ',target=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no, toolbar=no, border=no, left=40,top=100' );
}


// openDialogowe(nazwaOkna, plik, szerokosc, wysokosc, tytul, numerek, odswierzanie, akcja)
function openDialogowe(inputName, plik, width, height,tit,numm,odswiezanie,action)
    {
		    
var arr = window.showModalDialog(plik + '?f=' + inputName + '&w=' + width + '&numerek=' + numm + '&action=' + action + '&tit=' + tit + '&h=' + height + '&kx=' + Math.random(),null,'dialogWidth=' + width + 'px;dialogHeight:' + height + 'px;center:yes;status:no;scrollbars:no;resizable:no;help:no');
     
    }
	
	
function openDi(inputName, plik, width, height,tit,numm,odswiezanie,action)
    {
		    
var arr = window.showModalDialog(plik + '?f=' + inputName + '&w=' + width + '&numerek=' + numm + '&action=' + action + '&tit=' + tit + '&h=' + height + '&dialogWidth=' + width + 'px;dialogHeight:' + height + 'px;center:yes;status:no;scrollbars:no;resizable:no;help:no');
     
    }	

	
//Do EDYTORA - można prawdopodobnie usunac	
//function openDialog()
//	{
//var newcolor = showModalDialog(_editor_url + "popups/select_color.html", oldcolor, "resizable: no; help: no; status: no; scroll: no;");
//	}

	
	
	
//---
//		WARSTWY
//---
	
nn4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function show(ident) {
		if(nn4) {		
			document.layers[ident].visibility = "show";
		} else if(ie4) {	
			document.all[ident].style.visibility = "visible";
		}
	}
	function hide(ident) {
		if(nn4) {		
			document.layers[ident].visibility = "hide";
		} else if(ie4) {	
			document.all[ident].style.visibility = "hidden";
		}
	}
function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	window.top.location.href = gourl;
} 


/////////////////////////// MENU - dodać jeszcze wyswietlanie(false,true)
var menuskin = "skin1"; 
var display_url = 0;
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth) {
 zmleft = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
 if (zmleft<1) zmleft=1;
 ie5menu.style.left = zmleft; 
} else {
 zmleft = document.body.scrollLeft + event.clientX;
 if (zmleft<1) zmleft=1;
 ie5menu.style.left = zmleft;
} 
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
   }
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
   }
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
   }
}

// <TR> overMouse

function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
}


//-->
<!--   MATIC Grupa LPK    -->
<!--   www.lpk.com.pl/matic    -->
