function applyloanform()
{
	var frm = document.getElementById("iframe1");
	frm.src='step1.asp';
}
function applyloanform2()
{
	var frm = document.getElementById("iframe1");
	frm.height=470;
	frm.src='step1.asp';
}
function allTestimonial()
{
	alert("1");
	var frm = document.getElementById("iframe1");
	//alert("2");
	frm.src='allTestimonials.asp';
}
function commingsoon()
{
	var frm = document.getElementById("iframe1");
	frm.src='commingsoon.html';
}

function OpenWindow(URL)
{
	window.parent.location=URL;
}

function OpenWindowWithAction(URL)
{
	window.frmLogin.action=URL;
	document.frmLogin.method='Post';	
	document.frmLogin.submit();
	window.parent.location="membersarea.asp";
}
function noActionRedirect(URL)
{
	document.form1.stop();
	window.parent.location=URL;
}

function isLoggedIn(URL,control)
{
	
	var loggedin=document.form1.hid.value;
	//alert(loggedin);
	//alert(control);
	if(control=='link1')
	{
		if(loggedin!='0')
		{
			//link1.target="_blank";
			document.getElementById(control).target="_blank";
			document.getElementById(control).href=URL;
			//link1.href=URL;
		}
		else
		{
			if(confirm("Please login to your account.\n\nIf you are not registered, please register for free and gain many benefits from our resourceful website.\n\nIf you want to login or register, click OK else click Cancel."))
			{
				link1.target="_self";
				window.parent.location="myaccount.asp";
			}
			else
			{
				link1.target="_self";
			}
		}
	}
	else if(control=='link2')
	{
		if(loggedin!='0')
		{
			//link2.target="_blank";
			//link2.href=URL;
			document.getElementById(control).target="_blank";
			document.getElementById(control).href=URL;
		}
		else
		{
			if(confirm("Please login to your account.\n\nIf you are not registered, please register for free and gain manybenefits from our resourceful website.\n\nIf you want to login or register, click OK else click Cancel."))
			{
				link2.target="_self";
				window.parent.location="myaccount.asp";
			}
			else
			{
				link2.target="_self";
			}
		}
	}
	else if(control=='link3')
	{
		if(loggedin!='0')
		{
			//link3.target="_blank";
			//link3.href=URL;
			document.getElementById(control).target="_blank";
			document.getElementById(control).href=URL;
		}
		else
		{
			if(confirm("Please login to your account.\n\nIf you are not registered, please register for free and gain manybenefits from our resourceful website.\n\nIf you want to login or register, click OK else click Cancel."))
			{
				link3.target="_self";
				window.parent.location="myaccount.asp";
			}
			else
			{
				link3.target="_self";
			}
		}
	}
	else if(control=='link4a')
	{
		if(loggedin!='0')
		{
			window.parent.location="searchproperty.asp";
		}
		else
		{
			if(confirm("Please login before proceeding to Orange County MLS page.\n\nIf you are not registered, please register for free and gain manybenefits from our resourceful website.\n\nIf you want to login or register, click OK else click Cancel."))
			{
				link4.target="_self";
				window.parent.location="myaccount.asp";
			}
			else
			{
				link4.target="_self";
			}
		}
	}
	else if(control=='link5a')
	{
		if(loggedin!='0')
		{
			window.parent.location="searchproperty.asp";
		}
		else
		{
			if(confirm("Please login before proceeding to Orange County MLS page.\n\nIf you are not registered, please register for free and gain manybenefits from our resourceful website.\n\nIf you want to login or register, click OK else click Cancel."))
			{
				link5.target="_self";
				window.parent.location="myaccount.asp";
			}
			else
			{
				link5.target="_self";
			}
		}
	}
}

function visibleON(tr)
{
	var i,row,count;
	count=parseInt(document.getElementById("rows").value);
	row="tr"+tr;
	if(document.getElementById("tr"+tr).style.display=='none')
	{
		document.getElementById("tr"+tr).style.display='';
		for(i=1;i<count;i++)
		{
			//alert(row+"=="+"tr"+i);
			if(row!="tr"+i)
				document.getElementById("tr"+i).style.display='none';
		}
	}
	else
		document.getElementById("tr"+tr).style.display='none';	
}
