
/*******************************************************************
 * ECO_GAL FUNCTIONS
 *******************************************************************/
function initCategory(val){ 
	setValue('gal_category',val);
	doSubmit('gal_form');
}
function initAlbum(val){ 
	setValue('gal_album',val);
	doSubmit('gal_form');
}
function initSort(val){ 
	setValue('gal_sort',val);
	doSubmit('gal_form');
}

/*******************************************************************
 * USEFUL FUNCTIONS
 *******************************************************************/
function setValue(id,val){
	return getRef(id).value = val;
}
function getValue(id){
	return getRef(id).value;
}
function doSubmit(id){
		getRef(id).submit();
		return false;
}
function setVisibleRow(id,bool){
	if(bool)
		getRef(id).style.display = 'table-row';
	else
		getRef(id).style.display = 'none';
}
function setVisibleTable(id,bool){
	if(bool)
		getRef(id).style.display = 'table';
	else
		getRef(id).style.display = 'none';
}
function setVisible(id,bool){
	if(bool)
		getRef(id).style.display = 'inline';
	else
		getRef(id).style.display = 'none';
}

function getRef(id){
	return document.getElementById(id);
}
