var fontSize = 100;

function fontsizeup(){
  if ( fontSize <= 175 ) {
    fontSize += 25;
    document.body.style.fontSize = fontSize+'%';
  }
}

function fontsizedown(){
  if ( fontSize >= 50 ) {
    fontSize -= 25;
    document.body.style.fontSize = fontSize+'%';
  }
}

Event.observe(window, 'load', function() {
  if ($('popup_rss')) {
    new Control.Modal('popup_rss',{
      iframe: true,
      width: 400,
      height: 350
    });
  }
  if ($('popup_help')) {
    new Control.Modal('popup_help',{
      iframe: true,
      width: 400,
      height: 350
    });
  }
  if ($('popup_rules')) {
    new Control.Modal('popup_rules',{
      iframe: true,
      width: 400,
      height: 350
    });
  }
  if ($('popup_policy')) {
    new Control.Modal('popup_policy',{
      iframe: true,
      width: 400,
      height: 350
    });
  }  
});

/*function popup(url) {
  var width = 400;
  var height = 350;
  var top = screen.height/4;
  var left = screen.width/4;
  var resizeable = ((navigator.appName.indexOf("Explorer")!=-1) ? 'no' : 'yes');
  feat = 'toolbar=no,location=no,directories=no,status=no,menubar=no,'+
         'scrollbars=no,title=yes,resizable='+resizeable+','+
         'top='+top+',left='+left+',width='+width+',height='+height;
         alert(feat);
  window.open(url,escape(url),feat);
  return false;
}*/

/*function fontsizeup(){active=getActiveStyleSheet();switch(active){case'A--':setActiveStyleSheet('A-');break;case'A-':setActiveStyleSheet('A');break;case'A':setActiveStyleSheet('A+');break;case'A+':break;default:setActiveStyleSheet('A-');break;}}

function fontsizedown(){active=getActiveStyleSheet();switch(active){case'A+':setActiveStyleSheet('A');break;case'A':setActiveStyleSheet('A-');break;case'A-':break;default:setActiveStyleSheet('A-');break;}}

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;}}}

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

function getPreferredStyleSheet(){return('A-');}*/