﻿<!--
var photoContent = null;
var photoContentLoaded = false;
var prjAddY = -250;

function showPhoto ( galleryId, resourceId )
{
    showPhotoContent( galleryId, resourceId );
    
    new Ajax.Request( myWebroot + "myinterfaces/" + myLanguagePath + "/photogallery-getphoto" + galleryParamSep + resourceId + ".ajax", { method: 'post', onComplete: displayPhoto } );
}

function displayPhoto ( originalRequest )
{
	writeHTMLToLayer( "galleryDetailContainer", originalRequest.responseText );
}

function closePhoto ()
{
    if ( photoContentLoaded )
    {
        photoContentLoaded = false;
        initPhotoContent();
        myShowHideLayerObj( photoContent, false );
    }
}

function initPhotoContent ()
{
    if ( photoContent == null )
    {
        photoContent = myGetObj( "galleryDetailContainer" );
    }
}

function showPhotoContent ( galleryId, resourceId )
{
    if ( !photoContentLoaded )
    {
        photoContentLoaded = true;
        initPhotoContent();
		myCenterLayer( "galleryDetailContainer", false, true, 0, prjAddY );
		prjAddY = 0;
        myShowHideLayerObj( photoContent, true );
    }
}
//-->