//Check email validation
function ValidEmail(elementName)
{
	var eValid = new RegExp();
	eValid.compile("^[A-Za-z0-9-._]+@[A-Za-z0-9-._]+.[A-Za-z.]+.[A-Za-z.]+$"); // email validation Regex
	
	if(!eValid.test(elementName)) {
		return false;
	}  else {
		return true;
	}
}

//ajax function.....contact another member
function ajax_contactMember()
{
	document.getElementById('displayError').innerHTML = "";	
	var requestto = document.getElementById('requestto').value;
	var meetdate = document.getElementById('meetdate').value;
	var meettime = document.getElementById('meettime').value;
	var message = document.getElementById('message').value;	
	
	if (meetdate == "" || meettime == "" || message == "") {
		document.getElementById('displayError').innerHTML = "All fields are compulsory!";
	} else {	
		xajax_contactMember(requestto,meetdate,meettime,message);
	}
}

//ajax function.....load large photo
function ajax_loadPhoto(userId,photoName)
{
	//document.getElementById('largePhoto').src='photos/'+photoName;
	xajax_loadPhoto(userId,photoName);
}

//ajax function.....load next 5 photo thumbnails
function ajax_displayNext5Photos(lastPhotoId)
{
	xajax_displayNext5Photos(lastPhotoId);
}



