/* ------------------------------------------------------------------
 *
 * Copyright (c) 2006, Schwarz & Schwarz 
 * Werkstatt f?r digitale Kommunikation Thomas Schwarz
 * All Rights Reserved.
 *
 * http://www.com-factory.net
 *
 * ------------------------------------------------------------------
 * Created          : 28.01.2006
 * Created By       : ts
 * --------------------------------------------------------------- */

// Hook up an event handler to a specific DOM element
function hookEvent(id, event, handler)
{
	var elt = document.getElementById(id);
	if(!elt)
		return false;
		
	eval("elt." + event + " = handler");
	return true;
}

function navigateHome()
{
	var homeUrl = "/";

	var navElt = document.getElementById("navhome");
	if(navElt)
	{
		homeUrl = navElt.href;
	}
	
	window.location = homeUrl;
}


// Hook up global event handlers
function initGlobal()
{
	hookEvent("headerimage","onclick",navigateHome);
	hookEvent("pageHeader","onclick",navigateHome);
}

// Run global initialization routine
//window.onload = initGlobal;

//initGlobal();

