var spelers_l = new Array();
var spelers_r = new Array();

var WedstrijdinfoFunctions = {
	seizoen:	null,
	action:		null,
	teamid:     null,

	poule_box:	null,
	
	last_settings: null,

	load: function(seizoen) { 
		this.seizoen = (seizoen != "") ? seizoen : PageFunctions.getURLParamValue("seizoen");
		this.action = PageFunctions.getURLParamValue("action");
		this.teamid = PageFunctions.getURLParamValue("teamid");

	},

	over_speler_l: function(id) {
		var img_div = $('spelerfotodiv_l');
		var calc_div = $('calc_top_r');
		var pos = WedstrijdinfoFunctions.findPos(calc_div);

		img_div.setStyle( {
			top:  (pos[1] - 60) +  'px',
			left: (pos[0] + 20) +  'px'
		});

		var type = (spelers_l[id] != "") ? spelers_l[id] : "speler";

		var img_obj = "<img src=\"foto.php?action=spelerfoto&type=" + type + "&fotoname=" + id + ".jpg&seizoen={WEDSTRIJD_SEIZOEN}&ratio=60\" style=\"border: 1px solid #143466;\" ID=\"spelerfoto\" NAME=\"spelerfoto\" width=\"240\">";

		img_div.innerHTML = img_obj;
	},

	out_speler_l: function() {
		$('spelerfotodiv_l').innerHTML = "&nbsp;"
	},

	over_speler_r: function(id) {
		var img_div = $('spelerfotodiv_r');
		var calc_div = $('calc_top_l');
		var pos = WedstrijdinfoFunctions.findPos(calc_div);

		img_div.setStyle( {
			top:  (pos[1] - 60) +  'px',
			left: (pos[0] + 10) +  'px'
		});

		var type = (spelers_r[id] != "") ? spelers_r[id] : "speler";

		var img_obj = "<img src=\"foto.php?action=spelerfoto&type=" + type + "&fotoname=" + id + ".jpg&seizoen={WEDSTRIJD_SEIZOEN}&ratio=60\" style=\"border: 1px solid #143466;\" ID=\"spelerfoto\" NAME=\"spelerfoto\" width=\"240\">";

		img_div.innerHTML = img_obj;
	},

	out_speler_r: function() {
		$('spelerfotodiv_r').innerHTML = "&nbsp;"
	},

	findPos: function(obj) {
		return Element.positionedOffset(obj);

		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}
}
			
//setTimeout('TeaminfoFunctions.load(CompetitionFunctions.seizoen)', 200);
