//THIS FUNCTION OPENS A WINDOW WITHOUT A SCROLLBAR AND RESIZABLE WINDOW
function open_window(file_name, window_name, window_width, window_height)
{
	my_window = window.open(file_name, window_name, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+window_width+',height='+window_height+',left=0,top=0');
	my_window.focus();
}

//THIS FUNCTION OPENS A WINDOW WITH A SCROLLBAR ONLY
function open_window2(file_name, window_name, window_width, window_height)
{
	my_window = window.open(file_name, window_name, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+window_width+',height='+window_height+',left=0,top=0');
	my_window.focus();
}

//THIS FUNCTION OPENS A WINDOW WITH A SCROLLBAR AND RESIZABLE WINDOW
function open_window3(file_name, window_name, window_width, window_height)
{
	my_window = window.open(file_name, window_name, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+window_width+',height='+window_height+',left=0,top=0');
	my_window.focus();
}

//THIS FUNCTION OPENS A WINDOW FOR REL="EXTERNAL" LINK
function open_window_xhtml()
{
	//BROWSER DOES NOT SUPPORT THIS TAG
	if(!document.getElementsByTagName)
	{
		return;
	}
	
	//RETRIEVE LIST OF ANCHOR TAGS
	anchors = document.getElementsByTagName("a");
	
	//UPDATE ANCHOR TAGS
	for(counter = 0; counter < anchors.length; counter ++)
	{
		anchor = anchors[counter];
				
		//REPLACE REL="EXTERNAL" WITH TARGET _BLANK
		if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
		{
			anchor.target = "_blank";
		}
	}
}

//REPLACE ALL REL="EXTERNAL" LINKS
window.onload = open_window_xhtml;