

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

var min=11;
var max=23;

function increaseFontSize() {
   var detail = document.all.details4;

      if(detail.style.fontSize) {
         var s = parseInt(detail.style.fontSize.replace("px",""));
      } else {
         var s = 11;
      }
      if(s<max) {
         s += 4;
      }
      detail.style.fontSize = s+"px"
      document.cookie = "fontsize="+s;
   
}

function decreaseFontSize() {

   var detail = document.all.details4;

    if(detail.style.fontSize) {
         var s = parseInt(detail.style.fontSize.replace("px",""));
      } else {
         var s = 11;
      }
      if(s>min) {
         s -= 4;
      }
      detail.style.fontSize = s+"px"
      document.cookie = "fontsize="+s;

}

function switchWhite() {
   var detail = document.all.details4;
       
   detail.style.backgroundColor = "#FFFFFF";
   detail.style.color = "#000000";  
   document.cookie = "scheme=WHITE";  
 
}

function switchBlack() {

   var detail = document.all.details4;
       
   detail.style.backgroundColor = "";
   detail.style.color = "#ffffff";  
   document.cookie = "scheme=BLACK";
 

}


function getCookie(name) { 
  var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); 
}




// CONTROLLER

var size = getCookie('fontsize');
var scheme = getCookie('scheme');

var detail = document.all.details4;
       
if (size && (size >= min) && (size <= max)) {
   detail.style.fontSize=size;


if (scheme == 'BLACK') {

  detail.style.backgroundColor = "";
  detail.style.color = "#ffffff";  
 

} else if (scheme == 'WHITE') {
  detail.style.backgroundColor = "#FFFFFF";
  detail.style.color = "#000000";  
}
 

}