
function showLarge(element) {
	var loc='photos/linkimg.aspx?iid=' + element.id;
	NewWindow(loc,'name','100%','100%','yes', true);
}
function slideShow(element,category) {
	var loc='photos/linkimg.aspx?iid=' + element.id + '&c=' + category;
	NewWindow(loc,'name','100%','100%','yes', true);
}
function directorySlideShow(element,category) {
	var loc='photos/img.aspx?iid=' + element.id + '&c=' + category;
	NewWindow(loc,'name','100%','100%','yes', true);
}
function showPic(element) {
	var loc='photos/linkimg2.aspx?iid=' + element.id;
	NewWindow(loc,'name','100%','100%','yes', true);
}
function NewWindow(mypage, myname, w, h, scroll, WidthUse) {
	var wd = screen.width - 200;
	var ht = screen.height - 200;
	if (WidthUse) {
		w = wd;
		h = ht;
	}
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 3;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

var mypix = new Array() 
function preloadImages(){ 
  for (i=0; i<preloadImages.arguments.length;i++){ 
    mypix[i]=new Image(); 
    mypix[i].src=preloadImages.arguments[i]; 
  } 
} 
thispic = 0;
var isIE=document.all?true:false;
var isNS6=navigator.userAgent.indexOf("Gecko")!=-1?true:false;
// now change photo to next 
function processnext(){ 
// check if more pics 
  if(!document.images)return;
  thispic=(thispic+1)%mypix.length;
  if(isIE)
    document.all.pic1.src = mypix[thispic].src;
  else if(isNS6)
    null;
} 

function initImgs()
{
  preloadImages("/images/Temple2.gif",
                "/images/pepperbig.gif",
                "/images/sitepots.jpg",
                "/images/topHorizBar.gif",
                "/images/pepperborder.gif",
                "/images/sunedge.gif",
				"/images/contentBar.gif",
				"/images/cactus/pricklypear.gif",
				"/images/viewgblf.gif",
				"/images/viewgbrt.gif");
}
 