// JavaScript Document

function clearText(obj)
{
	obj.value = "";
}

function writeRand(img)
{
	document.write(img)
}

function getRandom(randCount)
{
	return Math.floor(Math.random() * randCount);
}

function getSecondRandom(randCount, prevRand)
{
	var rand = Math.floor(Math.random() * randCount);
	
	while(rand == prevRand)
	{
		rand = Math.floor(Math.random() * randCount);
	}
	
	return rand;
}