// JavaScript Document

ifexists=false;
function chk(str) {
if (str=="yes") ifexists=true; else ifexists=false;


}
function ialert() {
alert(ifexists);
}
function fadein(fname,width,height) {
//var newImg = new Image();
//newImg.src = fname;
//var height = newImg.height;
//var width = newImg.width;
ttop=(370-height)/2;
lleft=0;
if (width < 250) lleft=98;
ttop=0; ileft=0;  // not needed on this site
//alert ('The image size is '+width+'*'+height);
//alert ('The padding is '+ttop+'*'+lleft);

hname=fname.replace("big","huge");
hpos=hname.indexOf("huge")+4;
hnum=hname.substring(hpos,hpos+2);
hnum=hnum*1;


//var ajax=new Ajax();
//rstart= new Date();
//start=rstart.getTime();  // need random get value to get around IE caching
//ajax.doGet(sname + '//checkfile.php?file=' + hname + '&start=' + start,chk);
//delete ajax;



href="javascript:showpop('image-pop');";
//alert(ifexists);
if (harray[hnum]=="y") {
	document.getElementById('huge').src=hname;
	str="<div style='position:relative'><a href=\"" + href + "\"><img style='border:none; padding: " + ttop + "px 0px 0px " + lleft + "px;' src='" + fname + "' alt='enlarged picture' /></a></div>";
	
	}

if (harray[hnum]!="y") str="<div style='position:relative'><img style='border:none; padding: " + ttop + "px 0px 0px " + lleft + "px;' src='" + fname + "' alt='enlarged picture' /></div>";

o=document.getElementById('bigpic');

opacity=100;
setOpacity (o, opacity);

ddown=1;
fadeLoop1 ();

}


	
function fadeLoop1 () {
		if (ddown==1) {
		if (opacity >= 4) {
		//alert(opacity);
			setOpacity(o, opacity);
			opacity -= 6;
			window.setTimeout("fadeLoop1()", 15);
		} else {
		ddown=0;
		o.innerHTML=str;
		}
		}
		
		if (ddown==0) {
		if (opacity <= 95) {
			setOpacity(o, opacity);
			opacity += 2;
			window.setTimeout("fadeLoop1()", 40);
		} 
		}
	}


function setOpacity (o, opacity) {
		o.style.filter = "alpha(style=0,opacity:" + opacity + ")";	// IE
		o.style.KHTMLOpacity = opacity / 100;				// Konqueror
		o.style.MozOpacity = opacity / 100;					// Mozilla (old)
		o.style.opacity = opacity / 100;					// Mozilla (new)
	}
	
function opaq(id,oo) {

t=document.getElementById(id);
setOpacity (t,oo);
}