
lib.event.addListener(window, 'load', popup);

function popup() {
	
	var links = document.getElementsByTagName('A');

	for (var i = 0, j = links.length; i < j; i++ ) {
		
		var sign = links.item(i);
		var rel  = sign.rel;
		
		if ( rel == "faq") {
			sign.onclick = function() { 
			faqWindow = window.open(this, 'answer', 'width = 420, height = 524, toolbar = 0, status = 0, location = 0, scrollbars = no, resizable = yes');
			faqWindow.focus();
			return false;
			}
		}
		else if ( rel == "map") {
			sign.onclick = function() { 
				mapWindow = window.open(this, 'map', 'width = 640, toolbar = 0, status = 0, scrollbars = 1, resizable = 1, directories = 0');
				mapWindow.focus();
				return false;
			}
		}
		else if ( rel == "new") {
			sign.onclick = function() {
				window.open(this, 'picture', 'toolbar = 1, status = 1, location = 1, scrollbars = 1, resizable = 1, directories = 1');
				return false;
			}
		}
		else if ( rel == "close") {
			sign.onclick = function() { window.close(); return false;}
		}
	}
}

