<!--
var SnapPhoto	= function(){
	this.photos	= new Array();
	this.skyTitleObj	= null;
	this.skyDateObj 	= null;
	this.skyPhotoObj	= null;
	this.skyButtonObjs	= new Array();
	this.index			= 0;
	this.iTime			= 0;

	this.push			= function(title, date, link, img){
		var photo = {'title':title,'date':date,'link':link,'img':img};
		this.photos.push(photo);
	}

	this.setDisplayObj	= function(){
		if(!this.skyTitleObj){
			this.skyDateObj		= document.getElementById('sky_date');
			this.skyTitleObj	= document.getElementById('sky_title');
			this.skyPhotoObj	= document.getElementById('sky_photo');
			this.makeButton();
		}
	}

	this.setIndex			= function(no){
		if(typeof(no) == 'undefined')	this.index++;
		else							this.index	= no;

		if( (this.index+1) > this.photos.length ){
			this.index = 0;
		}
	}

	this.display		= function(no){
		this.setDisplayObj();
		this.setIndex(no);
		this.displayButton();

		var obj	= this.photos[this.index];
		this.skyTitleObj.innerHTML	= "<b><a href='"+obj.link+"'>"+obj.title+"</a></b>";
		this.skyDateObj.innerHTML	= "<a href='"+obj.link+"'>"+obj.date+"</a>";
		this.skyPhotoObj.innerHTML	= "<a href='"+obj.link+"'><img src="+obj.img+" width='236' height='169'></a>";

		if(this.iTime > 0){window.clearTimeout(this.iTime)}
		this.iTime	= window.setTimeout("snapPhoto.display()", 5000);
	}

	this.makeButton	= function(){
		var skyButtonObj	= document.getElementById('sky_button');

		for(var i=0; i<this.photos.length;i++){
			var aObj	= document.createElement("A");
			var imgObj	= document.createElement("IMG");
			aObj.href		= 'javascript:snapPhoto.display('+i+')';
			imgObj.src		= 'http://rikoreanchurch.org/rickc/images/snapshot_on.gif';
			imgObj.hspace	= '1';
			aObj.appendChild(imgObj);
			skyButtonObj.appendChild(aObj);

			this.skyButtonObjs.push(imgObj);
		}

	}

	this.displayButton	= function(){
		for(var i=0; i<this.skyButtonObjs.length;i++){
			if(this.index == i){
				this.skyButtonObjs[i].src		= 'http://rikoreanchurch.org/rickc/images/snapshot_on.gif';
			}else{
				this.skyButtonObjs[i].src		= 'http://rikoreanchurch.org/rickc/images/snapshot_off.gif';
			}
		}
	}
};

var snapPhoto				= new SnapPhoto;
-->