// JavaScript Document

function isWide()
{
	return document.getElementById && screen.availWidth > 1000;
}
function setTableW()
{
//	if(isWide())
	//	document.getElementById("main").style.width = new String(maxW) + "px";
}
function setCellW()
{
//	if(isWide())
	//	document.getElementById("tdmain").style.width = new String(392 + (maxW - 770)) + "px";
}
function getRand(arrayLen)
{
	//Resturn random num between 0 and arrayLen - 1
	return Math.max(0,Math.round(Math.random() * arrayLen) - 1);
}
function doSnippet(num)
{
	if(document.getElementById)
	{
		if(!arguments.length)
			var num = getRand(numSnippets);

		var snip = document.getElementById("snip" + num);
		snip.style.display = "block";
	}
}
function onLoad()
{
	doSnippet();
}
function onUnload()
{
}
var maxW = 770;
var numSnippets = 6;