function addNewsletterEmail (strEmail, strServerName) {

	document.getElementById('letteremail').value='Proszę czekać...';

	advAJAX.post( {
    		url: "http://"+strServerName+"/ajax/newsletterAddEmail.php",
    		parameters : {
      "strEmail" : strEmail
    },
    onSuccess : function(obj) {
		var response = obj.responseText;
    	document.getElementById('letteremail').value=response;
    },
    onError : function(obj) { return true; }
});
}

function addComment (intNewsID, strImie, strMail, strComment, strServerName) {

	document.getElementById('status-komentarz').style.display="block";
	document.getElementById('status-komentarz').innerHTML='Status: komunikacja z serwerem';
	
	if (strMail == '') {
		var strNewComment = '<p><strong>Autor: </strong>'+strImie+'</p><p>'+strComment+'</p>';
	} else {
		var strNewComment = '<p><strong>Autor: </strong>'+strImie+'<a href="mailto:'+strMail+'" style="text-decoration: none;">&nbsp;<img src="images/img-23.gif" alt="E-mail"></a></p><p>'+strComment+'</p>';
	}

	advAJAX.post({
    url: "http://"+strServerName+"/ajax/addComment.php",
    parameters : {
      "intNewsID"  : intNewsID,
      "strImie"    : strImie,
      "strEmail"   : strMail,
      "strComment" : strComment
    },
    onSuccess : function(obj) {

		var response = obj.responseText;
    	document.getElementById('status-komentarz').innerHTML='Status: '+response;
    	document.getElementById('commentcontent').innerHTML=document.getElementById('commentcontent').innerHTML+strNewComment;
    	return false;
    },
    onError : function(obj) { return true; }
});
}

function pollVote (intAnswerID, strServerName) {

	document.getElementById('sonda-status').style.display="block";
	document.getElementById('sonda-status').innerHTML='Status: komunikacja z serwerem';

	advAJAX.post({
    url: "http://"+strServerName+"/ajax/pollVote.php",
    parameters : {
      "intAnswerID"  : intAnswerID
    },
    onSuccess : function(obj) {

		var response = obj.responseText;
    	document.getElementById('sonda-status').innerHTML='Status: '+response;
    	return false;
    },
    onError : function(obj) { return true; }
});
}