function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
    && typeof(parent.document.title) == 'string') {
    
}
var confirmMsg  = 'Pytanie';
function confirmLink(theLink, theSqlQuery)
{
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }
    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }
    return is_confirmed;
}

function disable(co,co2){ 
document.getElementById(co).value="";
document.getElementById(co2).value="";

} 

function tylko_liczby()
{
		 if (event.keyCode<48 || event.keyCode>57)
         event.returnValue = false;
}

ie=document.all;
function tylkoliczby(pole){
        pole.onfocus=function(){
                document.onkeydown=function(e){
                        if(ie)kod=event.keyCode;
                        else kod=e.keyCode;

                        if(kod==45 || kod==47 || kod<44 || kod>57)
                          if(kod!=8 && kod!=37 && kod!=39)
                           return false;
                }
        }
        pole.onblur=function(){document.onkeydown=null}
}


if (document.getElementById)
{
  document.write('<style type="text/css">')
  document.write('.switchcontent{display:none;}')
  document.write('</style>')
}

function expandcontentnews(cid)
{
    document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
    && typeof(parent.document.title) == 'string') {
    
}
function erase(co){ 
document.getElementById(co).value="";
}

function submitform(form_name)
{
  document.forms[form_name].submit();
}
