﻿/* Common javascript functions here */

var min=80;
var max=130;

function increaseFontSize() {
   var p = document.getElementsByTagName('p');          
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("%",""));
      } else {
         var s = 95;
      }
      if(s!=max) {
         s += 10;
      }
      p[i].style.fontSize = s+"%"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("%",""));
      } else {
         var s = 95;
      }
      if(s!=min) {
         s -= 10;
      }
      p[i].style.fontSize = s+"%"
   }   
}


function changeBg() {
    var x=document.getElementsByTagName('body')[0];
    var y=x.classname;
    if (y="home")
    	document.getElementById("footer").style.borderTopColor="#FF009D"; 
    }


function addToFavorites(urlAddress, pageName)  { 
    if (window.external) 
            { window.external.AddFavorite(urlAddress,pageName) 
    } 
        else { alert("Sorry! Your browser doesn't support this function."); 
    } 
}