
function showfriend() {
	tsGetElementById('FriendForm').style.display='block';
	tsGetElementById('ts_commname').focus();
}

function hidefriend() {
	tsGetElementById('FriendForm').style.display='none';
}

function submitTellAFriendForm(obj,url) {
	if (document.getElementById('ts_commname').value=='') {
		alert('Please enter your name');
		document.getElementById('ts_commname').focus();
		return false;		
	}
	if (document.getElementById('ts_commfrd2_xtr').value=='') {
		alert("Please enter your friend's email");
		document.getElementById('ts_commfrd2_xtr').focus();
		return false;		
	} 
	else if (!emailCheck(document.getElementById("ts_commfrd2_xtr"))) {
		alert("Email address not valid");
		document.getElementById("ts_commfrd2_xtr").focus();
		return false;
	}
	var poststr = "ts_commname=" + encodeURI( document.getElementById("ts_commname").value ) +
	"&ts_commfrd2_xtr=" + escape( document.getElementById("ts_commfrd2_xtr").value ) +
	"&ts_commfrd4_xtr=" + escape( document.getElementById("ts_commfrd4_xtr").value );
	
  	makePOSTRequest(url, poststr,document.getElementById("t").value);
	return true;	
}