// JavaScript Document
var documentOverlay = {
    show: function() {
        // ---------------------
        // STUFF YOU CAN CHANGE:
        var color = 'black'; // SET THE COLOR HERE (IT CAN BE A HEX COLOR e.g. #FF00FF)
        var opacity = 0.7; // SET AN OPACITY HERE - MUST BE BETWEEN 0 AND 1
        // ---------------------
        // DON'T TOUCH ANYTHING FROM HERE ONWARDS
        // ---------------------
        var o = document.getElementById('doc_overlay');
        if(!o) {
            var o = document.createElement('div');
            o.id = "doc_overlay";
            documentOverlay.style(o,{
                position: 'absolute',
                top: 0,
                left: 0,
                width: '100%',
                height: documentOverlay.getDocHeight()+'px',
                background: color,
                zIndex: 1000,
                opacity: opacity,
                filter: 'alpha(opacity='+opacity*100+')'
            });
            document.getElementsByTagName('body')[0].appendChild(o);
        } else {
            documentOverlay.style(o,{background:color||'#000',display:'block'});
        }
    },
    hide: function() {
        var o = document.getElementById('doc_overlay');
        o.style.display = 'none';
    },
    style: function(obj,s) {
        for ( var i in s ) {
            obj.style[i] = s[i];
        }
    },
    getDocHeight: function() {
        var Y,YT;
        if( self.innerHeight ) {Y = self.innerHeight;}
        else if (document.documentElement && document.documentElement.clientHeight) {Y = document.documentElement.clientHeight;} 
        if( document.body ) {YT = document.body.clientHeight;}
        if(YT>Y) {Y = YT;}
        return Y;
    }
}

function show2(name) {
	var name;
	myleft = (screen.width)?(screen.width-500)/2:100;
	mytop = (screen.height)?(screen.height-600)/2:100;
	document.getElementById(name).style.display = "block";
	document.getElementById(name).style.top = "50%";
	document.getElementById(name).style.left = "50%";
	document.getElementById(name).style.zIndex = 1020;
	document.getElementById(name).style.backgroundColor = "#ffffff";
	document.getElementById(name).style.position = "absolute";
	document.getElementById(name).style.margin = "-200px auto auto -250px";
/*	position:absolute; top:50%; left:50%; margin:-50px auto auto -100px;*/
}

function hide2() {
	documentOverlay.hide();
	document.getElementById('content1').style.display = 'none';
	document.getElementById('content2').style.display = 'none';
	document.getElementById('content3').style.display = 'none';
	document.getElementById('content4').style.display = 'none';
}
