// js form validation stuff
var confirmMsg  = 'Proszę zadecydować';
function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function displayWindow(url, width, height)
{
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=1,menubar=no,left=0,top=0' );
}
function displayWindow2(url, width, height)
{
	var Win = window.open(url,"displayWindow2",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=1,menubar=no,left=0,top=0' );
}
function centerWindow(pageUrl,pageTitle,pageWidth,pageHeight,pageSet) 
{ if(screen){ 
var page_width = pageWidth; 
var page_height = pageHeight; 
var page_set = pageSet; 
var page_top = (screen.height-page_height)/2; 
var page_left = (screen.width-page_width)/2; 
openPage=window.open(''+ pageUrl + '',''+ pageTitle + '','width=' + page_width + ',height=' + page_height + ',top=' + page_top + ',left=' + page_left + ',scrollbars=' + page_set + ''); 
openPage.focus(); 
} else { 
openPage=window.open(''+ pageUrl + '',''+ pageTitle + ''); 
openPage.focus(); 
} 
}
