function roll_over(img_name, img_src)
{
//element = document.getElementById(img_name);
//element.src='images/'+img_src;
   document[img_name].src = 'images/'+img_src;
}
function otworz(adres) {
noweOkno = window.open(adres, 'okienko', 'menubar=no, toolbar=no, location=no, scrollbars=no, resizable=no, status=no, width=500, height=500')
}


function roll_over_id(img_id, img_src){
	$(img_id).src=img_src;
	var myFx = new Fx.Style(img_id, 'opacity').start(0.1,1);
}


function getElement(id){
    if(document.getElementById){
        getElement = function(id){ return document.getElementById(id); }
    }else if(document.all){
        getElement = function(id){ return document.all[id]; };
    }else if(document.layers){
        getElement = function(id){ return document.layers[id]; };
    }else{
        getElement = function() { return null; }
    }

    // When we get here, the getElement function has been replaced.
    // So we return the result of the new function.
    return getElement(id);
}


function IsNumeric(sText){
   var ValidChars = "-0123456789.";
   var IsNumber=true;
   var Char;

   for (i = 0; i < sText.length && IsNumber == true; i++) 
   { 
	Char = sText.charAt(i); 
	if (ValidChars.indexOf(Char) == -1) 
    {
      IsNumber = false;
    }
   }
   return IsNumber;
}

function change(id, num){
 $(id).value=Math.max(parseInt($(id).value)+parseInt(num),0);
}

function submitform(id){
 $(id).submit();
}

function sendNote(note){
	$('formNote').value=note;
	$('sendNote').submit();
}

function changeDisp(className){
 $$('.'+className).each(function(e){
 	if(e.style.display=="none"){
 		e.setStyle('display','block');
 	}else{
 		e.setStyle('display','none');
 	}
 });
}


