var windowHandle = null;
var windowHandle_closed = false;


function enlarge(x,y,z){
var imgurl = x;
var bg = x.indexOf('images/gallery/');
var start = bg + 15;
var end = x.indexOf('.jpg',start);
var p=x.substring(start);
var value = "images/gallery/enlarge/enlarge.asp?img="+p;
var dimension;
dimension="width="+z+",height="+y;
windowHandle = window.open(value,'image',dimension); 
if (windowHandle_closed) {
   windowHandle_closed = false;
}
return;
}

function closeWindow() {
    if (windowHandle != null) {
        if (!windowHandle_closed) {
            windowHandle_closed = true;
            windowHandle.close();
        }
    }
}
//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+:

///////No need to edit beyond here/////



function returnimgcode(theimg,mtop,title,desc){
var imghtml=""
var x=mtop
var t=title
var s=theimg[2]
var zzz=desc
imghtml+='<img  src="'+theimg[0]+'"  style="width:545px;height:345px"/>'
return imghtml
}


function modifyimage(loadarea, imgindex, margin, title,trans,desc){
var filterstring="progid:DXImageTransform.Microsoft.revealTrans(Duration=1.0,Transition="+trans+")"
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],margin,title,desc)
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}
