function WinOpen(sUrl) {
	var sArguments="null";
	var sFeatures="resizable=yes,width=400,height=600,screenX=0,screenY=0,left=0,top=0,toolbar=no,status=no,menubar=no,scrollbars=yes";
	handle = window.open(sUrl,sArguments,sFeatures);handle.focus();
}

function oneClick(obj) {
	document.body.style.cursor='wait';
	for(i=0;i<obj.length;i++)
	if(obj.elements[i].type == "submit")
	obj.elements[i].disabled = true;
	return true;
}
function show_hide(what) {
	whatImage = event.srcElement;
	if (what.style.display == "none")
	{
		what.style.display = "";
		whatImage.src = "img/expand.gif";
	} else {
		what.style.display = "none";
		whatImage.src = "img/shrink.gif";
	}
}
function confirmation(sMsg) {
	return confirm(sMsg);
}

function getshowme() {
	document.showmeform.submit();
}
function showBroker(what) {
	whatElem = event.srcElement;
	if (what.style.display == "none")
	{
		what.style.display = "";
		document.adminform.userlevel.value = 5;
	} else {
		what.style.display = "none";
		document.adminform.userlevel.value = 4;
	}
}
function postbagent() {
	document.bagentform.aid.value=document.bagentform.selbagent.options[document.bagentform.selbagent.selectedIndex].value;
	document.bagentform.submit();
}
function postsagent() {
	document.sagentform.aid.value=document.sagentform.selsagent.options[document.sagentform.selsagent.selectedIndex].value;
	document.sagentform.submit();
}
function postseller() {
	document.sellerform.seid.value=document.sellerform.selseller.options[document.sellerform.selseller.selectedIndex].value;
	document.sellerform.submit();
}
function postlisting() {
	document.listingform.mid.value=document.listingform.sellisting.options[document.listingform.sellisting.selectedIndex].value;
	document.listingform.submit();
}
function postescrow() {
	document.escrowform.eid.value=document.escrowform.selescrow.options[document.escrowform.selescrow.selectedIndex].value;
	document.escrowform.submit();
}
function posttagent() {
	document.tagentform.aid.value=document.tagentform.seltagent.options[document.tagentform.seltagent.selectedIndex].value;
	document.tagentform.submit();
}
function postbroker() {
	document.brokerform.aid.value=document.brokerform.selbroker.options[document.brokerform.selbroker.selectedIndex].value;
	document.brokerform.submit();
}
function postmanager() {
	document.managerform.aid.value=document.managerform.selmanager.options[document.managerform.selmanager.selectedIndex].value;
	document.managerform.submit();
}
function postborrower() {
	document.clientform.cid.value=document.clientform.selborrower.options[document.clientform.selborrower.selectedIndex].value;
	document.clientform.submit();
}
function postother() {
	document.otherform.oid.value=document.otherform.selother.options[document.otherform.selother.selectedIndex].value;
	document.otherform.submit();
}
function posttype() {
	document.typeform.ltid.value=document.typeform.seltype.options[document.typeform.seltype.selectedIndex].value;
	document.typeform.submit();
}
function postcomment() {
	document.commentform.ctid.value=document.commentform.selcomment.options[document.commentform.selcomment.selectedIndex].value;
	document.commentform.submit();
}
function postltype() {
	document.loantypeform.l_type.value=document.loantypeform.seltype.options[document.loantypeform.seltype.selectedIndex].value;
	document.loantypeform.submit();
}
function postforum() {
	document.f_form.fid.value=document.f_form.selforum.options[document.f_form.selforum.selectedIndex].value;
	document.f_form.submit();
}
function postclient() {
	document.clientform.lid.value=document.clientform.selclient.options[document.clientform.selclient.selectedIndex].value;
	document.clientform.submit();
}
function poststatus() {
	document.statusform.lstatus.value=document.statusform.selstatus.options[document.statusform.selstatus.selectedIndex].value;
	document.statusform.submit();
}
function postpurpose() {
	document.purposeform.l_purpose.value=document.purposeform.sel_purpose.options[document.purposeform.sel_purpose.selectedIndex].value;
	document.purposeform.submit();
}
function postmsg() {
	document.msgform.nid.value=document.msgform.selmsg.options[document.msgform.selmsg.selectedIndex].value;
	document.msgform.submit();
}
function posttask() {
	document.taskform.tid.value=document.taskform.seltask.options[document.taskform.seltask.selectedIndex].value;
	document.taskform.submit();
}
function postl_status() {
	document.l_statusform.l_status.value=document.l_statusform.sel_l_status.options[document.l_statusform.sel_l_status.selectedIndex].value;
	document.l_statusform.submit();
}
function postproc1() {
	document.proc1form.pid1.value=document.proc1form.selproc1.options[document.proc1form.selproc1.selectedIndex].value;
	document.proc1form.submit();
}
function postproc2() {
	document.proc2form.pid2.value=document.proc2form.selproc2.options[document.proc2form.selproc2.selectedIndex].value;
	document.proc2form.submit();
}
function setnotice() {
	document.noticeform.nid.value=document.noticeform.selnid.options[document.noticeform.selnid.selectedIndex].value;
	if (document.noticeform.nid.value == 0)
	{
	document.noticeform.submit.disabled = true;
	} else {
	document.noticeform.submit.disabled = false;
	}
	return true;
}
function clear_date() {
    document.getElementById('completeddate').value = "";
}

function print_ls(loan_id) {
    document.cookie = "GLUe_Rpt=" + loan_id;
    mywindow = window.open('loanstatus_rpt.php?','Pipeline','width=800,height=600');
}
