function __getBrowserSize()
{
	var bodyWidth = document.documentElement.clientWidth;
	var bodyHeight = document.documentElement.clientHeight;
	
	var bodyWidth, bodyHeight; 
	if (self.innerHeight){ // all except Explorer 
	 
	   bodyWidth = self.innerWidth; 
	   bodyHeight = self.innerHeight; 
	}  else if (document.documentElement && document.documentElement.clientHeight) {
	   // Explorer 6 Strict Mode 		 
	   bodyWidth = document.documentElement.clientWidth; 
	   bodyHeight = document.documentElement.clientHeight; 
	} else if (document.body) {// other Explorers 		 
	   bodyWidth = document.body.clientWidth; 
	   bodyHeight = document.body.clientHeight; 
	} 
	return [bodyWidth,bodyHeight];
	
}
var brSize = __getBrowserSize();
var bodyWidth = brSize[0];
var bodyHeight = brSize[1];
$(document).ready(function() {
    jQuery('#addBox, #addBox1').click(function() {
        //$(window).scrollTop();
        var st = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
        var left = Math.ceil((bodyWidth - document.getElementById('addNewbox2').offsetWidth - 725) / 2) + 'px';
        var top = Math.ceil((bodyHeight - document.getElementById('addNewbox2').offsetHeight - 250) / 2) + st + 'px';
        jQuery.blockUI({
            message: $('#addNewbox2'),
            css: {
                border: 'none',
                padding: '0',
                backgroundColor: 'transparent',
                color: '#000',
                position: 'absolute',
                top: top,
                left: left
            }
        });
    });
    $.get('/member/login', function(data) {
        $('#addNewbox2').html(data);
    });
});
