function fnSetHomepage()
{
	oHomePage.setHomePage('http://www.hadashot.com');
	event.returnValue = false;
}

function fnSetFavorite()
{
	window.external.AddFavorite('http://www.hadashot.com', 'חדשות.com - לדעת הכל לפני כולם');
}

function fnValidateMember()
{
	var sMember_ID = frmAuth.txMember_ID.value;
	if (sMember_ID.length < 6 || (sMember_ID != 'Disconnect' && /[^0-9]/.test(sMember_ID)))
	{
		alert('המספר לא תקין');
		return false;
	}

	return true;
}

function fnValidateEmail()
{
	var sEmail = frmRegister.txEmail.value;
	if (sEmail.length < 5 || sEmail == 'your-email@here.com' || !/[-_\.\w]+@[-_\w]+\.[-_\.\w]+/i.test(sEmail))
	{
		alert('כתובת דוא"ל שסיפקת לא תקינה');
		return false;
	}

	return true;
}

function fnSendPage(sPageURL, sPageTitle)
{
	if (!sPageURL)
	{
		sPageURL = window.location.toString();
	}

	if (!sPageTitle)
	{
		sPageTitle = 'חדשות.com - לדעת הכל לפני כולם';
	}

	var wnPopup = window.open('/contact/mailurl.asp?Url=' + sPageURL + '&MailBody=' + sPageTitle, 'wnPopup', 'width=300,height=350,status=no,toolbar=no,menubar=no,scrollbars=no,top=0,left=0');
	wnPopup.focus();
}

function fnOnLoad()
{
	if (typeof(sAlert) == 'string' && sAlert.length > 0 && typeof(fnAlert) == 'function')
	{
		fnAlert();
	}
}

