function externalLinks() 
{ 
  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";
    }
  } 
}

function goto(url)
{
  window.location.href=url;
}

var newWindow;
function popup(URL,width,height) 
{
	if(!newWindow || newWindow.closed )
	{
		newWindow = window.open(URL, 
                        'script','toolbar=0,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,dependent=yes,width='+width+',height='+height+',left=60,top=60');
    newWindow.focus();
	}
	else
	{
		newWindow.resizeTo(width+12,height+30);
    newWindow.focus();
	}
}

function getroute()
{
	var link = 'pdf/routes/' + document.router.RouteLink.options[document.router.RouteLink.selectedIndex].value;
	window.location = link;
}

function switch_opener(url) {
	self.opener.location.href=url;
	self.opener.focus();
	self.close();
}