var n, sw,si,st;

function controls(n){
	var p,i,x,d=document;
	if(!(x=d.getElementById(n))&&d.all){x=d.all[n];}
	if(!x){for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}
		if(!x){if(d.layers){for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=controls(n,d.layers[i].document)}}}
	}
	return x;
}
function setPhoto(p,t){
	n=p;
	if(t==null){showPhoto();}
	else{window.setTimeout("showPhoto()",t);}
}
function showPhoto(){
	var p=controls("photoMain");
	if(p!=null){p.src=""+n+".jpg";}
}
