/******Utility functions**************/

function all(id){
/*	supplement for DHTML document.all collection
*/
	return document.getElementById(id);
}

function clearz(id,name){
	all(id).value='0';
	all(name).value='';
}

function clearLink(id,name){
	all(id).value='0';
	all(name).href='';
	all(name).innerHTML='';
}

var modalData=''; //commonly used as a selector in afterModal function in order to specify different treatments of the data returned by a modal dialog

function makeModal()
{
  if(window.popDialog && !window.popDialog.closed)
    window.popDialog.focus();
}

/******End of Utility functions********/


/******Modal window call functions********/

function selectFI(tag,iniQS){
/*	parameters:
	tag: any custom data to be available in afterModal function;
	iniQS: initialization query string passed to the modal dialog
	
	Needs implementation of function afterModal(retFields) in the calling page
*/
	
	modalData=tag;
	window.popDialog=window.open('FIListModal.asp?'+iniQS,'_blank','width=800,height=700,scrollbars=1,resizable=1');
}

function selectEB(tag,iniQS){
/*	parameters:
	tag: any custom data to be available in afterModal function;
	iniQS: initialization query string passed to the modal dialog
	
	Needs implementation of function afterModal(retFields) in the calling page
*/
	
	modalData=tag;
	window.popDialog=window.open('EBListModal.asp?'+iniQS,'_blank','width=400,height=700,scrollbars=1,resizable=1');
}

function selectLC(tag,iniQS){
/*	parameters:
	tag: any custom data to be available in afterModal function;
	iniQS: initialization query string passed to the modal dialog
	
	Needs implementation of function afterModal(retFields) in the calling page
*/
	
	modalData=tag;
	window.popDialog=window.open('LCListModal.asp?'+iniQS,'_blank','width=400,height=500,scrollbars=1,resizable=1');
}

function selectFIT(tag,iniQS){
/*	parameters:
	tag: any custom data to be available in afterModal function;
	iniQS: initialization query string passed to the modal dialog
	
	Needs implementation of function afterModal(retFields) in the calling page
*/
	
	modalData=tag;
	window.popDialog=window.open('FITListModal.asp?'+iniQS,'_blank','width=350,height=600,scrollbars=1,resizable=1');
}

function selectFIRelated(tag,iniQS){
/*	parameters:
	tag: any custom data to be available in afterModal function;
	iniQS: initialization query string passed to the modal dialog
	
	Needs implementation of function afterModal(retFields) in the calling page
*/
	
	modalData=tag;
	window.popDialog=window.open('FIRelatedListModal.asp?'+iniQS,'_blank','width=350,height=600,scrollbars=1,resizable=1');
}
/******End of Modal window call functions***/

