$(document).ready(function() {
    autoScroll();
    $(window).wresize(autoScroll);
    
});
function autoScroll() {
    var width = window.parent.innerWidth ? window.parent.innerWidth : $("html", window.parent.document).outerWidth(true)-5;
    var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
    var fleft = $("#fleft", window.parent.document).css("display")=="none"?0:$("#fleft", window.parent.document).outerWidth(true);
    var fcenter = $("#fcenter", window.parent.document).css("display") == "none" ? 0 : $("#fcenter", window.parent.document).outerWidth(true);
    $("#main").width(width - fleft - fcenter);
    $("#main").height((height - $(".location").outerHeight(true) - $(".controlmenu").outerHeight(true) - $(".pagenavigation").outerHeight(true))-2);
}
/**
function doAdd() {
    mybox = $.weeboxs.open('/admin/addMessages', { contentType: 'ajax', title: '新增站內訊息', width: 380, type: 'dialog', divWidth: 1, showButton: false });
}
**/
function register() {
    $.weeboxs.open("/indexaction/goregister",{ contentType: 'ajax', title: '免費註冊澳門虛擬圖書館會員 ', width: 480, type: 'dialog', divWidth: 1, showButton: false });
}
function loginBox(){
	$.weeboxs.open("/indexaction/doLogin",{ contentType: 'ajax', title: '登錄 ', width: 480, type: 'dialog', divWidth: 1, showButton: false });
}
