function checkSubscriptionForm(){
	if($('subscriptionEmail').value.match(/^[a-zA-Z][a-zA-Z\_\.\-\d]*@[a-zA-Z\_\.\-\d]+\.[a-zA-Z]{2,4}$/)){
		return true;
	}
	return false;
}

function openBigSlideShow(galleryId,photoId){
	window.open('/diaporama_popup/data/'+galleryId+'/'+photoId+'/','Bigdiaporama',"height=900,width=1000,status=yes,toolbar=no,menubar=no,location=no");
}
function getPhotoDescription(galleryId,photoId){	
	new Ajax.Request('/diaporama_popup/photo_description/data/'+galleryId+'/'+photoId+'/', {
		  method: 'get',
		  onSuccess: function(transport) {
		      var notice = $('photodescription');
		      if (transport.responseText!=''){
				notice.update(transport.responseText);
			}
		}
	});
}

function changeDiaporama(diaporamaId){
	if(diaporamaId==-1){
		return false;
	}
	 new Ajax.Request('/diaporama_popup/diaporama_service/data/'+diaporamaId, {
		  method: 'get',
		  onSuccess: function(transport) {
		      var notice = $('diaporamaFlash');
		      if (transport.responseText!=''){
				notice.update(transport.responseText);
			}
		}
	});
}

function reloadPopup(diaporamaId){
	if(diaporamaId==-1){
		return false;
	}
	location.replace('/diaporama_popup/data/'+diaporamaId+'/');
}
