function onResult2(req, obj){
	if(req){
		window.location.href=('http://gerbenfoto.eu/usa/?msg=Thank you for your comment!');
	}
}

function onResult3(req, obj){
	if(req){
		window.location.href=('http://gerbenfoto.eu/usa/?msg=Thank you for the message!');
	}
}

function blogAddComment()
{
	var url = 'blogAddComment.php?';
	var query = '&comment_author=' + escape(document.getElementById('comment_author').value);	
	query += '&comment_content=' + escape(document.getElementById('comment_content').value);
	query += '&comment_relpost=' + encodeURIComponent(document.getElementById('comment_relpost').value);
	query += '&comment_ip=' + encodeURIComponent(document.getElementById('comment_ip').value);
	ajax(url, query, onResult2);
}

function sendContactForm()
{
	var url = 'postContact.php?';
	var query = '&name=' + escape(document.getElementById('name').value);	
	query += '&email=' + escape(document.getElementById('email').value);
	query += '&message=' + escape(document.getElementById('message').value);
	query += '&ip=' + encodeURIComponent(document.getElementById('ip').value);
	ajax(url, query, onResult3);
}