function getwindowHeight() {
	if (document.documentElement) {
		return document.documentElement.clientHeight;
	}
	else if (isExp && document && document.body && document.body.clientHeight) {
		return document.body.clientHeight;
	}
	else if ((isNav || isW3C || isOpera) && window && window.innerHeight) {
		return window.innerHeight;
	} else {
		return false;
	}
}



function getwindowWidth() {
	if (document.documentElement) {
		return document.documentElement.clientWidth;
	}
	else if (isExp && document && document.body && document.body.clientWidth) {
		return document.body.clientWidth;
	}
	else if ((isNav || isW3C || isOpera) && window && window.innerWidth) {
		return window.innerWidth;
	} else {
		return false;
	}
}


function Showlayer(which,how) {
isNav=false;
isW3C=false;
isExp=false;
isOpera=false;
isNOT=false;
isMac=false;
isIEM=false;

// Detect browser and define pre/suf-fixes
browser=navigator.appName;
version=navigator.appVersion;
Vmajor=parseInt(navigator.appVersion);
Vminor=parseFloat(navigator.appVersion);

if (browser=="Netscape") {
	if (Vmajor==4)
	{
		isNav=true; pre='layers.'; suf='';
		if (Vminor > 4.08 ) window.captureEvents(Event.RESIZE);	// handle the resize bug on NN
	}
	else if (Vmajor==5)	isW3C=true;
	else isNOT=true;
}
else if (browser=="Microsoft Internet Explorer") {
	
	if ( version.indexOf('MSIE 5.0; Macintosh;') != -1 )  {
		isExp=true;
		pre='all.';
		suf='.style';
	}
	// IE 4 to 5.5 return 4 as the version
	else if ( (Vmajor==4) ) {
		isExp=true;
		pre='all.';
		suf='.style';
	}
	else isNOT=true;
}
else if (browser=="Opera") {
	if (Vmajor==4) isOpera=true;
	else isNOT=true;
}

	if (isNav || isExp) {
		eval ('document.'+pre+which+suf+'.visibility="'+how+'"');
		return;
	}
	else if (isW3C || isOpera) {
		obj=document.getElementById(which);
		obj.style.visibility=how;
	}
}


function pop_ab(theURL) {
var startx = top.Marginleft.x;
var x = startx+150;
var y = (screen.height-300)/2;
var popup=window.open(theURL,'ab','width=700, height=300, left='+x+',top='+y+',toolbar=0,status=0, menubar=0,scrollbars=1');
popup.focus();
}


function checkAbSpecs() {
missinginfo = ""
checkform = document.abspecsform;
if ( (checkform.first_name.value == "") && (checkform.last_name.value == "") && (checkform.university.value == "") && (checkform.city.value == "") && (checkform.country.value == "") && (checkform.keywords.value == "") ) {
missinginfo += "You must enter at least one value to search for!";
}
if (missinginfo != "") {
alert(missinginfo);
return false;
}
else return true;
}


