function zadnik(theRow, otzad){
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }
	theRow.bgColor = otzad;
    return true;
}

function change_pic(resurs, the_id, the_img){
	document.images[the_id].src="/images/"+resurs+"_img/small/"+the_img;
}

function big_img_resurs(resurs, the_img){
	window.open ("/big_img_resurs.php?resurs="+resurs+"&the_img="+the_img, "imgWindow","toolbar=no,status=no,menubar=yes,scrollbars=no,resizable=yes,width=100,height=100,screenX=150,screenY=150,top=0,left=0");
}

function print_it(invoice_id){
	window.open("/finances/print_invoice.php?invoice_id="+invoice_id+"&origin=1", "printOriginInvoice", "toolbar=no, resizable=yes, menubar=yes, scrollbars=yes, left=0, top=0, width=700, height=680");
}

function show_loaded(invoice_id){
	window.open("/finances/invoice_loaded.php?invoice_id="+invoice_id, "loadedInvoice", "toolbar=no, resizable=yes, menubar=yes, scrollbars=yes, left=0, top=0, width=400, height=380");
}

function print_proform(invoice_id){
	window.open("/proform/print_invoice.php?invoice_id="+invoice_id+"&origin=1", "printProfInvoice", "toolbar=no, resizable=yes, menubar=yes, scrollbars=yes, left=0, top=0, width=700, height=680");
}

function show_loaded_proform(invoice_id){
	window.open("/proform/invoice_loaded.php?invoice_id="+invoice_id, "loadedInvoice", "toolbar=no, resizable=yes, menubar=yes, scrollbars=yes, left=0, top=0, width=400, height=380");
}