// 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 = 180;
}
else if (moz){
	height_correction = 140;
}
else if (op){
	height_correction = 80;
}
else if (saf){
	height_correction = 80;
}
else {
	height_correction = 80;
}


var avail_height = screen.availHeight;
var avail_width = screen.availWidth;
var top_space = 15;
var left_space = 15;

rest_space = avail_height - height_correction;
rest_space = rest_space - 700;
if(rest_space > 15){
	top_space = rest_space/2;
}

rest_space_horz = avail_width - 30;
rest_space_horz = rest_space_horz - 920;
if(rest_space_horz > 30){
	left_space = rest_space_horz/2;
}

