window.onload = function() {  
	if (!document.getElementsByTagName) return;  

	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) {  
		var anchor = anchors[i];  

		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")  
			anchor.target = "_blank";  
			
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "window0") 
			anchor.target = "win000";

		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "window1") 
			anchor.target = "win001";
			
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "window2") 
			anchor.target = "win002";

		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "window3") 
			anchor.target = "win003";
	}  
} 

function openWindow0() {
	window.open("","win000",'width=320,height=240,scrollbars=no');}

function openWindow1() {
	window.open("","win001",'width=660,height=400,scrollbars=yes');}

function openWindow2() {
	window.open("","win002",'width=700,height=550,scrollbars=yes');}
	
function openWindow3() {
	window.open("","win003",'width=645,height=560,scrollbars=no');}
