//<script>
function New_Window()
{
	var sPageAddress, iID;
	iID = "/business/";  
	sPageAddress = window.location.href;
	window.open('/business/contactus/sendfriend.asp?sAddress=' + sPageAddress + '&iSiteID=' + iID,'wincalc','toolbar=no,titlebar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,fullscreen=no,scrollbars=yes,top=150,left=190,width=482,height=266');
	return false;
}
function SetFocus()
{
	if (document.Send_Friend.Friend_name)
	document.Send_Friend.Friend_name.focus();
}
function CheckSendFriend()
{
	var resStr, re1, re2, re3, re4;
	re1 = /script/gi;
	re2 = /<\/>/gi;
	re3 = /<>/gi;
	re4 = /'/gi;

	for (i=0;i<document.Send_Friend.elements.length;i++)
	{
		var UserString = document.Send_Friend.elements[i].value;
		resStr = UserString.replace(re1,"");
		UserString = resStr;
		resStr = UserString.replace(re2,"");
		UserString = resStr;
		resStr = UserString.replace(re3,"");
		UserString = resStr;
		resStr = UserString.replace(re4,"");
		UserString = resStr; // alert(UserString);
		document.Send_Friend.elements[i].value = String(UserString);
	}
		
	var emailStatus = CheckEmail(String(document.Send_Friend.Friend_email.value),String(document.Send_Friend.Your_email.value));
	if (emailStatus)
	{document.Send_Friend.submit();}	
	else {return;}
	
	document.Send_Friend.submit();
}

function CheckEmail(strF,strY)
{
	var test1 = strY.lastIndexOf("@");
	var test2 = strY.lastIndexOf(".");
		
	if ((test1 == -1) || (test2 == -1))
	{
		alert("Please enter your e-mail address.");
		document.Send_Friend.Your_email.focus();
		return false;
	}
		
	test1 = strF.lastIndexOf("@");
	test2 = strF.lastIndexOf(".");

	if ((test1 == -1) || (test2 == -1))
	{
		alert("Please enter your friend's valid e-mail address.");
		document.Send_Friend.Friend_email.focus();
		return false;
	}
	return true;
}
