function toggle_Element(element) {
	if (document.getElementById(element).style.display == 'none') {
		document.getElementById(element).style.display = 'block';
	}
	else {
		document.getElementById(element).style.display = 'none';
	}
}
function getWindowWidth()
{
	if (document.all) return document.body.clientWidth;
	if (document.layers) return innerWidth;
	return 800;
}

function getWindowHeight()
{
	if (document.all) return document.body.clientHeight;
	if (document.layers) return innerHeight;
	return 600;
}

function toggle_Client(id) {
	element = document.getElementById('client'+id);
	if (element.style.display == 'none') {
		element.style.display = 'block';
		document.getElementById('clientBtn'+id).innerHTML='кратко';
	}
	else {
		element.style.display = 'none';
		document.getElementById('clientBtn'+id).innerHTML='подробно';
	}
}



function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
}

is_login_block = false;
step = 4;
loginHeight = 89;
y2 = 118;
y1 = 89;
Opera = document.getElementById && window.opera;

function toggleLoginBlock() {
	if (Opera) document.getElementById("loginBlock").style.display = "block";
	if (is_login_block) {
		if (y1 < loginHeight) {
			y1 += step;
			if (y1 > loginHeight) {
				y1 = loginHeight;
			}
			clip = y1 + "px auto " + y2 + "px auto";
			
			document.getElementById("loginBlock").style.clip = "rect(" + clip + ")";
			document.getElementById("loginBlock").style.marginTop = "-" + y1 + "px";
			setTimeout("toggleLoginBlock()", 25);
		}
		else {
			is_login_block = false;
		}
	}
	else {
		if (y1 > 0) {
			y1 -= step;
			if (y1 < 0 ) {
				y1 = 0;
			}
			clip = y1 + "px auto " + y2 + "px auto";
	
			document.getElementById("loginBlock").style.clip = "rect(" + clip + ")";
			document.getElementById("loginBlock").style.marginTop = "-" + y1 + "px";
			setTimeout("toggleLoginBlock()", 25);
		}
		else {
			is_login_block = true;
			if (Opera) {
				document.getElementById("loginBlock").style.display = "block";
			}
		}
	}
}
