function pnewp_detail_disp(id)
{
    new Effect.toggle(id, 'slide', {duration:.8});

}
function pnewp_disp_all(sc, cat, pg, stt)
{
    var scrolly, xScroll, yScroll;
    var id = "allview";

    if (self.pageYOffset) {
        scrolly = self.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollTop){
        scrolly = document.documentElement.scrollTop;
    } else if (document.body) {
        scrolly = document.body.scrollTop;
    }

    if (window.innerHeight && window.scrollMaxY) {
        xScroll = document.body.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){
        xScroll = document.body.scrollWidth;
        yScroll = document.body.scrollHeight;
    } else {
        xScroll = document.body.offsetWidth;
        yScroll = document.body.offsetHeight;
    }

    var windowWidth, windowHeight;
    if (self.innerHeight) {
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) {
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
    }

    if(yScroll < windowHeight){
        pageHeight = windowHeight;
    } else { 
        pageHeight = yScroll;
    }

    if(xScroll < windowWidth){
        pageWidth = windowWidth;
    } else {
        pageWidth = xScroll;
    }

    x = (pageWidth - 20 - 500) / 2 + 'px';
    y = (scrolly + (windowHeight - 35 - 400) / 2) + 'px';

    var url = sc;
    var pars = 
    {
        mode  : 'all',
        cat : cat,
        page : pg,
        st : stt
    };
    var endc = "";
    $(id).style.left = x;
    $(id).style.top = y;

    new Ajax.Updater(id, url, {
        method:'get', 
        parameters: $H(pars).toQueryString(),
        onComplete: function() {
            new Effect.Appear(id, {
                duration:1.0
            });
        }
    });
}
function pnewp_all_close()
{
    id = 'allview';

    new Effect.Fade(id, {
        duration:1.5
    });

    //$('allview').hide();
}

