// Switch Font Size
var fontSizes = new Array();
fontSizes[0] = '12px';
fontSizes[1] = '13px';
fontSizes[2] = '14px';
var currentSize = 0;

function fontBigger() {
   if(currentSize < 2){
      currentSize++;
      document.getElementById('container').style.fontSize = fontSizes[currentSize];
   }
}
function fontSmaller() {
   if(currentSize > 0){
      currentSize--;
      document.getElementById('container').style.fontSize = fontSizes[currentSize];
   }
}

//Additional function for getting url variables into javascript
function getURLVar(urlVarName) {
   //divide the URL in half at the '?'
   var urlHalves = String(document.location).split('?');
   var urlVarValue = '';
   if(urlHalves[1]){
      //load all the name/value pairs into an array
      var urlVars = urlHalves[1].split('&');
      //loop over the list, and find the specified url variable
      for(i=0; i<=(urlVars.length); i++){
         if(urlVars[i]){
             //load the name/value pair into an array
           var urlVarPair = urlVars[i].split('=');
            if (urlVarPair[0] && urlVarPair[0] == urlVarName) {
               //I found a variable that matches, load it's value into the return variable
               urlVarValue = urlVarPair[1];
            }
         }
      }
   }
   var q = urlVarValue;
   q = q.substring(0,q.length);
   for(i=0; i<20; i++){
      q = q.replace(/%20/, " ");
   }
   //for(j=0; j<20; j++){
      //q = q.replace("+", " ");
   //}
   return q;   
}

