// slumpar bild till sidan.
// Ändra antalet totala bilder om någon läggs till alt. tas bort

var intImages = 10; //Totala antalet bilder.

//Picture 1
var intImage1 = Math.floor(Math.random() * intImages) + 1;
ImageWriteTag(intImage1);

//Picture 2
var intImage2 = Math.floor(Math.random() * intImages) + 1;
if (intImage2 == intImage1)
{
	do
	{
		intImage2 = Math.floor(Math.random() * intImages) + 1;
	}
	while (intImage2 == intImage1)
}
ImageWriteTag(intImage2);

//Picture 3
var intImage3 = Math.floor(Math.random() * intImages) + 1;
if ((intImage3 == intImage2) ||(intImage3 == intImage1) )
{
	do
	{
		intImage3 = Math.floor(Math.random() * intImages) + 1;	
	}
	while ((intImage3 == intImage2) || (intImage3 == intImage1) )
}
ImageWriteTag(intImage3);


function ImageWriteTag(intImage)
{
	if (intImage == 1)
	{
		document.write("<img alt='Adam Heldring' title='Adam Heldring' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 2)
	{
		document.write("<img alt='Erik Hassle' title='Erik Hassle' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 3)
	{
		document.write("<img alt='Grand Cafe' title='Grand Cafe' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 4)
	{
		document.write("<img alt='Jack Vreeswijk' title='Jack Vreeswijk' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 5)
	{
		document.write("<img alt='Jarle Bernhoft' title='Jarle Bernhoft' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 6)
	{
		document.write("<img alt='Miss Li' title='Miss Li' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 7)
	{
		document.write("<img alt='Sidewalk' title='Sidewalk' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 8)
	{
		document.write("<img alt='Soulshake Express' title='Soulshake Express' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 9)
	{
		document.write("<img alt='The Grand' title='The Grand' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
	if (intImage == 10)
	{
		document.write("<img alt='Tommy Tokyo &amp; Starving for my Gravy' title='Tommy Tokyo &amp; STarving for my Gravy' src='/images/artister/" + intImage + ".jpg' width='205' height='102' />");
	}
}
