function OverColor(tdNum)
{
document.all[tdNum].style.background='#EAF5FF';
}

function OutColor(tdNum)
{
document.all[tdNum].style.background='#F8FAFF';
}

function DetermineFormAction()
{
	
	if (RightLoginForm.LoginSection[0].checked)
	{
		RightLoginForm.action='http://member.parspages.com/login/index.cfm';
	}
	else
	{
		RightLoginForm.action='http://ebox.parspages.com/login/index.cfm';		
	}
}

function OpenForgot()
{
document.all.TDForgotBack.height=138;
document.all.ForgotPassFrame.height=100;
document.all.ForgotPassSpan.style.visibility='visible';
window.location.href = "#exirsoft";
}

function CloseForgot()
{
document.all.TDForgotBack.height=1;
document.all.ForgotPassFrame.height=0;
document.all.ForgotPassSpan.style.visibility='hidden';
}

function openFeedback(url,name,width,height,scrol)
{
	var win=window.open(url,name,"width="+width+",height="+height+",scrollbars="+scrol);
	win.focus();
}

function trimString (str) 
{
  while (str.charAt(0) == ' ')
    str = str.substring(1);
  while (str.charAt(str.length - 1) == ' ')
    str = str.substring(0, str.length - 1);
  return str;
}

function CheckRightLogin()
{
	var Result = true;

	if (trimString(RightLoginForm.Username.value)=="" || trimString(RightLoginForm.Username.value)=="Username")
	{
		Result=false;
		alert(RightLoginForm.UsernameAlert.value);
		RightLoginForm.Username.focus();
		return Result;
	}	


	if (trimString(RightLoginForm.Password.value)=="" ||trimString(RightLoginForm.Password.value)=="Password")
	{
		Result=false;
		alert(RightLoginForm.PasswordAlert.value);
		RightLoginForm.Password.focus();
		return Result;
	}	
		DetermineFormAction()	
}
