
var message="Please don't save any images to your computer.\n"+"You can bookmark photos on this website instead,\n"+"there is an icon for this in the actual photo set.";function onMouseDown(evt)
{var mouseButton=(evt)?evt.which:event.button;var mouseTarget=(evt)?evt.target:event.srcElement;if(mouseButton==2||mouseButton==3)
{if(mouseTarget.className=="photo")
{alert(message);return false;}}
return true;}
function showRenewalMessage(message)
{showEPLDialog(message,false,'Paid Membership expiry',false);}
function initMouseHandler()
{if(typeof document.oncontextmenu=="object")
{document.onmousedown=onMouseDown;}
else
{window.oncontextmenu=onMouseDown;}}
dojo.addOnLoad(function(){initMouseHandler();});function updateActionByXHR(nodeId,actionUrl,objectType,objectId,property,value)
{var formdata={objectType:objectType,objectId:objectId,property:property,value:value};sendToActionClassByXHR(nodeId,actionUrl,formdata,null,null);window.location.reload();}
function sendToActionClassByXHR(nodeId,actionUrl,formdata,destroyDijitId,errorTitle)
{var xhrData={content:formdata,url:actionUrl,handleAs:"text",load:function(response)
{var trimmedResponse=dojo.trim(response);if(trimmedResponse.substring(0,6)=="Error:")
{showEPLDialog(trimmedResponse,false,errorTitle,true);return response;}
if(destroyDijitId!=null)
{var dijitNode=dijit.byId(destroyDijitId);if(dijitNode!=null)
{dijitNode.destroy();}}
var node=dojo.byId(nodeId);node.innerHTML=response;dojo.parser.parse(node);return response;},error:function(data){alert("There was a problem trying to perform an update please contact the EPL administrator\nError: "+data);},timeout:60000};dojo.xhrPost(xhrData);}
function sendToActionClassByXHRPostWithDialogResponse(actionUrl,formdata,title)
{baseSendToActionClassByXHRPostWithDialogResponse(actionUrl,formdata,title,true);}
function sendToActionClassByXHRPostWithDialogResponseWithoutReload(actionUrl,formdata,title)
{baseSendToActionClassByXHRPostWithDialogResponse(actionUrl,formdata,title,false);}
function baseSendToActionClassByXHRPostWithDialogResponse(actionUrl,formdata,title,reloadPage)
{var xhrData={content:formdata,url:actionUrl,handleAs:"text",load:function(response)
{showEPLDialog(response,true,title,reloadPage);return response;},error:function(data){alert("There was a problem trying to perform an update please contact the EPL administrator\nError: "+data);},timeout:60000};dojo.xhrPost(xhrData);}
function sendToActionClassByXHRGetWithDialogResponse(actionUrl,paramString,title)
{var xhrData={content:paramString,url:actionUrl,handleAs:"text",load:function(response)
{showEPLDialog(response,true,title,true);return response;},error:function(data){alert("There was a problem trying to perform an update please contact the EPL administrator\nError: "+data);},timeout:60000};dojo.xhrGet(xhrData);}
function sendToActionClassSynchronouslyByXHRGetWithDialogResponse(actionUrl,formdata,title,reloadPage)
{var result=false;var xhrData={content:formdata,url:actionUrl,handleAs:"text",sync:true,load:function(response)
{var trimmedResponse=dojo.trim(response);if((trimmedResponse!=null)&&(trimmedResponse!=""))
{showEPLDialog(trimmedResponse,true,title,reloadPage);result=false;}
else
{result=true;}},error:function(data){alert("There was a problem trying to perform an update please contact the EPL administrator\nError: "+data);},timeout:60000};dojo.xhrGet(xhrData);return result;}
function showEPLDialog(message,autoClose,title,reloadPage)
{var dialog=dijit.byId("eplDialog");var dialogContent;if(reloadPage)
{dialogContent="<p>"+message+"</p><br>"+"<div class='eplDialogButtonDiv'>"+"<div class='eplDialogButton' onclick='hideEPLDialog();'>Close</div></div>";}
else
{dialogContent="<p>"+message+"</p><br>"+"<div class='eplDialogButtonDiv'>"+"<div class='eplDialogButton' onclick='hideEPLDialogDoNotReloadPage();'>Close</div></div>";}
if(title!=null)
{dialog.attr("title",title);}
dialog.attr("content",dialogContent);dialog.show();if(autoClose)
{var hideDialogHitch;if(reloadPage)
{hideDialogHitch=dojo.hitch(this,"hideEPLDialog");}
else
{hideDialogHitch=dojo.hitch(this,"hideEPLDialogDoNotReloadPage");}
setTimeout(hideDialogHitch,5000);}}
function hideEPLDialog()
{var dialog=dijit.byId("eplDialog");dialog.hide();window.location.reload();}
function hideEPLDialogDoNotReloadPage()
{var dialog=dijit.byId("eplDialog");dialog.hide();}
function showYesNoDialog(message,title,onYesClick,onNoClick)
{var dialog=dijit.byId("eplDialog");var dialogContent="<p>"+message+"</p><br>"+"<div class='eplDialogButtonDiv'>"+"<span id='yesDialogButton' class='eplDialogButton' "+"onclick='hideEPLDialogDoNotReloadPage(); "+onYesClick+";'>&emsp;Yes&emsp;</span>&ensp;"+"<span id='noDialogButton' class='eplDialogButton' "+"onclick='hideEPLDialogDoNotReloadPage(); "+onNoClick+";'>&emsp;No&emsp;</span></div>";if(title!=null)
{dialog.attr("title",title);}
dialog.attr("content",dialogContent);dialog.show();}