/*
	popups -
	function to automatically add popup window calls to each link
	with a rev="popup", and add close window links to the popups.
*/

function initPopUp()
{
	if(!window.opener)
	{
		var as,i,popfun
		as=$$("a[rel='popup']");
		for (i=0;i<as.length;i++)
		{
			Element.writeAttribute(as[i], {myHref : as[i].readAttribute('href')});
			Element.writeAttribute(as[i], {href : '#nogo'});
			popfun=function(){window.open(this.readAttribute('myHref'),'','width=900,height=620,left=0,top=0,scrollbars=no,location=no');};
			Element.observe(as[i], 'click', popfun);
		}
	} 
}

