/* redirect incompatible browser versions and/or types.
   checking for version 3 or less and webtv */
function checkbrow(){
var agt = navigator.userAgent.toLowerCase(); 
	if ((navigator.appVersion.charAt(0) < 4) || (agt.indexOf('webtv') != -1)) {
		window.location="/upgrade.asp";
	}
}	 
checkbrow();

//browser status bar
window.defaultStatus = 'Gilroy McMahon Architects, Dublin, Ireland';

//////////////////////////////////global nav layer swapping

// DETECT BROWSER DOM
var isIE = (document.all) ? true : false;
var isNS4 = (document.layers) ? true:false;
var isNS6 = (document.getElementById && !document.all) ? true : false;
// ASSIGN BROWSER DOM DIFFERENCES
if (isNS4) {
	doc = 'document.layers["';
	sty = '"]';
} else if(isIE) {
  doc = "document.all.";
  sty = ".style";
} else if (isNS6) {
	doc = "document.getElementById('";
  sty = "').style";
}
// GLOBAL VARIABLES
var over = 'no';
var theDiv = '';

// turns previous layer off if any and then turns current layer on (visible)
function on(pic) {
	over = 'yes';
 	if (theDiv != '') {
		eval(doc + theDiv + sty + '.visibility = "hidden"');
  }
  eval(doc + pic + sty + '.visibility = "visible"');
  theDiv = pic;
}
// the reverse of on(). Turns the div called 'theDiv' to hidden (off)
function off()	{
	if (over == 'no')  {
		eval(doc + theDiv + sty + '.visibility = "hidden"');
	}
}

// called by onmouseout event handle on images that popup rollovers
// sets over to no and begins the timeout. theDiv is used by on
// so the next div/layer knows which previous div/layer to turn off (hide)
function overChecker(pic) {
	theDiv = pic;
	over = 'no';
	setTimeout("off()", 400);
}
//////////////////////////////////end layer swapping functions


/////////////////////////////////NEW WINDOW POP-UP
//paul.s modified 05.07.2002
function newWindow(url, height, width) {
	var nameW='x';
	var myWin = "";
	var xTop = (screen.width) ? (screen.width-width)/2 : 0;
	var yTop = (screen.height) ? (screen.height-height)/2 : 0;		
	var myWin = window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=1,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
 myWin.focus();
}

