// CSS and DHTML powered ImageGallery  
// Created in April 2004 by Dasme - dasme *at* dasme.org
//  - http://dasme.org/imagegal/
//
// Script based on ideas from Jeremy Keith and AListApart.com
// http://www.alistapart.com/articles/imagegallery/
//
// If you use this code in your page, please leave these comments in.
// A quick email with the location of your gallery would be cool to. Always
// like to see what others have done with my scripts.
//
window.onload = preparePopImgLinks;

function preparePopImgLinks(){
    var links = document.getElementsByClassName("makeover");
    var ximage = new Array();
    for (i=0;i<links.length;i++) {
        links[i].title = "Mouse-Over to View";
        links[i].onmouseover = function(){
            //alert(this);
            //var thishref = this.href;
            //alert(thishref);
            //thishref = thishref.substring(thishref.lastIndexOf("/") + 1, thishref.length);
            //alert(this);
            
            showPic(this);
            return false;
        }
        links[i].onclick = function(){
            //alert(this);
            //var thishref = this.href;
            //alert(thishref);
            //thishref = thishref.substring(thishref.lastIndexOf("/") + 1, thishref.length);
            //alert(this);
             
            return false;
        }
        ximage[i] = new Image();
        ximage[i].src = links[i].href;
        
    }
}



function DOMCall(name) {
	if (document.layers) 
		return document.layers[name];
	else if (document.all)
		return document.all[name];
	else if (document.getElementById)
		return document.getElementById(name);
}
function showPic (whichpic) {
	DOMCall('placeholder_img').src = whichpic.href;
	//DOMCall('placeholder').width = null;
	//getImageWidth(whichpic);
	//DOMCall('placeholder').height = null;
	//getImageHeight(whichpic);
	
//	if (whichpic.title) {
//		DOMCall('imageCaption').innerHTML = whichpic.title;
//		DOMCall('imageCaption').className = "";
//	} else {
//		DOMCall('imageCaption').className = "hidden";
//	}
 	return false;
}

function clickedImage (whichpic) {
return null
	imageUrl = whichpic.src;  // grab the url of the medium image.
	//imageUrl = imageUrl.replace(/images/gi, "images/large"); // add in the "large" dir so we can display the big picture
	imageWindow = window.open( imageUrl,'imageWin','width=640,height=480');  // popup the image in a new window
}

function switchPage(pageId) {
DOMCall('page1').className = "hidden";
DOMCall('page2').className = "hidden";

DOMCall(pageId).className = "asdasd"; // set the current page to junk so it becomes visible
}


