IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
browsertype = parseInt(navigator.appVersion);

var newWin=null;

function poppit(theUrl,theName,width,height,scroll) {
	
	var scrollVar = "no";
	if (scroll == "1" ) {
		scrollVar = "yes";
	} else {
		scrollVar = "no";
	}
	var _params = "width=" + width + ",height=" + height + ",resizable=no,status=no,scrollbars="+scrollVar;
	
	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (browsertype >= 4) {
		_left = ( (screen.width-width) >>1 );
		_top = ( (screen.height-height) >>1 );
	} else {
		_left = ( (800-width) >>1 );
		_top = ( (600-height) >>1 );
	}
	
	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;
	
	newWin = window.open(theUrl, theName, _params);
	if ( newWin!=null && !(IE && browsertype<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

window.onload = function() {
	registerPopup();
}

function registerPopup() {
	var links = document.getElementsByTagName('a');
	for (var i=0; i<links.length; i++) {
		var link = links[i];
		if ( ( link.getAttribute ( 'href' ) ) && ( link.getAttribute ( 'rel' ) == 'register' ) ) {
			link.onclick = function () {
				poppit(this.href,'register',450,450,0);	
				return false;
			}
		}
	}
}