function init() 
{   
rollovers();

} 

function isObject( variable )
{
	return ( typeof variable == 'object' );
}

function isObj( variable )
{
	return isObject(variable);
}

function isValidObject( variable )
{
	return ( isObject(variable) && !isNull(variable) );	
}

function isValidObj( variable )
{
	return isValidObject(variable);
}

function isNull( variable )
{
	return ( variable == null );
}

function isString( variable )
{
	return ( typeof variable == 'string' );
}

function isValidString( variable )
{
	return ( typeof variable == 'string' && variable.length > 0 );
}

function isArray( variable )
{
	return ( typeof variable == 'array' );
}

function isUndefined( variable )
{
	return ( typeof variable == 'undefined' );
}

function isDefined( variable )
{
	return ( typeof variable != 'undefined');
}

function isNumber( variable )
{
	return ( typeof variable == 'number' );
}

function isFunction( variable )
{
	return ( typeof variable == 'function' );
}

function isWholeNumber( variable )
{
	return ( isNumber(variable) && ( parseInt(variable) == parseFloat(variable) ) );
}

function isValidColor( variable )
{
	// Check by length and range of characters (zero or one leading #, 0-f)
	if( variable.length < 3 )//|| variable.length > 7 || variable.length == 5 )
		return false;
	
	validChars = '0123456789ABCDEF';
	variable = variable.toUpperCase();
	
	// Loop through each character, and if an invalid one is found, return false
	for( i = 0; i < variable.length; i++ )
	{
		// A # at position 1 is allowed
		if( i == 0 && variable.charAt(i) == '#' )
			continue;
		
		// If this character is invalid, so is the entire color
		if( validChars.indexOf(variable.charAt(i)) < 0 )
		{
			return false;
		}
	}
	
	return true;
}



// Browser detect stuff 
var nAV = navigator.appVersion.toLowerCase();
var nUA = navigator.userAgent.toLowerCase();
var nP = navigator.platform.toLowerCase();
var isIE = nAV.indexOf('msie')!=-1;
var isIE6 = (nAV.indexOf('msie 6')!=-1 || nAV.indexOf('msie 5')!=-1);
var isIE7 = (nAV.indexOf('msie 7')!=-1);
var isFirefox = (nUA.indexOf('firefox')!=-1);
var isOpera = (nUA.indexOf('opera')!=-1);
var isSafari = (nUA.indexOf('safari')!=-1);
var isWin32 = (nP.indexOf('win')!=-1);
var isMac = (nP.indexOf('mac')!=-1);
if (isOpera) {
  isIE = false;
  isIE6 = false;
  isIE7 = false;
}

function $(sID) 
{
  // If the object does not exist, alert us so that we can fix the
  // code that is using an invalid call to the prototype
  oPrototyped = getObj(sID);
  if( !isValidObject(oPrototyped) )
  	alert( 'Tried to call JavaScript prototyped function "' + sID + '"' );
  
  return oPrototyped;
  //return document.getElementById(sID);
}



function swapShow( e1, e2 )
{
	if( document.getElementById( e1 ).style.display == 'none' )
	{
		document.getElementById( e1 ).style.display='';
		document.getElementById( e2 ).style.display='none';
	}
	else
	{
		document.getElementById( e1 ).style.display='none';
		document.getElementById( e2 ).style.display='';
	}
}



/*
 * Sets the style class for an element
 *
 * @param	Object;	The object to change the class for
 * @param	String;	The classname to set
 * @return	VOID
 */
function setClass( oElement, sClassname )
{
	if( !isValidObject(oElement) || !isString(sClassname) || sClassname.length < 1 )
		return null;
		
	oElement.className = sClassname;	
}


/*
 * Returns an object if one is found with the id
 * passed in the parameters
 *
 * @param	String;	Object ID
 * @return	Object;	Returns the object found, if any
 */
function getObj( elementID )
{
	
	if( !isString(elementID) || elementID.length < 1 )
		return null

	// First use getElementById
	theObj = document.getElementById(elementID);
	//theObj = eval( 'document.getElementById("' + elementID + '")' );
	
	if(document.getElementById(elementID))
		theObj = eval( 'document.getElementById("' + elementID + '")' );
	//else
		//alert("Missing Obj on page: " +elementID);
	
	// If an object wasn't found, try using getElementByName, if available
	if( !isValidObject(theObj) && isFunction(document.getElementsByName) )
	{
		theObj = document.getElementsByName(elementID);
		
		// If theObj.length is 0, then it is not actually a valid object
		if( theObj.length == 0 )
			theObj = null;
	}
	
	if( isValidObject(theObj) )
		return theObj;
	else
		return null;		
	
}

/* alias of 'getObj' */
function getO( elementID ) { return getObj( elementID ); }


/*
 * Creates a copy of an object (oFromObject) and returns
 * a new object with those properties.
 */
function getObjectCopy( oFromObject )
{
	oToObject = oFromObject;

	return oToObject;
}

// This string prototype allows you to append .trim() to any string to trim the value
String.prototype.trim = function() {
a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
};

function display_big_hilite()
{
	getObj("hilite_left").innerHTML="<IMG SRC='images/layout/footer_big_hl_left.png' HSPACE=0 VSPACE=0 STYLE='padding-left: 4px;'>";
	getObj("hilite_right").innerHTML="<IMG SRC='images/layout/footer_big_hl_right.png' HSPACE=0 VSPACE=0>";
	getObj("big_hilite").style.display=""; 
	getObj("short_hl").style.display="none";
	
}

function hide_big_hilite()
{
	getObj("big_hilite").style.display="none"; 
	getObj("short_hl").style.display="";	
	getObj("hilite_left").innerHTML="<IMG SRC='images/layout/footer_hilite_left.gif' HSPACE=0 VSPACE=0 STYLE='padding-left: 4px;'>";
	getObj("hilite_right").innerHTML="<IMG SRC='images/layout/footer_hilite_right.gif' HSPACE=0 VSPACE=0>";
}

