

function checkchip(numer,idk){	
	advAJAX.setDefaultParameters(
	{
		onLoading : function(obj) { document.getElementById(obj.tag).innerHTML = '<div align="center" style="height:40px; padding-top:80px;"><img src="ajax/img/load.gif" width="220" height="19" border="0"></div>' ; },
   		onSuccess : function(obj) { document.getElementById(obj.tag).innerHTML = obj.responseText ; },
   		onError : function(obj) { document.getElementById(obj.tag).innerHTML = "err..."; }
	});
	advAJAX.get({ url : "ajax.php?mod=adopcja&action=chip&produkt=" + numer +"&idk="+ idk , tag: "chip_check" });
}



function show_medium(numer,idk){
    


	var url = 'ajax.php?mod=adopcja&action=foto&id=' + numer +'&idk='+ idk;
	new Ajax.Request(url, {
	  method: 'get',
	  onSuccess: function(transport) {
		   $('medimage').innerHTML = transport.responseText;
		}
	});






}

function checkmailf(which){
    
var pass=true


if (document.pytaj.adres_mail.value.length ==""){
document.pytaj.adres_mail.style.backgroundColor="yellow"
document.pytaj.adres_mail.focus();
return false
}else{
document.pytaj.adres_mail.style.backgroundColor="white"
}

if (document.pytaj.pytanie.value.length ==""){
document.pytaj.pytanie.style.backgroundColor="yellow"
document.pytaj.pytanie.focus();
return false
}else{
document.pytaj.pytanie.style.backgroundColor="white"
}


return true
}



function checkpolec(which){
    
var pass=true


if (document.polecenie.adres_mail.value.length ==""){
document.polecenie.adres_mail.style.backgroundColor="yellow"
document.polecenie.adres_mail.focus();
return false
}else{
document.polecenie.adres_mail.style.backgroundColor="white"
}


if (document.polecenie.na_adres.value.length ==""){
document.polecenie.na_adres.style.backgroundColor="yellow"
document.polecenie.na_adres.focus();
return false
}else{
document.polecenie.na_adres.style.backgroundColor="white"
}

if (document.polecenie.pytanie.value.length ==""){
document.polecenie.pytanie.style.backgroundColor="yellow"
document.polecenie.pytanie.focus();
return false
}else{
document.polecenie.pytanie.style.backgroundColor="white"
}


return true
}
