/************************************************************************/
/* Nelsou.com                                                           */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2007 by Nelson (nelsou.com@gmail.com)                  */
/*                                                                      */
/* =========================                                            */
/* $Id: javascripts/nels.js,v 1.0 Nelson Exp $                          */
/* File Last Updated:                                                   */
/* 17:02 19/09/2007                                                     */
/************************************************************************/

function $(id)
{
  return document.getElementById(id);
}

function showLoading()
{
  if ($('update'))
    $('update').innerHTML = "<img src='images/loading.gif'>";
  return true;
}

function hideLoading()
{
  if ($('update'))
    $('update').innerHTML = "";
  return true;
}

/* Return the size of the screen */
function screen_size()
{
	var windowWidth, windowHeight;

	// all except Explorer
	if (self.innerHeight)
	{
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	}
	// Explorer 6 Strict Mode
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	// other Explorers
	{
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	return ([windowWidth, windowHeight]);
}

