function print_version()
{
	window.print();
}

// Function for increasing/decreasting font size on page

var min=8;
var max=18;

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("px",""));
      } else {
 
         var s = 12;
      }
      if(s!=max) {
 
         s += 1;
      }
      p[i].style.fontSize = s+"px"
 
   }
}
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("px",""));
      } else {
 
         var s = 12;
      }
      if(s!=min) {
 
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
 
   }
}

// New function for bookmarking website

 function CreateBookmarkLink() {

 title = "The Leone Center for Orthopedic Care"; 

 url = "http://bpdadver.nextmp.net/leone/";

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }
 
 // Google analytics

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18431670-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

  // New bookmarking function
  
  function BookMark() {
	title = document.title;
	url = document.location.href;
	alerttext = 'Press Control + D to bookmark';
	worked = false;
	alerted = false;
	try{
		window.sidebar.addPanel(title, url,"");
		worked = true;
	}catch(err){if(!worked && !alerted){alert(alerttext);alerted=true;}}
	try{
		window.external.AddFavorite(url, title);
		worked = true;
	}catch(err){if(!worked && !alerted){alert(alerttext);alerted=true;}}
	try{
		window.external.AddFavorite(title, url,"");
		worked = true;
}	catch(err){if(!worked && !alerted){alert(alerttext);alerted=true;}}

	if(!worked && !alerted){
		alert(alerttext);
	}
}
