


function hide(div) {
    document.getElementById(div).style.display="none";
}

function hide_div(blok) {
    document.getElementById(blok).style.display="none";
}

function show_div(blok) {
    document.getElementById(blok).style.display="";
}

function show(div) {
    document.getElementById(div).style.display="block";
}

function show_image(image) {
    window.open(image, 'Image', 'location=no, directories=no, status=no,menubar=no');
}

function cnf_action(message) {
    if(confirm(message)) {
        return true;
    } else {
        return false;
    }
}

function nameEdit()
{
    show('name_inp');
    hide('name_txt');
}

function nameSaveNo()
{
    hide('name_inp');
    show('name_txt');
}

function openPopUp(url,windowName)
{
    window.open(url,windowName,'scrollbars=yes,menubar=no,status=no,location=no,top=50,left=50,width=760,height=500,resizable=no');
}


var TOP_OFFSET  = 180;
var tobj        = false;
var WXY         = [0,0];

function init_login() {
    WXY = getWindowXY(); 
    var objx = false;
    if(objx = document.getElementById('top_wrapper')){
        var h                           = objx.style.height ;
        objx.style.marginTop            = (Math.round((WXY[1] - h)/2) - TOP_OFFSET) + 'px';
        objx.style.MozOpacity		= 1;
        objx.style.filter               = 'alpha(opacity=40)';
        tobj                            = objx;
        tobj.style.display              = "block";
        //if(!window.opera) {
            login_form_animation(0, 25);
        //}
    } //if
} //init_login()

function login_form_animation(cnt, time) {
    if(cnt<25){
        if(tobj) {
            //alert(cnt);
            cnt++;
            opacity = cnt*4;
            tobj.style.MozOpacity       = opacity/100;
	    tobj.style.filter           = 'Alpha(Opacity=100)';
            setTimeout('login_form_animation('+cnt+','+time+')', time);
        }
    }
    else return true;
} //login_form_animation()



function getWindowXY() {
    wx = 0;
    wy = 0;
    if(self.innerWidth){
	wx = self.innerWidth;
	wy = self.innerHeight;
    }
    else if(document.documentElement.clientWidth){
	wx = document.documentElement.clientWidth;
	wy = document.documentElement.clientHeight;
    }
    else if(document.body){
	wx = document.body.clientWidth;
	wy = document.body.clientHeight;
    }
    return [wx, wy];
} //getWindowXY()


