
// Show the tasks for the current user
function openTasks()
{
	window.open(
		"tasks.php",
		"_blank",
		"channelmode=0, directories=0, fullscreen=0, width=400, height=500, location=0, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0"
	);
}

function openProfile()
{
	window.open(
		"profile.php",
		"_blank",
		"channelmode=0, directories=0, fullscreen=0, width=400, height=500, location=0, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0"
	);
}

function openAdminCmd( cmd )
{
	window.open(
		cmd,
		"_blank",
		"channelmode=0, directories=0, fullscreen=0, width=400, height=500, location=0, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0"
	);
}

function openPage( url, w, h )
{
	window.open(
		url,
		"_blank",
		"channelmode=0, directories=0, fullscreen=0, width=" + w + ", height=" + h + ", location=0, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0"
	);
}

function ToggleVar( inval, v1, v2 )
{
	if ( inval == v1 )
		return v2;
	else
		return v1;
}

// DEVIN-TODO: should be replaced with ToggleVar()
function ToggleStyle( name, style1, style2 )
{
	if ( name.className == style1 )
		name.className = style2;
	else
		name.className = style1;
}

function SizeWindow( w, h )
{
	window.resizeTo( w, h );
}

// precahce images
function PrecacheImage( n )
{
	img = new Image();
	img.src = n;

//	window.alert( "load -> " + img.src );
}

