<!--
//
// Copyright (c) Nuno Ferreira
//	Created: 02/09/2007
//	Last modified: 02/09/2007
//
// You're free to use this code, if you:
// - Don't change the source code
// - Maintain this copyright notice
// - Include on your site a notice of this fact
// - Link your site to mine: Nuno Ferreira (www.nuno.net)
//

function Height() {
	var myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && document.documentElement.clientHeight ) {
		myHeight = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myHeight = document.body.clientHeight;
	}
	return myHeight;
}

function divlock(){
	return removebody();
	if (document.getElementById('lckdiv')) {
		lckdiv.style.display='block';
		lckdiv.style.backgroundColor="white";
		lckdiv.style.width='100%';
		lckdiv.style.height=Height()+'px';
		lckdiv.style.zIndex='50';
	}
	else {
		return newdivlock();
	}
	return true;
}

function newdivlock(){
	bdy = document.getElementsByTagName('body')[0];
	if (bdy && bdy.appendChild) {
		newlckdiv = document.createElement('div');
		bdy.appendChild(newlckdiv);
		txt = document.createTextNode(' ');
		newlckdiv.appendChild(txt);
		newlckdiv.style.display="block";
		newlckdiv.style.position="absolute";
		newlckdiv.style.backgroundColor="white";
		newlckdiv.style.top="0px";
		newlckdiv.style.left="0px";
		newlckdiv.style.width="100%";
		newlckdiv.style.height=Height()+'px';
		newlckdiv.style.zIndex="50";
	}
	else {
		return removebody();
	}
	return true;
}

function removebody(){
	document.body.style.display="none";
	document.body.style.visibility="hidden";
	return true;
}

//-->
