//copyright 2010 Alexis Paul Bertolini webwarrior.org
foto_index=0;

function ww_swapImages(path,size,domId)
{
fotoRef=document.getElementById(domId);
/*if (foto_index<10)
	{
		fotoNumber="00"+foto_index;
	}
else if (foto_index<100)
	{
		fotoNumber="0"+foto_index;
	}
else if (foto_index<1000)
	{
		fotoNumber=""+foto_index;
	}*/
fotoRef.src=path+foto_index+".jpg";
if (foto_index>=size)
	{
		foto_index=0;
	}
else
	{
		foto_index++;
	}
}

function ww_slideshow(path, size, domId, speed)
{
setInterval("ww_swapImages(\""+path+"\",\""+size+"\",\""+domId+"\")",speed);
}

function ww_slideshow2(fotoArray,domId)
{
	fotoRef=document.getElementById(domId);
	fotoIndex=Math.floor(Math.random()*fotoArray.length);
	fotoRef.src=fotoArray[fotoIndex];
	
}

function doVideo(code,divName)
{
youtubeHTML="<object width=\"480\" height=\"385\">\n<param name=\"movie\" value=\"http://www.youtube.com/v/"+code+"?fs=1&autoplay=1\"></param>\n<param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param>\n<embed \n	src=\"http://www.youtube.com/v/"+code+"?fs=1&autoplay=1\" \n	type=\"application/x-shockwave-flash\" \n	allowscriptaccess=\"always\" \n	allowfullscreen=\"true\" \n	width=\"480\" height=\"385\">\n</embed>\n</object>";
document.getElementById(divName).innerHTML=youtubeHTML;
}

