// JavaScript Document
// JavaScript Document
// browser detection:
var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;

d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );

if (!d.layers){
	dom = ( d.getElementById );
	op = ( nua.indexOf( 'Opera' ) != -1 );
	konq = ( nua.indexOf( 'Konqueror' ) != -1 );
	saf = ( nua.indexOf( 'Safari' ) != -1 );
	moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
	ie = ( d.all && !op );
	ie4 = ( ie && !dom );
	ie5x = ( d.all && dom );
	ie5mac = ( mac && ie5x );
	ie5xwin = ( win && ie5x );
}

var height_correction = 0

if (ie) {
	height_correction = 120;
}
else if (moz){
	height_correction = 100;
}
else if (op){
	height_correction = 80;
}
else if (saf){
	height_correction = 60;
}
else {
	height_correction = 80;
}

var avail_height = screen.availHeight;
var top_space = 0;
rest_space = avail_height - height_correction;
rest_space = rest_space - 610;
if(rest_space > 0){
	top_space = rest_space/2;
}
top_space_divmiddle = top_space + 270;
top_space_divmiddle2 = top_space + 170;
top_space_divmiddle2_height = top_space + 440;
top_space_divbottom = top_space_divmiddle2 + 560;
top_space_divbottom_height = top_space - 100;
if(top_space_divbottom_height < 0){top_space_divbottom_height = 0;}
