// ----------------------------------------------------------------
function MM_findObj(n, d) { //v4.01
var p,i,x;
	if (!d) d = document; 
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p+1)].document; 
		n = n.substring(0,p);
	}
	if (!(x = d[n]) && d.all) x = d.all[n];
	for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n,d.layers[i].document);
	if (!x && d.getElementById) x = d.getElementById(n); 
	return x;
}
// ----------------------------------------------------------------
function showVisu( ev ) {	
var o, sSrc, sWidth, sHeight, sLegende;

	if ( document.all ) {
		o = ev.srcElement;
	} else { 
		o = ev.target;
	}

	sSrc = o.getAttribute( "Xsrc" );
	sWidth = o.getAttribute( "Xwidth" );
	sHeight = o.getAttribute( "Xheight" );
	sCredit = o.getAttribute( "Xcredit" );
	sLegende = o.getAttribute( "Xlegende" );
	sCommentaire = o.getAttribute( "XCommentaire" );

	sWidth = (parseInt( sWidth)+12);
	sHeight = (parseInt( sHeight )+ 172);

	var sHttp = "/ln_ee/futbol/mundial/2006/visu-wc2006.php?visu=" + sSrc + "&credit=" + sCredit + "&legende=" + sLegende + "&commentaire=" + sCommentaire;
	var sPrefs = "directories=no,fullscreen=no,center=yes,help=no,status=no,scrollbars=no,";
	sPrefs += "resizable=no,titlebar=0,menubar=no,location=no,";
	sPrefs += "width=" + sWidth + ",";
	sPrefs += "height=" + sHeight + ",";
	sPrefs += "top=" + ( parseInt( screen.availHeight /2 ) - parseInt( sHeight )/2) + ",";
	sPrefs += "left=" + ( parseInt( screen.availWidth /2 ) - parseInt( sWidth )/2);

	window.open( sHttp, "AFPVisual", sPrefs );
}
// ----------------------------------------------------------------
function SetIFrameHeight(o){
var h = 100;
var d = frames[o.name].document;

	if (d.body.scrollHeight != undefined)
		h = d.body.scrollHeight;
	else if (d.height != undefined)
		h = document.height;

	if (d.body.currentStyle) {
		var cS = d.body.currentStyle;
		h += parseInt(cS.marginTop, 10),
		h += parseInt(cS.marginBottom, 10);
	} else if (window.getComputedStyle) {
		h += parseInt(window.getComputedStyle(d.body,"").getPropertyValue("margin-top"),10);
		h += parseInt(window.getComputedStyle(d.body,"").getPropertyValue("margin-bottom"),10);
	}
	o.height = h + "px";
} 
// ----------------------------------------------------------------