function photo_collection_show(){
    object_photo = document.getElementById('photo');
    object_photo_frame = document.getElementById('photo_frame');
    object_photo_background = document.getElementById('photo_background');
    /* see index.css */
    }
function photo_show(evt){
    //photo_to_show = evt.src.replace(/albums\/([^/]+)/, "albums/$1/large"); //Want to show the large one.
    photo_to_show = evt.src;
    photo_to_show = photo_to_show.replace("_thumb.jpg", ".jpg");//not a thumbnail anymore, and not derived.
    photo_to_show = photo_to_show.replace("data/derived/", "data/");
    //alert(photo_to_show);

    object_photo.innerHTML = '<img src='+photo_to_show+' id="photo_large" border="2"/>';
    object_photo.innerHTML += '<p>'+evt.alt+'</p>';//Makes the text appear under photo.

    object_photo_large = document.getElementById('photo_large');//Mozilla //object_photo_large = document.all['photo_large'];//IE
    object_photo_large.height = 480;

    //xy location: //if mess with then make sure y-location remains correct.
    if (window.pageYOffset) {y_scrolled = window.pageYOffset; y_scrolled += 15;}//Mozilla
    else {y_scrolled = 15;}//IE
    object_photo_frame.style.left = 15 + 'px';
    object_photo_frame.style.top = y_scrolled + 'px';

    object_photo_frame.style.display = 'block';//Mozilla
    object_photo_background.style.display = 'block';//Mozilla
    }
function photo_hide(){
    object_photo_frame.style.display = 'none';
    object_photo_background.style.display = 'none';
    }













/*
//objectPhotoSlide.innerHTML = '<img src="large/'+evt.src.match(/\d+\.jpg/g)+'" id="photo_large" border="2"/>';
//objectPhotoSlide.innerHTML = '<img src="http://www.hermanningjaldsson.com/1/photos/'+evt.src.match(/[p][abcdefgijklmnopqrstuvwxyz][^/]+[/]/i)+'/large/'+evt.src.match(/\d+\.jpg/gi)+'" id="photo_large" border="2"/>';
//document.write(hemmi);

//To make it appear correctly in the first show:

the_file = evt.src.match(/\d+\.jpg/g);
objectPhotoSlide.innerHTML = '<img src="large/' + the_file + '" id="photo_large" border="2"/>';
objectPhotoSlide.innerHTML += '<p>'+evt.alt+'</p>';//Makes the text appear under photo.
object_photo_large = document.getElementById('photo_large');

object_photo_frame.style.display = 'block';
object_photo_background.style.display = 'block';
*/
/*
//evt.src = "http://www.hermanningjaldsson.com/1/photos/large/51.jpg";   //er grunnmynd eventsins.
function findLivePageHeight()
        {
        if (window.innerHeight) {return window.innerHeight;}//IE
        if (document.body.clientHeight) {return document.body.clientHeight;}//Mozilla
        return (null);
        }

function findLivePageWidth()
        {
        if (window.innerWidth) {return window.innerWidth;} //IE
        if (document.body.clientWidth) {return document.body.clientWidth;}//Mozilla
        return (null);
        }

function change_attribute()
        {
        //object_photo_large.style.setAttribute('height:30px');  //IE
        object_photo_large.setAttribute("height", Displayed_photo_max_allowed_height);    //Mozilla

        //object_photo_large.style.cssText = "height:150px;";   both?
        }

function thicken_borders(evt)
        {
        objectPhotoSlide.innerHTML = '<img src="' + evt.src +'" id="photo_large" border="2"/>';//breidd mynarinnar her. (  alt="Large Photo")
        objectPhotoSlide.innerHTML += '<p>' + evt.alt +'</p>';
        object_photo_large = document.getElementById('photo_large');

        object_photo_frame.height = 5;
        object_photo_background.height = 5;
        object_photo_large.height = 500;
        object_photo_large.width = 500;

        objectPhotoSlide.style.width = 500;

        //object_photo_frame.style.left = x_scrolled + 'px';
        //object_photo_frame.style.left = 350;
        objectPhotoSlide.style.display = 'block';
        objectPhotoSlide.style.display = 'block';  //object_photo_background.style.display = 'block';
        }
*/

