function Open(href, name, pref)
{
    window.open(href, name, pref);
    return void(0);
}

function setImage(id, src)
{
    var obj = document.getElementById(id);
    if(obj) obj.src = src;
}

function displayWindow(url, width, height)
{
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
}

function OpenMMedia(file)
{
	var win = window.open("mmedia.php?file=" + escape(file), null, "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,dependent=yes");
	if(win && win.focus)
	    win.focus();
	return void(0);
}

function ShowMMedia(file)
{
    OpenMMedia(file);
}

function getPosition(el)
{
	for (var lx=0,ly=0;el!=null;
		lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	return {x:lx,y:ly}
}

function SetLanguage(l)
{
    document.setlang.setlanguage.value = l;
    document.setlang.submit();
}

