

/***********************************************
* 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')
}


//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["images/print_ev.jpg", "javascript:PopupForm('pop/pr_everleigh.html','1',358,500)"]
dynimages[1]=["images/print_wai.jpg", "javascript:PopupForm('pop/pr_waikiwi.html','1',400,401)"]
dynimages[2]=["images/print_da.jpg", "javascript:PopupForm('pop/pr_da.html','1',600,550)"]
dynimages[3]=["images/print_perm.jpg", "javascript:PopupForm('pop/pr_permission.html','1',750,214)"]
dynimages[4]=["images/print_qantas.jpg", "javascript:PopupForm('pop/pr_qantas.html','1',600,398)"]
dynimages[5]=["images/print_law.jpg", "javascript:PopupForm('pop/pr_law.html','1',600,472)"]
dynimages[6]=["images/print_hotel.jpg", "javascript:PopupForm('pop/pr_hotel.html','1',600,552)"]
dynimages[7]=["images/print_eloan.jpg", "javascript:PopupForm('pop/pr_eloan.html','1',500,500)"]
dynimages[8]=["images/print_mm.jpg", "javascript:PopupForm('pop/pr_mm.html','1',600,659)"]
dynimages[9]=["images/print_smiles.jpg", "javascript:PopupForm('pop/pr_smiles.html','1',680,500)"]
dynimages[10]=["images/print_sshots.jpg", "javascript:PopupForm('pop/pr_sshots.html','1',529,600)"]
dynimages[11]=["images/print_ss.jpg", "javascript:PopupForm('pop/pr_ss.html','1',551,550)"]

//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/////

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
}
}
