function thanks_post(pid){

var span = document.getElementById('thanks'+pid);
var loading = "<img src='/style_images/ajax-loader.gif' alt='loading...'/>"; 
//    window.alert('pid: '+pid);

	span.innerHTML=loading;

	JsHttpRequest.query(
		"/index.php?act=Thanks",
		{
		  "pid": pid
		},
			function (result, errors) {
			if ( errors) alert( errors); /* add */

			span.innerHTML=result["text"];
		},
		true
	)
}


function thanks_show(pid){

var span = document.getElementById('thanksshow'+pid);
//var loading = "<img src='/style_images/ajax-loader.gif' alt='loading...'/>"; 
//    window.alert('pid: '+pid);

//	span.innerHTML=loading;

	JsHttpRequest.query(
		"/index.php?act=Thanksshow",
		{
		  "pid": pid
		},
			function (result, errors) {
			if ( errors) alert( errors); /* add */

			span.innerHTML=result["text"];
		},
		true
	)
}


function thanks_show_all(uid)
{
      var link = '/index.php?act=Thanksall&uid='+uid;
      window.open(link,'alert','height=430,width=430,status=no,toolbar=no,menubar=no,location=no,top=200,left=400'); 
    	return false;
}
