


/***********************************************
* 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=1,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/mk_airnz.gif", "javascript:PopupForm('demo/airnz.html','1',640,450)"]
dynimages[1]=["images/mk_flybuys.gif", "javascript:PopupForm('demo/flybuys.html','1',640,450)"]
dynimages[2]=["images/mk_hall.gif", "javascript:PopupForm('demo/hallensteins.html','1',640,450)"]
dynimages[3]=["images/mk_istart.gif", "javascript:PopupForm('demo/istart.html','1',730,450)"]
dynimages[4]=["images/mk_sched.gif", "javascript:PopupForm('demo/scheduleus.html','1',640,450)"]
dynimages[5]=["images/mk_wire.gif", "javascript:PopupForm('demo/wire.html','1',730,450)"]
dynimages[6]=["images/mk_health.gif", "javascript:PopupForm('demo/healthdynamics.html','1',630,450)"]
dynimages[7]=["images/mk_nzso.gif", "javascript:PopupForm('demo/nzso.html','1',630,450)"]
dynimages[8]=["images/mk_Int.gif", "javascript:PopupForm('demo/Internet_Jan07.html','1',700,450)"]
dynimages[9]=["images/mk_tv1.gif", "javascript:PopupForm('demo/sports_survey.html','1',630,450)"]
dynimages[10]=["images/mk_tv2.gif", "javascript:PopupForm('demo/tv2_movie.html','1',700,450)"]
dynimages[11]=["images/mk_pump.gif", "javascript:PopupForm('demo/pumpkinpatch.html','1',700,450)"]

//Preload images ("yes" or "no"):
var preloadimg="no"

//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
}
}

