function imgRotate(tot)
{
	var num = Math.floor(Math.random() * (tot + 1));
	if (num == tot + 1)
	{
		num--;
	}

	var ins_pic = "<img src=\"img/rand" + num + ".jpg\" " + 
		"alt=\"TTH\" title=\"TTH\"\n\theight=\"305\" " +
		"width=\"420\"\n\t" + 
		"style=\"float:right;margin-left:10px;\" />";

	window.document.write(ins_pic);
}