﻿var obj_form=document.frmpage, obj_content=document.getElementById('content'), obj_page=document.getElementById('page'), obj_left=document.getElementById('left'), obj_head=document.getElementById('head'), obj_left=document.getElementById('left'), obj_authentification=document.getElementById('AUTHENTIFICATION_AUTHENTIFICATION'), obj_logout=document.getElementById('__LOGOUT');
function resizePage(){
    var int_top;
    if(obj_page!=null&&obj_content!=null&&obj_head!=null){
        if((obj_content.clientHeight+obj_head.clientHeight)>obj_page.clientHeight)obj_page.style.height=(obj_content.clientHeight+obj_head.clientHeight)+'px';
        if(obj_left!=null)obj_left.style.height=(obj_page.clientHeight-obj_head.clientHeight-2)+'px';
    }
    if(obj_authentification!=null){
        obj_authentification.style.position='absolute';
        int_top=(((obj_page.clientHeight-obj_head.clientHeight-2)-obj_authentification.clientHeight)/2);
        obj_authentification.style.top=(obj_head.clientHeight+(int_top>0?int_top:0))+'px';
        obj_authentification.style.left=(obj_page.offsetLeft+((obj_page.clientWidth-obj_authentification.clientWidth)/2))+'px';
    }
}
function logout(){
    if(obj_form!=null){
		obj_logout.value='1';
        obj_form.onsubmit;
        obj_form.submit();
    }
}
function popup(){
    var arr_param=popup.arguments;
    var str_url=(arr_param.length>0?arr_param[0]:'about:blank'),str_options=(arr_param.length>3?arr_param[3]:'resizable=yes,scrollbars=yes,modal=yes,alwaysRaised=yes,alwaysLowered=yes,dialog=yes,dependent=yes'),str_name=(arr_param.length>4?arr_param[4]:'popup');
    var int_height=(arr_param.length>1?arr_param[1]:720),int_width=(arr_param.length>2?arr_param[2]:600);
    var obj_win=new windows(arr_param[0],int_height,int_width,str_options,str_name,'about:blank');
    obj_win.open();
}
resizePage();
window.onresize=resizePage;