
function showID(id)
{
	obj=document.getElementById(id);
	if(obj.style.display)
	  obj.style.display='';
	else
	  obj.style.display='none';
}

function checkMail(email)
{
 var invalidChars=" /;:"
 var atPos,badChar
	if(email=="")
	  return false;
	for(i=0;i<invalidChars.length;i++)
	 {
	  badChar=invalidChars.charAt(i)

	  if(email.indexOf(badChar,0)>-1)
	    return false;
	 }
	atPos= email.indexOf("@",1)
	if(atPos==-1)
	  return false;
	if(email.indexOf("@",atPos+1)!=-1)
	  return false;
	periodPos=email.indexOf(".",atPos)
	if(periodPos==-1)
	  return false;
	if(periodPos+3>email.length)
	  return false;
	return true;
}

function checkUser()
{
	var email=document.pForm.user_email.value;
	if(checkMail(email))
		return true;
	else{
	 alert('Enter valid Email!');
	 return false;
	}
}

function openPhoto(URL,w,h){
 var x = (window.screen.width - w)/2;
 var y = (window.screen.height - h) /2.5; 
www=window.open('','','width='+w+',height='+h+',top='+y+',left='+x+',toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=no');
www.document.write('<html><head><title>Photo</title></head><body style="margin:0px;padding:0px"><img src="',URL,'"></body></html>');
www.focus;
}

