

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

function PopupForm(url,name,width,height) {

	var titleBarHeight, windowBorderWidth
	titleBarHeight = 24
	windowBorderWidth = 4

	var screenWidth, screenHeight
	screenWidth = 800
	screenHeight = 600

	if (window.screen) {
		if (window.screen.availWidth) {
			// ok browser has the appropriate properties we need to centre it
			screenWidth = window.screen.availWidth
			screenHeight = window.screen.availHeight
		}
	}

	var windowWidth = windowBorderWidth + width + windowBorderWidth
	var windowHeight = titleBarHeight + height + windowBorderWidth

	var left = (screenWidth - windowWidth) / 2
	var top = (screenHeight - windowHeight) / 2

	window.open(url,name,'left='+left+',top='+top+',screenX='+left+',screenY='+top+',width='+width+',height='+height+',scrollbars=0,resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0')
}

function openFullscreen(page) {
var yes = 1;
var no = 0;

var menubar = no;      // The File, Edit, View Menus
var scrollbars = yes;   // Horizontal and vertical scrollbars
var locationbar = no;  // The location box with the site URL
var directories = no;  // the "What's New", "What Cool" links
var resizable = no;    // Can the window be resized?
var statusbar = no;    // Status bar (with "Document: Done")
var toolbar = no;      // Back, Forward, Home, Stop toolbar

windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-30) + ",top=0,left=0";

windowprops += (menubar ? ",menubars" : "") +
(scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");

window.open(page, 'fullPopup', windowprops);
}
//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["images/ph_art_everleigh.jpg", "javascript:PopupForm('pop/everleigh.html','1',755,543)"]
dynimages[1]=["images/ph_art_skate.jpg", "javascript:PopupForm('pop/skate.html','2',700,449)"]
dynimages[2]=["images/ph_art_olga.jpg", "javascript:PopupForm('pop/olga.html','3',670,500)"]
dynimages[3]=["images/ph_art_planet.jpg", "javascript:PopupForm('pop/planetart.html','4',626,500)"]
dynimages[4]=["images/ph_art_kellert.jpg", "javascript:PopupForm('pop/kellert.html','5',710,500)"]
dynimages[5]=["images/ph_art_flou.jpg", "javascript:PopupForm('pop/flou.html','6',502,381)"]

//Preload images ("yes" or "no"):
var preloadimg="yes"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

///////No need to edit beyond here progid:DXImageTransform.Microsoft.Checkerboard(Duration=2);"/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='</a>'
return imghtml
}

function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}
