// JavaScript Document

ifexists=false;



function chk(str) {
if (str=="yes") ifexists=true; else ifexists=false;


}
function ialert() {
alert(ifexists);
}
function fadein(fname,width,height,desc,sdesc) {
sdesc = sdesc.split("'").join("&#039;");



var newImg = new Image();
newImg.src = fname;
//var height = newImg.height;

ttop=(370-height)/2;
//ttop=0;
ttop=24;
lleft=20;
if (width < 270) lleft=275-width;

//alert ('The image size is '+width+'*'+height);
//alert ('The padding is '+ttop+'*'+lleft);

hname=fname.substring(10);
hname="./pics/huge" + hname;
hnum=fname.substring(10,13);
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);



	//document.getElementById('bigimg').style.width=width + "px";
	str="<img style='width: " + width + "px; border:none; margin-top: " + ttop  + "px;' src='" + fname + "' alt='" + sdesc + "' />";
	
		
	str2=desc;


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;
		document.getElementById('bigimg').innerHTML=str;
		document.getElementById('bignote').innerHTML=str2;
		
		}
		}
		
		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);
}
