// JavaScript Document
// this is version 1.1 of the initialization script. It has been updated to work with jquery 1.1   Last Update 2/15/07
var t="";

/* Custom onload handler */
var dolFunctions = new Array();	// array to hold customized affiliate functions and params for "DOM load" functions
var wolFunctions = new Array(); // array to hold customized affiliate functions and params for "window load" functions

// add custom load fucntions to correct array
function onloadFunctions(myFunction,flag) {
	if(flag == "d")
	{
		dolFunctions[wolFunctions.length] = myFunction;
	}
	else
	{
		wolFunctions[wolFunctions.length] = myFunction;
	}
}


$(function() { //Initialization function, runs when the DOM has loaded
	customInit(); // this will fire off any customized affiliate "load" functions
});

function findPos(obj) { //returns the x & y coordinates of an element
	var curleft = obj.offsetLeft || 0;
	var curtop = obj.offsetTop || 0;
	while (obj = obj.offsetParent) {
		curleft += obj.offsetLeft
		curtop += obj.offsetTop
	}
	return {x:curleft,y:curtop};
}

function customInit() {
	for(var i=0; i < dolFunctions.length; i++)
	{
		eval(dolFunctions[i]);
	}
}

function initLoad(){
	for(var i=0; i < wolFunctions.length; i++)
	{
		eval(wolFunctions[i]);
	}
}
addEvent(window,'load',initLoad);
