function GLinkedQuery()
{
//VARIABLES
//array of selected families
 this.location = null;
 this.subQueryLocation = null;
 this.hidden = false;
 this.familyNr = 0;
 this.familyNames = new Array();
 this.familyIDs = new Array();
 this.familySelNames = new Array();
 this.familySelIDs = new Array();
 this.fieldNames = new Array();

 this.fieldNr = 0;
 this.fieldIDs = new Array();
 this.fieldTypes = new Array();
 this.fillTypes = new Array();
 
//table stuff
 this.rowValNr = 1; 
 
//page refs
 this.getFieldsPageRef = null;

	//types used:
	 this.FTYPE_INT  = 1;
	 this.FTYPE_REAL = 2;
	 this.FTYPE_DATE = 3;
	 this.FTYPE_STR  = 4;
	 this.FTYPE_HOUR  = 31;

	 this.FFTYPE_INT  = '1';
	 this.FFTYPE_REAL = '2';
	 this.FFTYPE_DATE = '3';
	 this.FFTYPE_HOUR = '31';
	 this.FFTYPE_STR  = '4';

	//operators used
	 this.OP_UNDEFINED = '0';
	 this.OP_LESS = '1';
	 this.OP_LESSEQ = '2';
	 this.OP_EQ = '3';
	 this.OP_GREATER = '4';
	 this.OP_GREATEREQ = '5';
	 this.OP_LIKE = '6';
	 this.OP_UNLIKE = '7';
	 this.OP_BETWEEN = '8';
 
//METHODS
 this.finalize = function()
 {
 }
//--------------------------------------------------- 
 this.init = function()
 {
 this.location = null;
	this.subQueryLocation = null;
 this.hidden = false;
 this.familyNr = 0;
 delete this.familyNames;
 this.familyNames = new Array();
 delete this.familyIDs;
 this.familyIDs = new Array();
 delete this.familySelNames;
 this.familySelNames = new Array();
 delete this.familySelIDs;
 this.familySelIDs = new Array();
 delete this.fieldNames;
 this.fieldNames = new Array();
 
 this.fieldNr = 0;
 delete this.fieldIDs;
 this.fieldIDs = new Array();
 delete this.fieldTypes;
 this.fieldTypes = new Array();
 this.fillTypes = null;
 this.fillTypes = new Array();


 }
}


//====================================================
function GLinkedQueryResult()
{
//VARIABLES
 this.cols = new Array();
 this.colIds = new Array();
 this.types = new Array();
 this.rows = new Array();
 this.ids = new Array();
 this.docIds = new Array();
 this.hasLinkedDocs = new Array();
 this.hasAttach = new Array();
 this.hasOutProtocol = new Array();
 this.isTif = new Array();
 this.docFamily = new Array();
 this.nextDocFamily = new Array();
 this.prevDocFamily = new Array();
 this.prewRows = new Array();
 this.prewIds = new Array();
 this.nextRows = new Array();
 this.nextIds = new Array();
 this.nextDocIds = new Array();
 this.result = new Array();
 this.currentDocId = 0;
 this.currentPhisicalDocId = 0;
 this.currentDocFamId = 0;
 this.sCol = null;
 this.clickedTableRow = 0;
 this.lastReadedDocId = 0;
 this.rezSz = 0;
 this.poz = 30;
 this.maxPoz = 0;
 this.sz1 = 0;
 this.sz2 = 15;
 this.sz3 = 15;
 this.lastAction = 1;
 
 this.mOver = null;
 this.mOut = null;
 this.tableClick = null;
 
//METHODS
 this.finalize = function()
 {
  
 }
 
//--------------------------------------------------- 
 this.init = function()
 {
 delete this.cols;
 this.cols = new Array();
 delete this.colIds;
 this.colIds = new Array();
 delete this.types;
 this.types = new Array();
 delete this.rows;
 this.rows = new Array(); 
 delete this.prewRows;
 this.prewRows = new Array();
 delete this.nextRows;
 this.nextRows = new Array();
 delete this.nextIds;
 this.nextIds = new Array();
 delete this.result;
 this.result = new Array();
 this.sCol = null;
 this.rezSz = 0;
 this.poz = 0;
 this.maxPoz = 0;
 this.sz1 = 0;
 this.sz2 = 15;
 this.sz3 = 15;
 this.lastAction = 1; 
 }
  
}
 
 
