
function obj_site_node(_id,_title,_order,_parent,_create_date,_create_user,_update_date,_update_user,_deleted,_description,_source,_source_id,_source_type,_original,_contact_id,_contact,_site_root){
	this.id=_id;
	this.title=_title;
	this.description=_description;
	this.order=_order;
	this.parent=_parent;
	this.parent_obj;
	this.create_date=_create_date;
	this.create_user=_create_user;
	this.update_date=_update_date;
	this.update_user=_update_user;
	this.children = new Array();
	this.deleted = _deleted;
	this.menuOn = false;
	this.source = _source;
	this.source_id = _source_id;
	this.source_type = _source_type;
	this.original = _original;
	this.contact_id = _contact_id;
	this.contact = _contact;
	this.site_root = _site_root;
	this.no_children;
	/*if(_title=='PARARI'){
		db('_id:'+_id);
		db('_title:'+_title);
		db('_order:'+_order);
		db('_parent:'+_parent);
		db('_create_date:'+_create_date);
		db('_create_user:'+_create_user);
		db('_update_date:'+_update_date);
		db('_update_user:'+_update_user);
		db('_deleted:'+_deleted);
		db('_description:'+_description);
		db('_source:'+_source);
		db('_source_id:'+_source_id);
		db('_source_type:'+_source_type);
		db('_original:'+_original);
		db('_contact_id:'+_contact_id);
		db('_contact:'+_contact);
		db('_site_root:'+_site_root);
	}*/
}

function obj_site_content(_id,_title,_description,_content_type,_source,_original,_create_date,_create_by,_update_date,_update_by,_owner){
	this.id=_id;
	this.title=_title;
	this.description=_description;
	this.content_type=_content_type;
	this.source=_source;
	this.original=_original;
	this.create_date=_create_date;
	this.create_by=_create_by;
	this.update_date=_update_date;
	this.update_by=_update_by;
	this.owner=_owner;	
}

function obj_site_contact(_id,_first_name,_last_name,_position,_department,_business_group,_company,_tel,_mob,_fax,_email){
	this.id=_id;
	this.first_name=_first_name;
	this.last_name=_last_name;
	this.position=_position;
	this.department=_department;
	this.business_group=_business_group;
	this.company=_company;
	this.tel=_tel;
	this.mob=_mob;
	this.fax=_fax;
	this.email=_email;
	this.postal_location;
	this.office_location;
}

function obj_site_address(_id,_type,_address1,_address2,_city,_state,_postcode){
	this.id=_id; //THIS WILL BE NULL AT THE BEGINNING AS THE OFFICE AND POSTAL ARE HELD IN THE SAME TABLE BJF 27/09/2006
	this.type=_type;
	this.address1=_address1;
	this.address2=_address2;
	this.city=_city;
	this.state=_state;
	this.postcode=_postcode;
}

var g_news_items = new Array();

function obj_news_collection(_page,_pages,_records){
	this.page = _page;
	this.pages = _pages;
	this.records = _records;
}

function obj_collection(_page,_pages,_records,_max_num){
	this.page = _page;
	this.pages = _pages;
	this.records = _records;
	this.max_num = _max_num;
	this.record_num = 1;
}

function obj_news_item(_id,_headline,_summary,_file,_status,_author,_rel_date,_files,_photos){
	this.id=_id;
	this.headline=_headline;
	this.summary=_summary
	this.file=_file;
	this.status=_status;
	this.author=_author;
	this.rel_date=_rel_date;
	this.files = _files;
	this.photos = _photos;
}

function obj_news_file(_id,_news_id,_file_id,_type){
	this.id=_id;
	this.news_id=_news_id;
	this.file_id=_file_id;
	this.type=_type;
}

function obj_file(_id,_title,_desc,_file_url,_file_type,_rel_id){
	this.id=_id;
	this.title=_title;
	this.description=_desc;
	this.file_url=_file_url;
	this.file_type=_file_type;
	this.related_id=_rel_id;
}

function obj_photo(_id,_type,_caption,_description,_thumbnail,_lowres,_lowres_details,_hires,_hires_details,_copyright,_photographer,_related_id,_year_taken){
	this.id=_id;
	this.type=_type;
	this.caption=_caption;
	this.description=_description;
	this.thumbnail=_thumbnail;
	this.lowres=_lowres;
	this.lowres_details=_lowres_details;
	this.hires=_hires;
	this.hires_details=_hires_details;
	this.copyright=_copyright;
	this.photographer=_photographer;		
	this.related_id=_related_id;
	this.year_taken=_year_taken;
}


function obj_form_field(_name,_title,_type,_required,_value,_func,_extra){
	this.name=_name;
	this.title=_title;
	this.type=_type;
	this.value=_value;
	this.required=_required;
	this.func = _func;
	this.extra = _extra;
	this.objects=new Array(); //used for adding options for selects
}

function obj_form_field_object(_title,_value){
	this.value = _value;
	this.title = _title;
}

function obj_table_header(_display,_property){
	this.display = _display;
	this.property = _property;
}

function obj_search_result(_filename,_path,_size,_modified,_summary,_title,_author,_keywords,_rank,_hitcount){
	this.filename=_filename;
	this.path=_path;
	this.size=_size;
	this.modified=_modified;
	this.summary=_summary;
	this.title=_title;
	this.author=_author;
	this.keywords=_keywords;
	this.rank=_rank;
	this.hitcount=_hitcount;
	this.used_in = [];
}

function obj_search_node(_id,_title){
	this.id = _id;
	this.title = _title;
	this.type;
}

function obj_search_result(_filename,_path,_size,_modified,_summary,_title,_author,_keywords,_rank,_hitcount){
	this.filename=_filename;
	this.path=_path;
	this.size=_size;
	this.modified=_modified;
	this.summary=_summary;
	this.title=_title;
	this.author=_author;
	this.keywords=_keywords;
	this.rank=_rank;
	this.hitcount=_hitcount;
	
	this.node_id;
	this.node_title;
	this.news_title;
	this.news_description;
	this.news_date;
	this.source;
	
	this.used_in = [];
}

function obj_subscription_user(){
	this.email;
	this.areas;
	this.dateJoined;
}

function obj_category(){
	this.id;
	this.title;
	this.description;
	this.parent;
	this.no_children;
	this.children=[];
	this.parentObj;
}

function obj_user_right(_id,_site_id,_site_title,_right,_value){
	this.id=_id;
	this.site_id=_site_id;
	this.site_title=_site_title;
	this.right=_right;
	this.value=_value;
}

function obj_site(){
	this.id;
	this.rootNode;
	this.rootDir;
	this.title;
	this.description;
	this.imageDir;
	this.cssDir;
	this.contentDir;
	this.rights=[];
	this.structure;
}


