function popupWindow(url,width,height,scroll) {
	var popUpWin = 0;

	if (scroll==null) scroll=false;

	if(popUpWin) {
		if(!popUpWin.closed) popUpWin.close();
	}

	var left = (screen.width/2) - width/2;
  	var top = (screen.height/2) - height/2;
  	var scrolling = (scroll)?'yes':'no';

	popUpWin = open(url, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrolling+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	popUpWin.focus();
}

function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
   return false;
}