 function getCookie(name) {
	var cname = name + "=";
	var dc = document.cookie;
	
	if (dc.length > 0) {
		begin = dc.indexOf(cname);
		if (begin != -1) {
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
				return unescape(dc.substring(begin, end));
		}
	}
	return null;
	
 } // end function


 function setCookie(name, value, expires, path, domain, secure) {

	document.cookie = name + "=" + escape(value) + 
	((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
	((path == null) ? "" : "; path=" + path) +
	((domain == null) ? "" : "; domain=" + domain) +
	((secure == null) ? "" : "; secure");

 } // end function

 var FontSizeMin = 10;
 var FontSizeMax = 14;
 
 function ChangeFontSize(v) {
 
   SitePagesContentAreaObj = document.getElementById("SitePagesContentArea").getElementsByTagName('*');

   for(i=0;i<SitePagesContentAreaObj.length;i++) {
   
       childObj = SitePagesContentAreaObj[i];

       if(childObj.innerHTML != "") {
     
          s = 10;
       
          if(childObj.style.fontSize)
             var s = parseInt(childObj.style.fontSize.replace("px",""));
      
          s = s + v;
       
          if(s >= FontSizeMin && s <= FontSizeMax)
             childObj.style.fontSize = s+"px";
       
       } // end if innerHTML
       
   } // end for
 
 } // end function
 
 function ChangeFontSizeTo(v) {
 
   SitePagesContentAreaObj = document.getElementById("SitePagesContentArea");
   
   if(SitePagesContentAreaObj) {
   
      SitePagesContentAreaObjItems = SitePagesContentAreaObj.getElementsByTagName('*');

      for(i=0;i<SitePagesContentAreaObjItems.length;i++) {
   
          childObj = SitePagesContentAreaObjItems[i];

          if(childObj.innerHTML != "") {

             childObj.style.fontSize = v + "px";

          } // end if innerHTML
       
      } // end for
      
   } // end if
 
 } // end function
 
 
 
 function PagePrint() {
      
   document.getElementById("PrintButton").style.display = "none";

   window.print();
   
   document.getElementById("PrintButton").style.display = "block";

 } // end function


 function RecordsUrlNav(urlpath, pn) {

    urladdress = urlpath + pn;
    
    document.location.href = urladdress;

 } // end function
 
 function ContentBoxDisplay(sitem, action_type) {
 
   oContentBoxID = getCookie("ContentBoxID");
   
   if(oContentBoxID != "" && oContentBoxID != null && oContentBoxID != sitem) {
         
      if(document.getElementById(oContentBoxID))
         document.getElementById(oContentBoxID).style.display = "none";
                  
   } // end if

   
   setCookie("ContentBoxID", sitem);
   
   anObj = document.getElementById(sitem);
      
   if(anObj) {
      
    if(action_type == "0")
       anst = "block";   
    else if(anObj.style.display == "block")
       anst = "none";
    else
       anst = "block";
      
    anObj.style.display = anst;

   } // end if
   
 } // end function

 function ContentBoxStatus(stv) {
 
    setCookie("ContentBoxIDstatus", stv);
 
 } // end function
 


