//Created on 27-Jul-2004 18:12:03

var i = 0;
var ii = 0;
var ic = 0;
var ij = 0;
var butt = new Array('who','what','why','when','where');
var homebut = new Image;
homebut.src= 'pikchewers/homwellies.gif';
var funnyface = new Image;
funnyface.src = 'pikchewers/crosseye1.gif';
var funnnyface = new Image;
funnnyface.src = 'pikchewers/crosseye2.gif';


function cheapskate()
{
var now = new Date();
var cheapo = document.getElementById('iltempo');
cheapo.innerHTML = '<span class="numerii">' +now+ '</span>';
}

function curtainup()
{
var thetop = new Array(125);
thetop[i] = -(i * 3) + 'px';
var thecurtain = document.getElementById('curtain');
var theclickmessage = document.getElementById('wheretoclick');
theclickmessage.innerHTML = '';
if(i < 125)
	{
	thecurtain.style.top = thetop[i];
	i++;
	setTimeout('curtainup()',21);
	showwheretoclick('nope');
	}
else
	{
//	setTimeout('showbutns()',1008);
	theclickmessage.innerHTML= '<p>Chik Duncan will be doing a Smelly Wellie Story Tellie at<br style="margin-top : 20px;" /><a href="http://www.bigtentfestival.co.uk/family-festival.htm">The Big Tent Festival</a><br style="margin-bottom : 20px;" />in the ancient kingdom of Fife this weekend<br /><big>Saturday 24<sup>th</sup> July 2010 at 1:30pm</big></p><p>Then he\'s planning to re-decorate this Web site.</p>';
	theclickmessage.style.fontSize = '160%';
	theclickmessage.style.visibility = 'visible';
	}
}

function showbutns()
{
if(ii < 5)
	{
	var thebutt = document.getElementById(butt[ii]);
	thebutt.style.visibility = 'visible';
	ii++;
	setTimeout ('showbutns()',1008);
	}
}

function showwheretoclick()
{
var theclickmessage = document.getElementById('wheretoclick');
theclickmessage.style.visibility = 'visible';
}

function hidewheretoclick()
{
var theclickmessage = document.getElementById('wheretoclick');
theclickmessage.style.visibility = 'hidden';
}

function cross()
{
var crosser = document.getElementById('doublecross');
if(ic == 0)
	{
	crosser.src = 'pikchewers/crosseye' + ic + '.gif';
	ic++;
	setTimeout('cross()',3000);
	}
else if(ic == 1)
	{
	crosser.src = 'pikchewers/crosseye' + ic + '.gif';
	ic--;
	setTimeout('cross()',300);
	}
}

function rotator()
{
var thestage = document.getElementById('pikchew');
if(pikchewer <= 3)
	{
	thestage.src = "pikchewers/swtspaisley" + pikchewer + ".jpg";
	pikchewer++;
	setTimeout('rotator()',3000);
	}
else
	{
	pikchewer = 0;
	setTimeout('rotator()',1000);	
	}
}

function showjokes()
{
var topbox = document.getElementById('joke');
var punchbox = document.getElementById('punch');
var boohoobox = document.getElementById('boohoo');
if(ij == 0)
	{
	topbox.style.visibility = 'visible';
	ij++;
	setTimeout('showjokes()',4000);
	}
else if(ij == 1)
	{
	punchbox.style.visibility = 'visible';
	ij++;
	setTimeout('showjokes()',4000);
	}
else
	{
	topbox.style.visibility = 'hidden';
	punchbox.style.visibility = 'hidden';
	boohoobox.style.visibility = 'visible';
	}
}
