//<!--
function $(id){
	return document.getElementById(id);
}

function show(id){
	$(id).style.display = '';
}

function hide(id){
	$(id).style.display = 'none';
}

function showPhotoEdit(id){
	show('photo_'+id);
	hide('photo_'+id+'_title');
	show('hide_photo_'+id);
	hide('show_photo_'+id);
	$('title_'+id).value = $('photo_' + id +'_title').innerHTML; 
}

function hidePhotoEdit(id){
	hide('photo_'+id);
	show('photo_'+id+'_title');
	hide('hide_photo_'+id);
	show('show_photo_'+id);
}

function limitTextarea(element,length,label){
	if(element.value.length > length){
		element.value = element.value.substring(0,length);
		$(label).innerHTML = element.value.length;
	}
	else{
		$(label).innerHTML = element.value.length;
	}
}
//-->