// JavaScript Document

// UPDATE REL="EXTERNAL" TO TARGET="_BLANK" - XHTML 1.1 STRICT DISALLOWS TARGET

window.addEvent('load', function() {
	var anchors = $$('a');
	for(var i = 0; i < anchors.length; i++) 
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
		{
			anchor.target = "_blank";
			anchor.className = (anchor.className != '') ? anchor.className+' external' : 'external';
		}
		
		if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "popup")
		{
			//alert('set onclick');
			anchor.setAttribute('onclick', 'window.open(this.href, \'faqs\', \'width=450,height=450,location=no,resizable=no,scrollbars=no,status=no,titlebar=no\'); return false;');
			anchor.onclick = function() { 
				window.open(this.href, 'faqs', 'width=450,height=450,location=no,resizable=no,scrollbars=no,status=no,titlebar=no');
				return false;
			}
		}
	}
});
