function CallLookup(Lookup,PARAM,SearchDisplay)
{
	var SendParam = "Lookup=" + Lookup + "&SearchDisplay=" + SearchDisplay;
	if (PARAM != "")
	{
	SendParam = "Lookup=" + Lookup + "&Param=" + PARAM + "&SearchDisplay=" + SearchDisplay ;

	}

	OpenModalWindow("Tab.aspx", SendParam ,'215','555')
}

function CallVendor()
{
	Lookup = "Vendor"
	PARAM = ""
	SearchDisplay = "Vendor~~Employee~~"
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function CallQuickCode()
{
	Lookup = "QuickCode";
	PARAM = ""
	SearchDisplay = "Employee~~LocationCode~~QuickCode~~Vendor~~ActivityCode~~"
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function CallActivity(LocationCode)
{
	Lookup = "ActivityCode";
	PARAM = LocationCode
	SearchDisplay = "Employee~~LocationCode~~QuickCode~~Vendor~~ActivityCode~~"
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function CallLineObject()
{
	Lookup = "LineObject";
	PARAM = ""
	SearchDisplay = "Employee~~LocationCode~~QuickCode~~Vendor~~ActivityCode~~"
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function CallLocationCode()
{
	Lookup = "LocationCode";
	PARAM = ""
	SearchDisplay = "Employee~~LocationCode~~QuickCode~~Vendor~~ActivityCode~~"
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function CallEmployee()
{
	Lookup = "Employee";
	PARAM = ""
	SearchDisplay = "Employee~~Vendor~~"
	document.getElementById(txtlastnameid).readOnly = false;
	document.getElementById(txtfirstnameid).readOnly = false;
	CallLookup(Lookup,PARAM,SearchDisplay)
}

function OpenModalWindow(ModalWindow, sParams, mH, mW)
{	
	//Adjust the size of the modal window here		
	var sResult = 0; var h = mH; var w = mW;
	var winl = (screen.width  - w) / 2;
	var wint = (screen.height - h) / 2;

	var vURL = ModalWindow +'?' + sParams;
	var settings = 'height=' + h + ',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no,';
	settings +='resizable=no,';
	settings +='status=no';		
	sResult = window.open(vURL, "", settings);
}
