/*
 özel alert kutusu
*/
function myAlert(msg)
{
    var S = getAllSizes();
    var w = S.pageWidth;
    var h = S.pageHeight;

    // Internet Explorer ise...
    if( $.browser.msie )
        w = S.pageWidth;

    $('<div id="myAlert"></div>')
        .appendTo( $('body') )
        .css({
            position: 'absolute',
            top: '0px',
            left: '0px',
            width: w,
            height: h,
            backgroundColor: '#000',
            opacity: 0.4
        });

    alert(msg);

    $('div#myAlert').remove();
}


// getAllSizes()
// quirksmode.org'dan alınmıştır
//
function getAllSizes() 
{
    var scrollX,scrollY,windowX,windowY,pageX,pageY;

    if (window.innerHeight && window.scrollMaxY) {    
        scrollX = document.body.scrollWidth;
        scrollY = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
        scrollX = document.body.scrollWidth;
        scrollY = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
        scrollX = document.body.offsetWidth;
        scrollY = document.body.offsetHeight;
    }

    if (self.innerHeight) {    // all except Explorer
        windowX = self.innerWidth;
        windowY = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
        windowX = document.documentElement.clientWidth;
        windowY = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
        windowX = document.body.clientWidth;
        windowY = document.body.clientHeight;
    }

    pageY = (scrollY < windowY) ? windowY : scrollY; // for small pages with total height less then height of the viewport
    pageX = (scrollX < windowX) ? windowX : scrollX; // for small pages with total width less then width of the viewport

    return {pageWidth:pageX, pageHeight:pageY, winWidth:windowX, winHeight:windowY};
}
