function setmainClick(str_URL)
{
	if (parent.contents!=null)
		parent.contents.location.href=str_URL;
	else if (parent.mainFrame!=null)
		parent.mainFrame.location.href=str_URL;
}
function setsiteClick(str_URL,str_param)
{
	if (str_param == 'NEW_WINDOW')
	{
		var hWnd = window.open(str_URL,"","width=600,height=580,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes");
	}
	else
	{
		parent.location.href = str_URL;
	}
}
function openSlideShow(str_URL)
{
	var hWnd = window.open(str_URL,"","width=680,height=600,resizable=yes,scrollbars=no");
}
function LogIt(f)
{
	f.submit();
	return;
}
function enterLivePerson(accountName,re,name)
{
	window.name = "lp_parent";
	var url = "http://www.liveperson.com/enter.asp?user=" + accountName + "&RE=" + re + "&name=" + name;
	var hWnd = window.open(url,"live_person","width=300,height=350,resizable=yes,scrollbars=yes");
	if (hWnd != null)
	{
		if (hWnd.opener == null)
		{
			hWnd.opener = self;
			window.name = "home";
			hWnd.location.href=url;
		}
	}
}
function URL_get_path_directory()
{
	var loc=window.location.href.toString();
	var i=loc.lastIndexOf("/");
	var r=loc.substring(0,i+1);
	return r;
}
function GET_LOAN_ID()
{
	var t="";
	if (parent.LOAN_ID!=null)
		return parent.LOAN_ID;
	else
		return "[ERROR]";
}
function NEW_LOAN_ID()
{
	var now=new Date();
	var y=0;
	var m=0;
	var d=0;
	var hh=0;
	var mm=0;
	var ss=0;
	var ms=0;
	var t="";

	y=now.getYear();
	//if (y < 1000)
	//	y+=1900; //handles netscape and ie
	m=(now.getMonth()+1);
	d=now.getDate();
	hh=now.getHours();
	mm=now.getMinutes();
	ss=now.getSeconds();
	ms=now.getMilliseconds();
	t=m+''+hh+'-'+ss+''+ms+'-'+mm;
	return t;
}

