
/* --------------------------------------------------- */
/* POP-UP WINDOW */
/* --------------------------------------------------- */
function openwin(URL,theHeight,theWidth,addScroll) {
	var nXpos = (screen.availWidth - theWidth) / 2; 
	var nYpos = (screen.availHeight - theHeight) / 2; 
	var win = window.open(URL, 'popupWin', 'top=' + nYpos + ',left=' + nXpos + ',screenY=' + nYpos + ',screenX=' + nXpos + ',height=' + theHeight + ',width=' + theWidth + 'toolbar=0,scrollbars=' + addScroll + ',location=0,statusbar=0,menubar=0');
	win.focus();
}


/* --------------------------------------- */
/* OPEN EXTERNAL LINKS IN NEW WINDOW - XHTML COMPLIANT */
/* --------------------------------------- */
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"; 
 } 
}
//window.onload = externalLinks;



/* --------------------------------------------------- */
/* ACTIVATE SUB-LINK */
/* --------------------------------------------------- */
function showSubOn(theId, whichColor) {
	var divId = document.getElementById(theId);
	divId.className = 'subopt ' + whichColor;
}
