//
// pzscript.js
//
// scripts supporting DougsPuzzles.com
//
 
maxpieces = 4;

//bnames = new Array("home","samp","art","prod","fig","orde","spec","abou","link");

// Called when page is loaded
function PageBegin()
{
	preload = new Image();
//	for (i=0; i<bnames.length; i++)			// Preload button images
//		preload.src = 'image/h'+bnames[i]+'.gif';
	preload.src='images/hbut.gif';

	for (i=1; i<=maxpieces; i++)			// Preload puzzle pieces
		preload.src = "images/puz"+i+".gif";
	
	count=1;
	time=1000;
	pieceanim = setInterval("PieceCycle()",time);
}

// Cycle puzzle piece in UL corner
function PieceCycle()
{

	++count;
	if (count > maxpieces)
	{
		count=1
		// slow down after first time through
		if (time==1000)
		{
			time=4000;
			clearInterval(pieceanim);
			pieceanim = setInterval("PieceCycle()",time);

		}
	}
	document.cyclepiece.src = "images/puz"+count+".gif";
}


// Manage button column mouse over & out

function Over(i)
{
//	eval("b"+i+".background='images/hbut.gif'");
}

function Out(i)
{
//	eval("b"+i+".background='images/nbut.gif'");
}
