function editLabels(){loadUrl('/nena/modules/profile/ajax/gallery/getEditLabels.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum),'edit-album',null);}
function saveAlbumInfo(){loadUrl('/nena/modules/profile/ajax/gallery/updateAlbumInfo.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum)+'&title='+encodeURIComponent(document.getElementById('title').value)+'&description='+encodeURIComponent(document.getElementById('description').value),'album-info',null);}
function savePictureLabels(){var id=0;var pics=new Array();while(document.getElementById('pic_id_'+id)!=null){var picture=document.getElementById('pic_id_'+id).value;var title=document.getElementById('pic_tit_'+id).value;var description=document.getElementById('pic_desc_'+id).value;pics[id]=new Array(picture,title,description);id++;}
var data='';var arLen=pics.length;for(var i=0,len=arLen;i<len;++i){data+='&pic_id_'+i+'='+pics[i][0];data+='&pic_tit_'+i+'='+pics[i][1];data+='&pic_desc_'+i+'='+pics[i][2];}
loadUrl('/nena/modules/profile/ajax/gallery/savePictureLabels.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum)+data,'picture-labels-saved',null);}
function editPictures(){loadUrl('/nena/modules/profile/ajax/gallery/getEditPictures.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum),'edit-pictures',null);}
function publishAlbum(){loadUrl('/nena/modules/profile/ajax/gallery/publishAlbum.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum),'album-published','deleted');}
function deleteAlbum(){loadUrl('/nena/modules/profile/ajax/gallery/deleteAlbum.php?language='+getLanguage()+'&album='+encodeURIComponent(currentAlbum),null,'deleted');}
function deleted(){window.location=afterDeletedUrl;}
function editVideo(id){newWindow(null,null,-1,600,200);loadUrl('/nena/modules/profile/ajax/gallery/getEditVideo.php?language='+getLanguage()+'&video='+encodeURIComponent(id)+'&profile='+encodeURIComponent(profile),'window-content',null);}
function newWindow(title,call,position_y,width,height){var window=new Window({className:'nena',width:width,height:height,title:title});window.setDestroyOnClose(true);if(position_y==-1){window.showCenter();}else{window.show();window.setLocation(position_y,(document.body.offsetWidth-width)/2);}
window.getContent().innerHTML='<div id="window-content"></div>';callFunction(call);}
function saveVideo(id){var link=document.getElementById('youtube_link').value;var description=document.getElementById('youtube_description').value;loadUrl('/nena/modules/profile/ajax/gallery/saveVideo.php?language='+getLanguage()+'&video='+encodeURIComponent(id)+'&profile='+encodeURIComponent(profile)+'&link='+encodeURIComponent(link)+'&description='+encodeURIComponent(description),'video-saved',null);}
function deleteVideo(id){loadUrl('/nena/modules/profile/ajax/gallery/deleteVideo.php?language='+getLanguage()+'&video='+encodeURIComponent(id),null,'deleted');}
