// Font Resize 
function switchFont(type, obj)
{
   if (type == 1) {
      document.getElementById("spanSm").innerHTML = "A";
      document.getElementById("spanMd").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(2, 'mediumText')\" rel=\"mediumText\" id=\"textMedium\" class=\"fontswitch\" title=\"medium font\">A</a>";
      document.getElementById("spanLg").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(3, 'largeText')\" rel=\"largeText\" id=\"textLarge\" class=\"fontswitch\" title=\"large font\">A</a>";
   } else if (type == 2) {
      document.getElementById("spanSm").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(1, 'smallText')\" rel=\"smallText\" id=\"textSmall\" class=\"fontswitch\" title=\"small font\">A</a>";
      document.getElementById("spanMd").innerHTML = "A";
      document.getElementById("spanLg").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(3, 'largeText')\" rel=\"largeText\" id=\"textLarge\" class=\"fontswitch\" title=\"large font\">A</a>";
   } else if (type == 3) {
      document.getElementById("spanSm").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(1, 'smallText')\" rel=\"smallText\" id=\"textSmall\" class=\"fontswitch\" title=\"small font\">A</a>";
      document.getElementById("spanMd").innerHTML = "<a href=\"javascript:void(0)\" onclick=\"switchFont(2, 'mediumText')\" rel=\"mediumText\" id=\"textMedium\" class=\"fontswitch\" title=\"medium font\">A</a>";
      document.getElementById("spanLg").innerHTML = "A";
   }
   // var object = obj.getAttribute("rel");
   var i = 1;
   var articleStr; 
	document.getElementById("postbody").className = obj;
	var flag = true;
	while (flag) {
	   try {
	       articleStr = "postbody" + i;
	       i++;
	       document.getElementById(articleStr).className = "postbody " +obj;
	   } catch (e) {
			flag = false;	   
	   }
	}
    return false;
}
