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').src = whichpic.href;
	if (whichpic.title) {
		DOMCall('imageCaption').innerHTML = whichpic.title;
		DOMCall('imageCaption').className = "";
	} else {
		DOMCall('imageCaption').className = "hidden";
	}
 	return false;
}

function clickedImage (whichpic) {
	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("popup.php?z="+imageUrl,'imageWin','width=640,height=480');  // popup the image in a new window set width and height to your max values
}

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
}



	
window.addEvent("domready", function() {
	//new Accordion($$(".accordion_toggler"), $$(".accordion_content"));

	dp.SyntaxHighlighter.HighlightAll("usage");

	new iCarousel("gallery_content", {
		idPrevious: "gallery_previous",
		idNext: "gallery_next",
		idToggle: "undefined",
		item: {
			klass: "gallery_item",
			size: 100
		},
		animation: {
			duration: 250,
			amount: 2
		}
	});
});
	
