var confirmMsg  = 'Czy na pewno chcesz ';
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 + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function popwin(url,x,y){
    var attributes = "toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, height="+y+",width="+x;
    window.open(url,"my_new_window",attributes)
}

function przeliczWartosc(zdarzenie) {
 
var netto = zdarzenie.value; 
var podatek = document.formularz.tax.value;
document.formularz.taxAmmount.value = (podatek*0.01*netto);
document.formularz.Ammount.value = ((1+(podatek*0.01))*netto);
return;
}

function changeInputs()
{
	var els = document.getElementsByTagName('input');
	var elsLen = els.length;
	var i = 0;
	for ( i=0;i<elsLen;i++ )
	{
		if ( els[i].getAttribute('type') )
		{
			if ( els[i].getAttribute('type') == "submit" )
				els[i].className = 'button';
		}
	}
}

window.onload = function() { changeInputs(); }

