function gOfs(obj){
    var x=0,y=0;
    if(window.opera)
    {
        if(obj.style.position=='absolute')
        {
            x=obj.style.posLeft;
            y=obj.style.posTop;
        }else{
            while (obj.offsetParent)
            {
                x+=obj.offsetLeft;
                y+=obj.offsetTop;
                obj=obj.offsetParent;
            }
        }
    }else if(obj.offsetParent)
    {
        while (obj.offsetParent)
        {
            x+=obj.offsetLeft;
            y+=obj.offsetTop;
            obj=obj.offsetParent;
        }
    }else if (obj.x)
    {
        x += obj.x;
        y += obj.y;

    }
    return {x: x, y: y}
}

function update_calendar(sectid, year, month, day) {
     var c = new ccalendar();
	document.getElementById('calendar_area').innerHTML = '<img src="http://dem-alliance.org/en/ajaxCalendar/macos_loading.gif" alt="loading" />';
     	hCalendar.calendar(sectid, year, month, day);
}