//**********************************************************
//**********************************************************
// Function:	Logoff
//	Purpose:		redirect it to logoff.asp
//	Authors: 	Felix Horng 
//	Date:			12/18/2000
//---------------------------------------------------------
// Modification:
//	Adding "editprofile" function to reoute users to /mvd/WebUserLogin/EditProfile.asp page.
//	Date: 08/19/2002
//	By:	Felix Horng
//**********************************************************
//**********************************************************

	// == "varApplicationID" is defined in Global.asa as strAppID
	// == First we construct the page that will be used to POST information
	//		to an apppropriate page.

document.write('<form name=editprofile>')
document.write('<input type=hidden name=lngCompanyID value=>')
document.write('<input type=hidden name=txtCompanyName value=>')
document.write('<input type=hidden name=lngWebAppID value=>')
document.write('<input type=hidden name=txtWebUserID value=>')
document.write('<input type=hidden name=login value=>')
document.write('</form>')

function logoff(){
	top.location.href="./includes/logoff.asp";
}

//=======================================
//== Enable user to edit their profile
//=======================================

function editprofile(varApplicationID){
	//ReSetTime2();
	document.editprofile.lngCompanyID.value = document.hidden.lngCompanyID.value;
	document.editprofile.txtCompanyName.value = document.hidden.txtCompanyName.value;
	document.editprofile.lngWebAppID.value = 0;
	document.editprofile.txtWebUserID.value = document.hidden.txtWebUserID.value;
	document.editprofile.login.value = "VEHICLEINSPECTIONRECONLOGINSUCCESS";

	// == we post it to the appropriate page.
	
	var strActionForm = eval("window.document.editprofile");
	strActionForm.action = "../webuserlogin/EditProfile.asp";
	
	strActionForm.method= "POST";
	//alert(document.editprofile.lngCompanyID.value + ' - ' + document.editprofile.txtCompanyName.value + ' - ' + document.editprofile.lngWebAppID.value + ' - ' + document.editprofile.login.value + ' - ' + document.editprofile.txtWebUserID.value);
	strActionForm.submit();
}
