function checkAll(checkbox)
{
	var field = document.getElementsByName(checkbox);
	for (i = 0; i < field.length; i++)
	{
		if(!field[i].disabled)
			field[i].checked = true ;
	}

}

function uncheckAll(checkbox)
{
	var field = document.getElementsByName(checkbox);
	for (i = 0; i < field.length; i++)
	{
		field[i].checked = false ;
	}
}

function popup(url,width,height)
{
	windowPop = window.open(url, 'waffleSpace'+width+height+'', 'width='+width+',height='+height+',top=0,left=0,screenX=0,screenY=0,location=0,directories=0,status=no,menuBar=no,scrollBars=yes,resizable=1');
	windowPop.focus();
}

function loadFlash(url,width,height)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="content" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+url+'" /><param name="quality" value="high" /><embed src="'+url+'" quality="high" width="'+width+'" height="'+height+'" name="content" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}

function hideByID(element)
{
	document.getElementById(element).style.display = 'none';
}

function showByID(element)
{
	document.getElementById(element).style.display = '';
}

function showHideByID(element,image)
{
	if(document.getElementById(element).style.display=='none')
	{
		showByID(element);
		if(image)
			image.src = 'http://shiftcode.com/images/collapse.gif';
	}
	else
	{
		hideByID(element);
		if(image)
			image.src = 'http://shiftcode.com/images/expand.gif';
	}
}