
//user's comment popup
function popUpcomment(URL){
		my_window = null;
		my_window = window.open(URL,"","location=no,menubar=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,width=500,height=300,left=200,top=20");
}
	
//send to friend ajax;
function popUpsendto(URL,parra){
		my_window = null;
		var encoded = encodeURIComponent(parra);
		
		my_window = window.open(URL+encoded,"","location=no,menubar=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,width=500,height=300,left=200,top=20");
}
/*function showsend(){
document.getElementById('sendto').style.display = 'block'; 
}

function hidesend(){
document.getElementById('sendto').style.display = 'none'; 
}

function sendtofri()
{

	xmlHttp=GetXmlHttpObject();
 if (xmlHttp==null)
  {

  alert ("Browser does not support HTTP Request")
  return
  }
	alert("0")
	var page=document.getElementById("page").value;
	var to_email=document.getElementById("to_email").value;
	var user_email=document.getElementById("user_email").value;

	var url="sendtofri.php";
	var	parra="user_email="+user_email+"&to_email="+to_email+"&page="+page;
	alert(parra);
	xmlHttp.onreadystatechange=aftersend

	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", parra.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(parra);
	alert("11");
}

function aftersend()
{
		var xmlDoc;
		var firstone;
		var counter;
		counter=0;
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
	alert("2")
			var x;
		xmlDoc=xmlHttp.responseXML;
		alert("22")
		
		firstone=xmlDoc.getElementsByTagName("message")[0].firstChild.data;
		if (xmlDoc.getElementsByTagName("message")[0].firstChild.data=="yes")
		{
			alert("a")
			document.getElementById("sendto").innerHTML="You have sent this page to your friend";
		}
		else if(xmlDoc.getElementsByTagName("message")[0].firstChild.data=="no")
		{
			alert("b")
			document.getElementById("sendto").innerHTML="Error, Please try again!";

		}
		else if(xmlDoc.getElementsByTagName("message")[0].firstChild.data=="e1")
		{
			alert("c")
			document.getElementById("emailerror1").innerHTML="The email address is invalid";		
		}
		else if(xmlDoc.getElementsByTagName("message")[0].firstChild.data=="e2")
		{
			alert("d")
			document.getElementById("emailerror2").innerHTML="The email address is invalid";		
		}
		else if(xmlDoc.getElementsByTagName("message")[0].firstChild.data=="e3")
		{
			alert("e")
			document.getElementById("emailerror1").innerHTML="The email address is invalid";
			document.getElementById("emailerror2").innerHTML="The email address is invalid";		
		}

	}

}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
*/












// this example shows the use of onShow and onHide callbacks. Make
// sure to read the documentation for futher instructions, and
// an explanation of the "hash" argument.

