





/* misc reusable mambo js */

function dovideo (b,s,w,h)
{
    var box = document.getElementById(b);
    box.innerHTML = '<embed type="application/x-mplayer2" id="mediagluggi" ' +
                    ' name="mediagluggi" src="' +
                    s +
                    '" showstatusbar="1" width="'+w+'" height="'+h+'" autostart="1" showcontrols="1" showtracker="1"></embed>';
}
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}



function pop (path)
{
    var id = Math.round(Math.random()*1000);
    window.open(path, 'popupwindow'+id,'width=800,height=650,scrollbars,resizable');
}



