photogallery.restartDelay = 500; // delay onmouseout before call to rotate
photogallery.col=[];
photogallery.pictureName = '';
photogallery.name="img1";
photogallery.count = 0;
function photogallery(name,path)
{
	this.name=name;
	this.path=path||"";
	this.imgNames=[];
	this.count = 0;
};
photogallery.prototype.addImages=function()
{
	var img;
	for(var i=0;arguments[i];i++)
	{
		this.imgNames[this.imgNames.length]=this.path+arguments[i];
	}
};
photogallery.prototype.showNext=function()
{	
	this.count++;
	if (this.count % this.imgNames.length == 0)
		this.count = 0;
	if (document.all)
	{
		document.getElementById(this.name).style.filter="blendTrans(duration=1)";
		document.getElementById(this.name).filters.blendTrans.Apply();
	}
	document.getElementById(this.name).src = this.imgNames[this.count];
	if (document.all)
	{
		document.getElementById(this.name).filters.blendTrans.Play();
	}

};
photogallery.prototype.showPrevious=function()
{
	this.count--;
	if (this.count == -1)
		this.count = this.imgNames.length - 1;
	if (document.all)
	{
		document.getElementById(this.name).style.filter="blendTrans(duration=1)";
		document.getElementById(this.name).filters.blendTrans.Apply();
	}
	document.getElementById(this.name).src = this.imgNames[this.count];
	if (document.all)
	{
		document.getElementById(this.name).filters.blendTrans.Play();
	}	
};



