    function doReport(mid, tbop, idop)
    {
        var answer = confirm('Raporteazi acest mesaj? Raportarile nejustificate se penalizeaza!');

        if (answer)
        {
			document.location = "http://www.clopotel.ro/prieteni/pagina.php?action=insert_op&tbl_op=" + tbop + "&id_op=" + idop + "&mid=" + mid;
	    }
	    else
	    {
	        return false;
	    }
    }

    function showCenteredDiv(id, idb, width)
    {
        if(document.getElementById(idb) != null && document.getElementById(id) != null)
        {
            document.getElementById(idb).style.display = 'block';
            document.getElementById(idb).style.width = windowState.getWidth() + 'px';

            document.getElementById(id).style.left = (windowState.getWidth() - width)/2 + 'px';
            document.getElementById(id).style.top = '100px';

            document.getElementById(id).style.display = 'block';
        }

        if(document.getElementById('id_acorda_nota'))
            document.getElementById('id_acorda_nota').style.display = 'none';
    }

    function hideCenteredDiv(id, idb)
    {
       if(document.getElementById(id) != null)
            document.getElementById(id).style.display = 'none';

       if(idb)
            document.getElementById(idb).style.display = 'none';

       if(document.getElementById('id_acorda_nota'))
            document.getElementById('id_acorda_nota').style.display = 'block';
    }

    function showDiv(id, lf, tp, event)
    {
        isIE6 = /msie|MSIE 6/.test(navigator.userAgent);

        if(document.getElementById(id) != null)
        {
            if(isIE6)
            {
                document.getElementById(id).style.position = 'absolute';
                document.getElementById(id).style.left = event.clientX + windowState.getScrollX() + 2 + 'px';
                document.getElementById(id).style.top = event.clientY + windowState.getScrollY() + 2 + 'px';
            }
            else
            {
                document.getElementById(id).style.left = lf + 'px';
                document.getElementById(id).style.top = tp + 'px';
            }

            document.getElementById(id).style.display = 'block';
        }
    }

    function hideDiv(id)
    {
       if(document.getElementById(id) != null)
            document.getElementById(id).style.display = 'none';
    }

    var windowState = (function(){
        var readScroll = {scrollLeft:0,scrollTop:0};
        var readSize = {clientWidth:0,clientHeight:0};
        var readScrollX = 'scrollLeft';
        var readScrollY = 'scrollTop';
        var readWidth = 'clientWidth';
        var readHeight = 'clientHeight';
        function otherWindowTest(obj){
            if((document.compatMode)&&(document.compatMode == 'CSS1Compat')&&(document.documentElement)){
                return document.documentElement;
            }else if(document.body){
                return document.body;
            }else{
                return obj;
            }
        };
        if((typeof this.innerHeight == 'number') && (typeof this.innerWidth == 'number')){
            readSize = this;
            readWidth = 'innerWidth';
            readHeight = 'innerHeight';
        }else{
            readSize = otherWindowTest(readSize);
        }
        if((typeof this.pageYOffset == 'number')&&(typeof this.pageXOffset == 'number')){
            readScroll = this;
            readScrollY = 'pageYOffset';
            readScrollX = 'pageXOffset';
        }else{
            readScroll = otherWindowTest(readScroll);
        }
        return {
            getScrollX:function(){
                return (readScroll[readScrollX]||0);
            },
            getScrollY:function(){
                return (readScroll[readScrollY]||0);
            },
            getWidth:function(){
                return (readSize[readWidth]||0);
            },
            getHeight:function(){
                return (readSize[readHeight]||0);
            }
        };
        })();

    var BoxScrollClass = Class.create({
        currentId:1,
        content_item_no : 5,
        container_length : 200,
        scrolling_content_id : 'scrolling_content',
        duration : 0.4,
        prev_div_id : 'prev_id',
        next_div_id : 'next_id',
        hasNext : function () {
            var no = this.currentId + 1;
            if(no > this.getContentItemNo())
                return false;
            else
                return true;
        },
        hasPrevious : function () {
            var no = this.currentId - 1;
            if(no == 0)
                return false;
            else
                return true;
        },
        setPrevDivId : function(id) {
            if(id != null)
                this.prev_div_id = id;
        },
        getPrevDivId : function() {
            return this.prev_div_id;
        },
        setNextDivId : function(id) {
            if(id != null)
                this.next_div_id = id;
        },
        getNextDivId : function() {
            return this.next_div_id;
        },
        setContainerLength : function(length) {
            if(length != null)
                this.container_length = length;
        },
        getContainerLength : function() {
            return this.container_length;
        },
        setDuration : function (duration) {
            if(duration != null)
                this.duration = duration;
        },
        getDuration : function () {
            return this.duration;
        },
        setScrollingContentId : function (scrolling_content_id) {
            if(scrolling_content_id != null)
                this.scrolling_content_id = scrolling_content_id;
        },
        getScrollingContentId : function () {
            return this.scrolling_content_id;
        },
        setContentItemNo : function (no) {
            if(no != null)
                this.content_item_no = no;
        },
        getContentItemNo : function () {
            return this.content_item_no;
        },
        back : function (event) {
            if(this.hasPrevious())
            {
                document.getElementById(this.getNextDivId()).style.visibility = 'visible';
                new Effect.Move($(this.getScrollingContentId()),{x: this.getContainerLength(), y: 0, duration: this.getDuration(), mode:'relative', queue: 'end'});
                this.currentId--;
                if(this.hasPrevious() == false)
                    document.getElementById(this.getPrevDivId()).style.visibility = 'hidden';
            }
        	Event.stop(event);
        },
        forward : function (event) {
            if(this.hasNext())
            {
                document.getElementById(this.getPrevDivId()).style.visibility = 'visible';
                new Effect.Move($(this.getScrollingContentId()),{x: -this.getContainerLength(), y: 0, duration: this.getDuration(), mode:'relative', queue: 'end'});
                this.currentId++;
                if(this.hasNext() == false)
                    document.getElementById(this.getNextDivId()).style.visibility = 'hidden';
            }
            Event.stop(event);
        }
    });