      <!--
      function isEmpty(str)
      {
         var whitespace="\t\n\r ";
         if((str==null) || (str.length==0))
         	return true;
         for(i=0; i<str.length; i++)
         {
         	var c = str.charAt(i);
         	if(whitespace.indexOf(c) == -1)  //indexOf returns -1 if it cannot find the character
         		return false;
         }
         return true;
      }            
      
      function validateLogin()
      {
         if(isEmpty(document.loginForm.user.value))
         {  
            alert('A username is required!');
            document.loginForm.user.focus();
            return false;
         }
         if(isEmpty(document.loginForm.pass.value))
         {  
            alert('A password is required!');
            document.loginForm.pass.focus();
            return false;
         }
         return true;
      }
      
      function validateLogout(idNum)
      {
         var temp = 0; 
      	var xmlhttp=null
      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="userLogout.php";
         url=url+"?id="+idNum;
         url=url+"&sid="+Math.random();
      
         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
               
            }
            else
            {
               return true;
               alert('Logout failed');
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function trim (myString)
      {
         return myString.replace(/^\s+|\s+$/g,"");
      }
      function validateRmEventForm(e_id)
      {
         var id = e_id;
         ans = confirm("Are you sure? This event will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmEvent.php";
            url=url+"?id="+e_id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Event delete cancelled!');
            return false;
         }    
      }
      function cImgHandler()
      {

         if(document.rccForm.ch1.checked == true)
         {  
            var url = "cchangeContent.php?img=yes&s2t="+document.rccForm.sec2title.value;
            url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value;
            window.location.href(url);
         }
         else
         {
            var url = "cchangeContent.php?img=no&s2t="+document.rccForm.sec2title.value;
            url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value;
            window.location.href(url);
         }
         return true;
      }
      
      function previewCCC()
      {
         
         if (document.rccForm.ch1.checked == true)
         {
            var w = document.rccForm.imgSel.selectedIndex;
      
            var url = "cchangeContent.php?img=yes&s2t="+document.rccForm.sec2title.value;
            url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value;
            url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
         }
         else
         {
            var url = "cchangeContent.php?s1t="+document.rccForm.sec2title.value;
            url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value+"&s1c="+document.rccForm.sec1content.value;
         }
                  
         window.location.href(url);
         
         return true;
      }

      function validateCCCForm()
      {
         var answer = confirm("Are you sure?  Any changes made will overwrite the current content.");
         if (answer)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}

         	
         	if (document.rccForm.ch1.checked == true)
         	{
               var w = document.rccForm.imgSel.selectedIndex;
               var url="updateCCC.php";
               url=url+"?id="+document.rccForm.userID.value;
               url=url+"&s1t="+document.rccForm.sec1title.value;
               url=url+"&s2t="+document.rccForm.sec2title.value;
               url=url+"&s2c="+document.rccForm.sec2content.value;
               url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
               url=url+"&sid="+Math.random();

            }
            else
            {
               var url="updateCCC.php";
               url=url+"?id="+document.rccForm.userID.value;
               url=url+"&s1t="+document.rccForm.sec1title.value;
               url=url+"&s1c="+document.rccForm.sec1content.value;
               url=url+"&s2t="+document.rccForm.sec2title.value;
               url=url+"&s2c="+document.rccForm.sec2content.value;
               url=url+"&sid="+Math.random();
            }
               
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
                  
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert("Content change cancelled");
            return false;
         }    
      }
       function validateCalendarForm()
      {
      
         if(isEmpty(document.calForm.title.value))
         {  
            alert('An event title is required!');
            document.calForm.title.focus();
            return false;
         }
         if(isEmpty(document.calForm.loc.value))
         {  
            alert('An event location is required!');
            document.calForm.loc.focus();
            return false;
         }
         return true;
      }
      
      function setDays() 
      {
          
         removeAllOptions(document.calForm.day);

         if (
            (document.calForm.month.value == "1") ||
            (document.calForm.month.value == "3") ||
            (document.calForm.month.value == "5") ||
            (document.calForm.month.value == "7") ||
            (document.calForm.month.value == "8") ||
            (document.calForm.month.value == "10") ||
            (document.calForm.month.value == "12")) {
           
           var i;
           for (i=1; i<=31; i++)
           {  
              addOption(document.calForm.day,i, i);
           }
              
         }
         else if (document.calForm.month.value == "4" ||
                  document.calForm.month.value == "6" ||
                  document.calForm.month.value == "9" ||
                  document.calForm.month.value == "11") {
             
              var i;
              for (i=1; i<=30; i++)
              {  
                 addOption(document.calForm.day,i, i);
              }
         }
         else
         {
              var i;
              for (i=1; i<=28; i++)
              {  
                 addOption(document.calForm.day,i, i);
              }
         }
         return;   
      }
      function addOption(selectbox, value, text ) {
      	var optn = document.createElement("OPTION");
      	optn.text = text;
      	optn.value = value;

      	selectbox.options.add(optn);
      }
      function removeAllOptions(selectbox)
      {
      	var i;
      	for(i=selectbox.options.length-1;i>=0;i--)
      	{
      		//selectbox.options.remove(i);
      		selectbox.remove(i);
      	}
      }
      function docImgHandler()
      {

         if(document.documentForm.nf.checked == true)
         {  
            var url = "editDocument.php?did="+document.documentForm.d_id.value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = "editDocument.php?did="+document.documentForm.d_id.value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      function validateDocumentForm()
      {  
         if(isEmpty(document.documentForm.title.value))
         {  
            alert('A title is required!');
            document.documentForm.title.focus();
            return false;
         }
         if(isEmpty(document.documentForm.desc.value))
         {  
            alert('A description is required!');
            document.documentForm.desc.focus();
            return false;
         }
         return true;
      }
      function eventImgHandler()
      {
         if(document.editEventForm.nf1.checked == true)
         {  
            var url = "editEvent.php?eid="+document.editEventForm.e_id.value+"&uid="+document.editEventForm.u_id.value+"&nf1=yes";
            window.location.href(url);
         }
         else
         {
            var url = "editEvent.php?eid="+document.editEventForm.e_id.value+"&uid="+document.editEventForm.u_id.value+"&nf1=no";
            window.location.href(url);
         }
         return true;
      }
      function validateEditEventForm()
      {  
         if(isEmpty(document.editEventForm.title.value))
         {  
            alert('A title is required!');
            document.editEventForm.title.focus();
            return false;
         }
         if(isEmpty(document.editEventForm.loc.value))
         {  
            alert('A location is required!');
            document.editEventForm.loc.focus();
            return false;
         }
         return true;
      }
      function histImgHandler()
      {

         if(document.historyForm.nf.checked == true)
         {  
            var url = "editHistory.php?hid="+document.historyForm.h_id.value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = "editHistory.php?hid="+document.historyForm.h_id.value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      function validateHistoryForm()
      {  
         if(isEmpty(document.historyForm.title.value))
         {  
            alert('A title is required!');
            document.historyForm.title.focus();
            return false;
         }
         if(isEmpty(document.historyForm.desc.value))
         {  
            alert('A description is required!');
            document.historyForm.desc.focus();
            return false;
         }
         return true;
      }
      function validateEditImgForm()
      {
         ans = confirm("Are you sure?");
         if (ans)
         {
            var w = document.editImgForm.imgSel.selectedIndex;
         
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="updateImage.php";
            url=url+"?id="+document.editImgForm.img_id.value;
            url=url+"&it="+document.editImgForm.imgTitle.value;
            url=url+"&iy="+document.editImgForm.imgSel.options[w].value;
            url=url+"&cn="+document.editImgForm.imgCN.value;
            url=url+"&sn="+document.editImgForm.imgSN.value;
            url=url+"&pb="+document.editImgForm.imgPB.value;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Change cancelled!');
            return false;
         }    
      }
      function editListNav()
      {
         var w = document.editSCForm.List.selectedIndex;
         var url_add = document.editSCForm.List.options[w].value;
         window.location.href = url_add;
      }
      function newsImgHandler()
      {

         if(document.newsForm.nf.checked == true)
         {  
            var url = "editNews.php?hid="+document.newsForm.h_id.value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = "editNews.php?hid="+document.newsForm.h_id.value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      function validateNewsForm()
      {  
         if(isEmpty(document.newsForm.title.value))
         {  
            alert('A title is required!');
            document.newsForm.title.focus();
            return false;
         }
         return true;
      }
      function validatePlanningForm()
      {
      
         if(isEmpty(document.editPlanningForm.title.value))
         {  
            alert('A title is required!');
            document.editPlanningForm.title.focus();
            return false;
         }
         if(isEmpty(document.editPlanningForm.desc.value))
         {  
            alert('A description is required!');
            document.editPlanningForm.desc.focus();
            return false;
         }
         return true;
      }
      function planImgHandler()
      {

         var x = document.editPForm.projSel.selectedIndex;
         if(document.editPlanningForm.nf.checked == true)
         {  
            var url = document.editPForm.projSel.options[x].value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = document.editPForm.projSel.options[x].value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      
      function projNav()
      {
         var w = document.editPForm.projSel.selectedIndex;
         var url_add = document.editPForm.projSel.options[w].value;
         window.location.href = url_add;
      }
      function scNav()
      {
         var w = document.editSCForm.List.selectedIndex;
         var url_add = document.editSCForm.List.options[w].value;
         window.location.href(url_add);
      }
      function editUserAllCheck()
      {
         if(document.editUserForm.ch16.checked == true)
         {
            document.editUserForm.ch1.checked = true;
            document.editUserForm.ch2.checked = true;
            document.editUserForm.ch3.checked = true;
            document.editUserForm.ch4.checked = true;
            document.editUserForm.ch5.checked = true;
            document.editUserForm.ch6.checked = true;
            document.editUserForm.ch7.checked = true;
            document.editUserForm.ch8.checked = true;
            document.editUserForm.ch9.checked = true;
            document.editUserForm.ch10.checked = true;
            document.editUserForm.ch11.checked = true;
            document.editUserForm.ch12.checked = true;
            document.editUserForm.ch13.checked = true;
            document.editUserForm.ch14.checked = true;
            document.editUserForm.ch15.checked = true;
            document.editUserForm.ch16.checked = true;
         }
         if(document.editUserForm.ch16.checked == false)
         {
            document.editUserForm.ch1.checked = false;
            document.editUserForm.ch2.checked = false;
            document.editUserForm.ch3.checked = false;
            document.editUserForm.ch4.checked = false;
            document.editUserForm.ch5.checked = false;
            document.editUserForm.ch6.checked = false;
            document.editUserForm.ch7.checked = false;
            document.editUserForm.ch8.checked = false;
            document.editUserForm.ch9.checked = false;
            document.editUserForm.ch10.checked = false;
            document.editUserForm.ch11.checked = false;
            document.editUserForm.ch12.checked = false;
            document.editUserForm.ch13.checked = false;
            document.editUserForm.ch14.checked = false;
            document.editUserForm.ch15.checked = false;
            document.editUserForm.ch16.checked = false;
         }
         return true;
      }

      function editUserUncheckAll(isCheck)
      {
         if(isCheck == false)
         {
            document.editUserForm.ch16.checked = false;
         }
         return true;
      }
            
      function validateEditUserForm()
      {
         ans = confirm("Are you sure?");
         if (ans)
         {
            var w = document.editUserForm.typeSel.selectedIndex;
            var x = document.editUserForm.notifySel.selectedIndex;
         
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="adminUpdateProfile.php";
            url=url+"?uid="+document.editUserForm.uid.value;
            url=url+"&u_name="+document.editUserForm.u_name.value;
            url=url+"&u_type="+document.editUserForm.typeSel.options[w].value;
            url=url+"&u_notify="+document.editUserForm.notifySel.options[x].value;
            url=url+"&u_desc="+document.editUserForm.u_desc.value;
            url=url+"&u_email="+document.editUserForm.u_email.value;
            if (document.editUserForm.ch1.checked == true)
            {
               url=url+"&ch1="+document.editUserForm.ch1.value;
            }
            if (document.editUserForm.ch2.checked == true)
            {
               url=url+"&ch2="+document.editUserForm.ch2.value;
            }
            if (document.editUserForm.ch3.checked == true)
            {
               url=url+"&ch3="+document.editUserForm.ch3.value;
            }
            if (document.editUserForm.ch4.checked == true)
            {
               url=url+"&ch4="+document.editUserForm.ch4.value;
            }
            if (document.editUserForm.ch5.checked == true)
            {
               url=url+"&ch5="+document.editUserForm.ch5.value;
            }
            if (document.editUserForm.ch6.checked == true)
            {
               url=url+"&ch6="+document.editUserForm.ch6.value;
            }
            if (document.editUserForm.ch7.checked == true)
            {
               url=url+"&ch7="+document.editUserForm.ch7.value;
            }
            if (document.editUserForm.ch8.checked == true)
            {
               url=url+"&ch8="+document.editUserForm.ch8.value;
            }
            if (document.editUserForm.ch9.checked == true)
            {
               url=url+"&ch9="+document.editUserForm.ch9.value;
            }
            if (document.editUserForm.ch10.checked == true)
            {
               url=url+"&ch10="+document.editUserForm.ch10.value;
            }             
            if (document.editUserForm.ch11.checked == true)
            {
               url=url+"&ch11="+document.editUserForm.ch11.value;
            }             
            if (document.editUserForm.ch12.checked == true)
            {
               url=url+"&ch12="+document.editUserForm.ch12.value;
            }             
            if (document.editUserForm.ch13.checked == true)
            {
               url=url+"&ch13="+document.editUserForm.ch13.value;
            }             
            if (document.editUserForm.ch14.checked == true)
            {
               url=url+"&ch14="+document.editUserForm.ch14.value;
            }             
            if (document.editUserForm.ch15.checked == true)
            {
               url=url+"&ch15="+document.editUserForm.ch15.value;
            }             
            if (document.editUserForm.ch16.checked == true)
            {
               url=url+"&ch16="+document.editUserForm.ch16.value;
            }             

            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Change cancelled!');
            return false;
         }    
      }
      function validateForgotForm()
      {     
         var em = document.forgotForm.f_email.value;
      
         if(!em.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/))
         {
            alert('Your email is invalid! Please retry.');
            document.forgotForm.f_email.focus();
            return false;
         }      
         return true;
      }
      function validateRmImgForm()
      {
         ans = confirm("Are you sure? This image will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmImage.php";
            url=url+"?id="+document.adminRmImgForm.id.value;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Image delete cancelled!');
            return false;
         }    
      }
      function typeNav()
      {
         var w = document.typeForm.typeSel.selectedIndex;
         var url_add = document.typeForm.typeSel.options[w].value;
         window.location.href = url_add;
      }
      function modAllCheck()
      {
         if(document.newForm.ch16.checked == true)
         {
            document.newForm.ch1.checked = true;
            document.newForm.ch2.checked = true;
            document.newForm.ch3.checked = true;
            document.newForm.ch4.checked = true;
            document.newForm.ch5.checked = true;
            document.newForm.ch6.checked = true;
            document.newForm.ch7.checked = true;
            document.newForm.ch8.checked = true;
            document.newForm.ch9.checked = true;
            document.newForm.ch10.checked = true;
            document.newForm.ch11.checked = true;
            document.newForm.ch12.checked = true;
            document.newForm.ch13.checked = true;
            document.newForm.ch14.checked = true;
            document.newForm.ch15.checked = true;
            document.newForm.ch16.checked = true;
         }
         if(document.newForm.ch16.checked == false)
         {
            document.newForm.ch1.checked = false;
            document.newForm.ch2.checked = false;
            document.newForm.ch3.checked = false;
            document.newForm.ch4.checked = false;
            document.newForm.ch5.checked = false;
            document.newForm.ch6.checked = false;
            document.newForm.ch7.checked = false;
            document.newForm.ch8.checked = false;
            document.newForm.ch9.checked = false;
            document.newForm.ch10.checked = false;
            document.newForm.ch11.checked = false;
            document.newForm.ch12.checked = false;
            document.newForm.ch13.checked = false;
            document.newForm.ch14.checked = false;
            document.newForm.ch15.checked = false;
            document.newForm.ch16.checked = false;
         }
         return true;
      }

      function modUncheckAll(isCheck)
      {
         if(isCheck == false)
         {
            document.newForm.ch16.checked = false;
         }
         return true;
      }
      function validateModForm(username, email)
      {
      
         if(isEmpty(document.newForm.passNew.value))
         {  
            alert('A password is required!');
            document.newForm.passNew.focus();
            return false;
         }
         if(isEmpty(document.newForm.pass2New.value))
         {  
            alert('A password is required!');
            document.newForm.pass2New.focus();
            return false;
         }
      
         var pass = document.newForm.passNew.value;
         var passRe = document.newForm.pass2New.value;
      
         if(pass != passRe)
         {
            alert('Your passwords don\'t match.  Please re-enter.');
            document.newForm.passNew.focus();
            return false;
         }
      
         var em = document.newForm.emailNew.value;
      
         if(!em.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/))
         {
            alert('Your email is invalid! Please retry.');
            document.newForm.emailNew.focus();
            return false;
         }
         
         var pd = document.newForm.passNew.value;
         
         if (!pd.match(/^[a-zA-Z0-9]{6,8}$/))
         {
            alert('Your password must be 6-8 alphanumeric characters!');
            document.newForm.passNew.focus();
            return false;
         }
         
         var ed = checkemail(email, em);
         if (ed == false)
         {
            alert('That email is already in use.  Please try again.');
            document.newForm.emailNew.focus();
            return false;
         }
            
         return true;
      }
      function checkemail(emailOrig, emailNew){
      
         if (emailOrig == emailNew)
         {
            return true;
         }
         else
         {
            var temp = 0; 
         	var xmlhttp=null
   
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="emailCheck.php";
            url=url+"?email="+emailNew;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }    
         }
      }
      function validateChairImageForm()
      {
      
         if(isEmpty(document.imgForm.title.value))
         {  
            alert('A title is required!');
            document.imgForm.title.focus();
            return false;
         }
         var sd = checkChairIMGtitle();
         if (sd == false)
         {
            alert('That image title has already been used.  Please try again.');
            document.imgForm.title.focus();
            return false;
         }
         if(isEmpty(document.imgForm.file.value))
         {  
            alert('A file is required!');
            document.imgForm.file.focus();
            return false;
         }
         return true;
      }
      function checkChairIMGtitle(){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="titleCheck.php";
         url=url+"?title="+document.imgForm.title.value;
         url=url+"&ftype=IMG";
         url=url+"&sid="+Math.random();

         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateDocForm()
      {
      
         if(isEmpty(document.documentForm.title.value))
         {  
            alert('A title is required!');
            document.documentForm.title.focus();
            return false;
         }
         if(isEmpty(document.documentForm.desc.value))
         {  
            alert('A description is required!');
            document.documentForm.desc.focus();
            return false;
         }
         if(isEmpty(document.documentForm.file.value))
         {  
            alert('A file is required!');
            document.documentForm.file.focus();
            return false;
         }
         return true;
      }
      function newAllCheck()
      {
         if(document.newForm.ch16.checked == true)
         {
            document.newForm.ch1.checked = true;
            document.newForm.ch2.checked = true;
            document.newForm.ch3.checked = true;
            document.newForm.ch4.checked = true;
            document.newForm.ch5.checked = true;
            document.newForm.ch6.checked = true;
            document.newForm.ch7.checked = true;
            document.newForm.ch8.checked = true;
            document.newForm.ch9.checked = true;
            document.newForm.ch10.checked = true;
            document.newForm.ch11.checked = true;
            document.newForm.ch12.checked = true;
            document.newForm.ch13.checked = true;
            document.newForm.ch14.checked = true;
            document.newForm.ch15.checked = true;
            document.newForm.ch16.checked = true;
         }
         if(document.newForm.ch16.checked == false)
         {
            document.newForm.ch1.checked = false;
            document.newForm.ch2.checked = false;
            document.newForm.ch3.checked = false;
            document.newForm.ch4.checked = false;
            document.newForm.ch5.checked = false;
            document.newForm.ch6.checked = false;
            document.newForm.ch7.checked = false;
            document.newForm.ch8.checked = false;
            document.newForm.ch9.checked = false;
            document.newForm.ch10.checked = false;
            document.newForm.ch11.checked = false;
            document.newForm.ch12.checked = false;
            document.newForm.ch13.checked = false;
            document.newForm.ch14.checked = false;
            document.newForm.ch15.checked = false;
            document.newForm.ch16.checked = false;
         }
         return true;
      }

      function newUncheckAll(isCheck)
      {
         if(isCheck == false)
         {
            document.newForm.ch16.checked = false;
         }
         return true;
      }
      function validateNewForm(username, email)
      {
      
         if(isEmpty(document.newForm.userNew.value))
         {  
            alert('A username is required!');
            document.newForm.userNew.focus();
            return false;
         }
         if(isEmpty(document.newForm.passNew.value))
         {  
            alert('A password is required!');
            document.newForm.passNew.focus();
            return false;
         }
         if(isEmpty(document.newForm.pass2New.value))
         {  
            alert('A password is required!');
            document.newForm.pass2New.focus();
            return false;
         }
      
         var pass = document.newForm.passNew.value;
         var passRe = document.newForm.pass2New.value;
      
         if(pass != passRe)
         {
            alert('Your passwords don\'t match.  Please re-enter.');
            document.newForm.passNew.focus();
            return false;
         }
      
         var em = document.newForm.emailNew.value;
      
         if(!em.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/))
         {
            alert('Your email is invalid! Please retry.');
            document.newForm.emailNew.focus();
            return false;
         }

         var pd = document.newForm.passNew.value;
         
         if (!pd.match(/^[a-zA-Z0-9]{6,8}$/))
         {
            alert('Your password must be 6-8 alphanumeric characters!');
            document.newForm.passNew.focus();
            return false;
         }
      
         var sd = checknewusername(username);

         if (sd == false)
         {
            alert('That username is already in use.  Please try again.');
            document.newForm.userNew.focus();
            return false;
         }
         var ed = checknewemail(email);
         
         if (ed == false)
         {
            alert('That email is already in use.  Please try again.');
            document.newForm.emailNew.focus();
            return false;
         }
      
         return true;
      }

      function checknewusername(username){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="userCheck.php";
         url=url+"?username="+username;
         url=url+"&sid="+Math.random();
      
         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return response;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function checknewemail(email){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="emailCheck.php";
         url=url+"?email="+email;
         url=url+"&sid="+Math.random();
      
         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateNewHistoryForm()
      {
      
         if(isEmpty(document.historyForm.title.value))
         {  
            alert('A title is required!');
            document.historyForm.title.focus();
            return false;
         }
         if(isEmpty(document.historyForm.desc.value))
         {  
            alert('A description is required!');
            document.historyForm.desc.focus();
            return false;
         }
         if(isEmpty(document.historyForm.file.value))
         {  
            alert('A file is required!');
            document.historyForm.file.focus();
            return false;
         }
         return true;
      }
      function validateNewImageForm(userID, userType)
      {
      
         var w = document.imgForm.imgType.selectedIndex;
         if (document.imgForm.imgType.options[w].value == "Scenery")
         {
            if(isEmpty(document.imgForm.title.value))
            {  
               alert('A title is required!');
               document.imgForm.title.focus();
               return false;
            }
         }
         
         if (document.imgForm.imgType.options[w].value != "Scenery")
         {
            if(isEmpty(document.imgForm.cn.value))
            {  
               alert('A common name is required!');
               document.imgForm.cn.focus();
               return false;
            }
         }
         if(isEmpty(document.imgForm.file.value))
         {  
            alert('A file is required!');
            document.imgForm.file.focus();
            return false;
         }
         if (userType != "Admin")
         {
            var sd = checklimit(userID);
            if (sd == false)
            {
               alert('You have reached your upload limit for images of this type.');
               return false;
            }
         }
         return true;
      }
      function newImgTypeNav()
      {
         var w = document.imgForm.imgType.selectedIndex;
         var url = "newImage.php?imgSel="+document.imgForm.imgType.options[w].value;
         window.location.href = url;
      }
      function checklimit(userID){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var w = document.imgForm.imgType.selectedIndex;

         var url="limitCheck.php";
         url=url+"?uid="+userID;
         url=url+"&ftype="+document.imgForm.imgType.options[w].value;
         url=url+"&sid="+Math.random();
      
         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateNewListForm()
      {  
         if(isEmpty(document.newListForm.title.value))
         {  
            alert('A list name is required!');
            document.newListForm.title.focus();
            return false;
         }
         var sd = checkELtitle();
         if (sd == false)
         {
            alert('That title is already in use.  Please try again.');
            document.newListForm.title.focus();
            return false;
         }
         return true;
      }
      function checkELtitle(){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="titleCheck.php";
         url=url+"?title="+document.newListForm.title.value;
         url=url+"&ftype=EL";
         url=url+"&sid="+Math.random();

         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateNewPlanningForm()
      {
      
         if(isEmpty(document.planningForm.title.value))
         {  
            alert('A title is required!');
            document.planningForm.title.focus();
            return false;
         }
         if(isEmpty(document.planningForm.desc.value))
         {  
            alert('A description is required!');
            document.planningForm.desc.focus();
            return false;
         }
         return true;
      }
      function validateNewRImageForm()
      {
      
         if(isEmpty(document.imgForm.title.value))
         {  
            alert('A title is required!');
            document.imgForm.title.focus();
            return false;
         }
         var sd = checkRIMGtitle();
         if (sd == false)
         {
            alert('That image title has already been used.  Please try again.');
            document.imgForm.title.focus();
            return false;
         }
         if(isEmpty(document.imgForm.file.value))
         {  
            alert('A file is required!');
            document.imgForm.file.focus();
            return false;
         }
         return true;
      }
      function checkRIMGtitle(){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="titleCheck.php";
         url=url+"?title="+document.imgForm.title.value;
         url=url+"&ftype=IMG";
         url=url+"&sid="+Math.random();

         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateNewSCForm(type)
      {  
         if(isEmpty(document.newSCForm.title.value))
         {  
            alert('A subcommittee title is required!');
            document.newSCForm.title.focus();
            return false;
         }
         var sd = checkSCtitle();
         if (sd == false)
         {
            alert('That title is already in use.  Please try again.');
            document.newSCForm.title.focus();
            return false;
         }
         
         var checked = 0;
         if (type == 0)
         {
            for(i=0;i<document.newSCForm.sc_chair.length;i++)
            {
               if(document.newSCForm.sc_chair[i].checked)
               {
                  checked = 1;
               }
            }
            if (checked == 0)
            {
               alert('A CAC Subcommittee Chair must be selected');
               return false;
            }
         }
         checked = 0;
         for(j=0;j<document.newSCForm.add.length;j++)
         {
            if(document.newSCForm.add[j].checked)
            {
               checked = 1;
            }
         }
         if (checked == 0)
         {
            alert('At least one member must be selected');
            return false;
         }
         return true;
      }

      function checkSCtitle(){
         var temp = 0; 
      	var xmlhttp=null

      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="titleCheck.php";
         url=url+"?title="+document.newSCForm.title.value;
         url=url+"&ftype=SC";
         url=url+"&sid="+Math.random();

         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
            }
            else
            {
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function rImgHandler()
      {

         var x = document.rccForm.rccSel.selectedIndex;
         if(document.rccForm.ch1.checked == true)
         {  
            var url = "rchangeContent.php?img=yes&s1t="+document.rccForm.sec1title.value;
            url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
            url = url+"&s3t="+document.rccForm.sec3title.value;
            url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
            window.location.href(url);
         }
         else
         {
            var url = "rchangeContent.php?img=no&s1t="+document.rccForm.sec1title.value;
            url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
            url = url+"&s3t="+document.rccForm.sec3title.value;
            url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
            window.location.href(url);
         }
         return true;
      }
      
      function previewRCC()
      {
         var x = document.rccForm.rccSel.selectedIndex;
         
         if (document.rccForm.ch1.checked == true)
         {
            var w = document.rccForm.imgSel.selectedIndex;
      
            var url = "rchangeContent.php?img=yes&s1t="+document.rccForm.sec1title.value;
            url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
            url = url+"&s3t="+document.rccForm.sec3title.value;
            url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
            url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
         }
         else
         {
            var url = "rchangeContent.php?s1t="+document.rccForm.sec1title.value;
            url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
            url = url+"&s3t="+document.rccForm.sec3title.value+"&s3c="+document.rccForm.sec3content.value;
            url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
         }
                  
         window.location.href(url);
         
         return true;
      }

      function rccNav()
      {
         var w = document.rccForm.rccSel.selectedIndex;
         var url_add = "rchangeContent.php?rtype="+document.rccForm.rccSel.options[w].value;
         window.location.href = url_add;
      }
      function validateRCCForm()
      {
         var answer = confirm("Are you sure?  Any changes made will overwrite the current content.");
         if (answer)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}

            var x = document.rccForm.rccSel.selectedIndex;
         	
         	if (document.rccForm.ch1.checked == true)
         	{
               var w = document.rccForm.imgSel.selectedIndex;
            
               var url="updateRCC.php";
               url=url+"?id="+document.rccForm.userID.value;
               url=url+"&s1t="+document.rccForm.sec1title.value;
               url=url+"&s1c="+document.rccForm.sec1content.value;
               url=url+"&s2t="+document.rccForm.sec2title.value;
               url=url+"&s2c="+document.rccForm.sec2content.value;
               url=url+"&s3t="+document.rccForm.sec3title.value;
               url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
               url=url+"&rType="+document.rccForm.rccSel.options[x].value;
               url=url+"&sid="+Math.random();
            }
            else
            {
               var url="updateRCC.php";
               url=url+"?id="+document.rccForm.userID.value;
               url=url+"&s1t="+document.rccForm.sec1title.value;
               url=url+"&s1c="+document.rccForm.sec1content.value;
               url=url+"&s2t="+document.rccForm.sec2title.value;
               url=url+"&s2c="+document.rccForm.sec2content.value;
               url=url+"&s3t="+document.rccForm.sec3title.value;
               url=url+"&s3c="+document.rccForm.sec3content.value;
               url=url+"&rType="+document.rccForm.rccSel.options[x].value;
               url=url+"&sid="+Math.random();
            }
               
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
                  
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert("Content change cancelled");
            return false;
         }    
      }
      function sendemail()
      {
      	var xmlhttp=null
      	if (window.XMLHttpRequest)
      	{
      	  xmlhttp=new XMLHttpRequest()
      	}
      	else if (window.ActiveXObject)
      	{
      	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
      	}
         var url="mail.php";
         url=url+"?To="+document.listSelForm.To.value;
         url=url+"&Subject="+document.mailForm.Subject.value;
         url=url+"&Body="+document.mailForm.Body.value;
         url=url+"&sid="+Math.random();

      
         xmlhttp.open("GET", url, false); 
         xmlhttp.send(null); 
      
      	if(xmlhttp.readyState == 4){
      
      		var response = xmlhttp.responseText;
            response = trim(response);
            if(response == "false")
            {
               return false;
               
            }
            else
            {
               alert('Your message was sent successfully!');
               return true;
            }
         }
         else
         {
            alert('Your browser does not support http requests');
         }    
      }
      function validateRmUserForm()
      {
         ans = confirm("Are you sure? This user will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmUser.php";
            url=url+"?uid="+document.adminRmUserForm.uid.value;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('User delete cancelled!');
            return false;
         }    
      }
      function validateRmDocForm(id)
      {
         ans = confirm("Are you sure? This document will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmDocument.php";
            url=url+"?did="+id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {              
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Document delete cancelled!');
            return false;
         }    
      }
      function validateRmHistForm(id)
      {
         ans = confirm("Are you sure? This history entry will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmHistory.php";
            url=url+"?hid="+id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {              
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('History entry delete cancelled!');
            return false;
         }    
      }
      function validateRmNewsForm(id)
      {
         ans = confirm("Are you sure? This news entry will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmNews.php";
            url=url+"?nid="+id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('News entry delete cancelled!');
            return false;
         }    
      }
      function validateNewSCChairForm()
      {
         var checked = 0;
         for(i=0;i<document.newSCCForm.sc_chair.length;i++)
         {
            if(document.newSCCForm.sc_chair[i].checked)
            {
               checked = 1;
            }
         }
         if (checked == 0)
         {
            alert('A member must be selected');
            return false;
         }
         
         return true;
      }
      function validatePlanningForm2()
      {
      
         if(isEmpty(document.editPlanningForm.title.value))
         {  
            alert('A title is required!');
            document.editPlanningForm.title.focus();
            return false;
         }
         if(isEmpty(document.editPlanningForm.desc.value))
         {  
            alert('A description is required!');
            document.editPlanningForm.desc.focus();
            return false;
         }
         return true;
      }
      function planImgHandler2()
      {

         var x = document.editPForm.projSel.selectedIndex;
         if(document.editPlanningForm.nf.checked == true)
         {  
            var url = document.editPForm.projSel.options[x].value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = document.editPForm.projSel.options[x].value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      
      function projNav2()
      {
         var w = document.editPForm.projSel.selectedIndex;
         var url_add = document.editPForm.projSel.options[w].value;
         window.location.href = url_add;
      }

      function setTo()
      {
         var x = document.mailForm.listSel.selectedIndex;
         document.mailForm.To.value = trim(document.mailForm.To.value);
         
         if (!document.mailForm.To.value.match(/.*;$/) && document.mailForm.To.value != "")
         {
            document.mailForm.To.value += "; " + document.mailForm.listSel.options[x].value + "; ";
         }
         else if (document.mailForm.To.value.match(/.*;$/))
         {
            document.mailForm.To.value += " " + document.mailForm.listSel.options[x].value + "; ";
         }
         else
         {
            document.mailForm.To.value += document.mailForm.listSel.options[x].value + "; ";
         }
      }      




      function cImgHandler2()
      {

         if(document.rccForm.ch1.checked == true)
         {
            if(document.rccForm.ch2.checked == true)
            {             
               var url = "cchangeContent.php?img=yes&fn=yes&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value;
               window.location.href(url);
            }
            else
            {
               var url = "cchangeContent.php?img=yes&fn=no&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value;
               window.location.href(url);
            }
         }
         else
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var url = "cchangeContent.php?img=no&fn=yes&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value;
               window.location.href(url);
            }
            else
            {
               var url = "cchangeContent.php?img=no&fn=no&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value;
               window.location.href(url);
            }
         }
         return true;
      }
      
      function previewCCC2()
      {
         
         if (document.rccForm.ch1.checked == true)
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var w = document.rccForm.imgSel.selectedIndex;
               var x = document.rccForm.fileSel.selectedIndex;
               
               var url = "cchangeContent.php?img=yes&fn=yes&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value;
               url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
               url = url+"&rFile="+document.rccForm.fileSel.options[x].value;
            }
            else
            {
               var w = document.rccForm.imgSel.selectedIndex;

               var url = "cchangeContent.php?img=yes&fn=no&s2t="+document.rccForm.sec2title.value;
               url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value;
               url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
            }
         }
         else
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var x = document.rccForm.fileSel.selectedIndex;
               
               var url = "cchangeContent.php?img=no&fn=yes&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s1t="+document.rccForm.sec1title.value+"&s1c="+document.rccForm.sec1content.value;
               url = url+"&rFile="+document.rccForm.fileSel.options[x].value;
            }
            else
            {

               var url = "cchangeContent.php?img=no&fn=no&s2t="+document.rccForm.sec2title.value;
               url = url+"&s2c="+document.rccForm.sec2content.value+"&s1t="+document.rccForm.sec1title.value+"&s1c="+document.rccForm.sec1content.value;
            }
         }
                  
         window.location.href(url);
         
         return true;
      }

      function validateCCCForm2()
      {
         var answer = confirm("Are you sure?  Any changes made will overwrite the current content.");
         if (answer)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}

         	
         	if (document.rccForm.ch1.checked == true)
         	{
         	   if (document.rccForm.ch2.checked == true)
         	   {
                  var w = document.rccForm.imgSel.selectedIndex;
                  var x = document.rccForm.fileSel.selectedIndex;
                  
                  var url="updateCCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
                  url=url+"&rFile="+document.rccForm.fileSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
               else
               {
                  var w = document.rccForm.imgSel.selectedIndex;
                  
                  var url="updateCCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
                  url=url+"&sid="+Math.random();
               }
            }
            else
            {
         	   if (document.rccForm.ch2.checked == true)
         	   {
                  var x = document.rccForm.fileSel.selectedIndex;
                  
                  var url="updateCCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&rFile="+document.rccForm.fileSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
               else
               {
                  var url="updateCCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&sid="+Math.random();
               }
            }
               
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
                  
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert("Content change cancelled");
            return false;
         }    
      }

      function rImgHandler2()
      {

         var x = document.rccForm.rccSel.selectedIndex;
         if(document.rccForm.ch1.checked == true)
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var url = "rchangeContent.php?img=yes&fn=yes&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
               window.location.href(url);

            }
            else
            {
               var url = "rchangeContent.php?img=yes&fn=no&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
               window.location.href(url);

            }
         }
         else
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var url = "rchangeContent.php?img=no&fn=yes&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
               window.location.href(url);
            }
            else
            {
               var url = "rchangeContent.php?img=no&fn=no&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
               window.location.href(url);

            }
         }
         return true;
      }
      
      function previewRCC2()
      {         
         var x = document.rccForm.rccSel.selectedIndex;
         if (document.rccForm.ch1.checked == true)
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var w = document.rccForm.imgSel.selectedIndex;
               var y = document.rccForm.fileSel.selectedIndex;
                    
               var url = "rchangeContent.php?img=yes&fn=yes&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
               url = url+"&rFile="+document.rccForm.fileSel.options[y].value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;


            }
            else
            {
               var w = document.rccForm.imgSel.selectedIndex;
                    
               var url = "rchangeContent.php?img=yes&fn=no&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value;
               url = url+"&rPic="+document.rccForm.imgSel.options[w].value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;

            }
         }
         else
         {
            if(document.rccForm.ch2.checked == true)
            {  
               var y = document.rccForm.fileSel.selectedIndex;
               
               var url = "rchangeContent.php?img=no&fn=yes&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value+"&s3c="+document.rccForm.sec3content.value;
               url = url+"&rFile="+document.rccForm.fileSel.options[y].value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
            }
            else
            {
               var url = "rchangeContent.php?img=no&fn=no&s1t="+document.rccForm.sec1title.value;
               url = url+"&s1c="+document.rccForm.sec1content.value+"&s2t="+document.rccForm.sec2title.value+"&s2c="+document.rccForm.sec2content.value;
               url = url+"&s3t="+document.rccForm.sec3title.value+"&s3c="+document.rccForm.sec3content.value;
               url = url+"&rtype="+document.rccForm.rccSel.options[x].value;
            }
         }
                  
         window.location.href(url);
         
         return true;
      }

      function rccNav2()
      {
         var w = document.rccForm.rccSel.selectedIndex;
         var url_add = "rchangeContent.php?rtype="+document.rccForm.rccSel.options[w].value;
         window.location.href = url_add;
      }
      function validateRCCForm2()
      {
         var answer = confirm("Are you sure?  Any changes made will overwrite the current content.");
         if (answer)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}

         	
            var x = document.rccForm.rccSel.selectedIndex;
         	if (document.rccForm.ch1.checked == true)
         	{
         	   if (document.rccForm.ch2.checked == true)
         	   {
                  var w = document.rccForm.imgSel.selectedIndex;
                  var y = document.rccForm.fileSel.selectedIndex;
                  
                  var url="updateRCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&s3t="+document.rccForm.sec3title.value;
                  url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
                  url=url+"&rFile="+document.rccForm.fileSel.options[y].value;
                  url=url+"&rType="+document.rccForm.rccSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
               else
               {
                  var w = document.rccForm.imgSel.selectedIndex;
                  
                  var url="updateRCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&s3t="+document.rccForm.sec3title.value;
                  url=url+"&rPic="+document.rccForm.imgSel.options[w].value;
                  url=url+"&rType="+document.rccForm.rccSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
            }
            else
            {
         	   if (document.rccForm.ch2.checked == true)
         	   {
                  var y = document.rccForm.fileSel.selectedIndex;
                  
                  var url="updateRCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&s3t="+document.rccForm.sec3title.value;
                  url=url+"&s3c="+document.rccForm.sec3content.value;
                  url=url+"&rFile="+document.rccForm.fileSel.options[y].value;
                  url=url+"&rType="+document.rccForm.rccSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
               else
               {
                  var url="updateRCC.php";
                  url=url+"?id="+document.rccForm.userID.value;
                  url=url+"&s1t="+document.rccForm.sec1title.value;
                  url=url+"&s1c="+document.rccForm.sec1content.value;
                  url=url+"&s2t="+document.rccForm.sec2title.value;
                  url=url+"&s2c="+document.rccForm.sec2content.value;
                  url=url+"&s3t="+document.rccForm.sec3title.value;
                  url=url+"&s3c="+document.rccForm.sec3content.value;
                  url=url+"&rType="+document.rccForm.rccSel.options[x].value;
                  url=url+"&sid="+Math.random();
               }
            }
               
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
                  
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert("Content change cancelled");
            return false;
         }    
      }

      function validateChairFileForm()
      {
      
         if(isEmpty(document.fileForm.file.value))
         {  
            alert('A file is required!');
            document.fileForm.file.focus();
            return false;
         }
         return true;
      }
      function validateRangerFileForm()
      {
      
         if(isEmpty(document.fileForm.file.value))
         {  
            alert('A file is required!');
            document.fileForm.file.focus();
            return false;
         }
         return true;
      }
      function validateSwapImageForm()
      {
      
         if(isEmpty(document.imgForm.title.value))
         {  
            alert('A title is required!');
            document.imgForm.title.focus();
            return false;
         }
         if(isEmpty(document.imgForm.file.value))
         {  
            alert('A file is required!');
            document.imgForm.file.focus();
            return false;
         }
         return true;
      }
      function addAtt()
      {
         if (document.mailForm.att.checked == true)
         {
            document.mailForm.uploadFile.disabled = "";
         }
         else
         {
            clearFileInputField('uploadFile_div');
            document.mailForm.uploadFile.disabled = "disabled";
         }
      }
      function clearFileInputField(tagId) 
      {
         document.getElementById(tagId).innerHTML = document.getElementById(tagId).innerHTML;
      }
      function validatePcCacForm()      
      {
         if (document.pccacForm.file1.value == "" && document.pccacForm.file2.value == "")
         {
            alert('At least one file must be uploaded!');
            document.pccacForm.file1.focus();      
            return false;
         }
         return true;
      }
      function showInterests()
      {
         if (document.newListForm.fbi.checked == true)
         {
            var url = "newList.php?sort="+document.newListForm.sort.value+"&f=Yes";
            window.location.href(url);
         }
         else
         {      
            var url = "newList.php?sort="+document.newListForm.sort.value;
            window.location.href(url);      
         }
      }
            
      function interestAllCheck()
      {
         if(document.newListForm.ch16.checked == true)
         {
            document.newListForm.ch1.checked = true;
            document.newListForm.ch2.checked = true;
            document.newListForm.ch3.checked = true;
            document.newListForm.ch4.checked = true;
            document.newListForm.ch5.checked = true;
            document.newListForm.ch6.checked = true;
            document.newListForm.ch7.checked = true;
            document.newListForm.ch8.checked = true;
            document.newListForm.ch9.checked = true;
            document.newListForm.ch10.checked = true;
            document.newListForm.ch11.checked = true;
            document.newListForm.ch12.checked = true;
            document.newListForm.ch13.checked = true;
            document.newListForm.ch14.checked = true;
            document.newListForm.ch15.checked = true;
            document.newListForm.ch16.checked = true;

            url = "newList.php?f=Yes&tc="+document.newListForm.ch1.value+
                  "&pat="+document.newListForm.ch2.value+
                  "&tm="+document.newListForm.ch3.value+
                  "&os="+document.newListForm.ch4.value+
                  "&hr="+document.newListForm.ch5.value+
                  "&g="+document.newListForm.ch6.value+
                  "&cm="+document.newListForm.ch7.value+
                  "&nd="+document.newListForm.ch8.value+
                  "&hl="+document.newListForm.ch9.value+
                  "&pb="+document.newListForm.ch10.value+
                  "&pc="+document.newListForm.ch11.value+
                  "&vcs="+document.newListForm.ch12.value+
                  "&es="+document.newListForm.ch13.value+
                  "&yp="+document.newListForm.ch14.value+
                  "&sur="+document.newListForm.ch15.value+
                  "&all="+document.newListForm.ch16.value+
                  "&sort="+document.newListForm.sort.value;
            window.location.href(url);

         }
         if(document.newListForm.ch16.checked == false)
         {
            document.newListForm.ch1.checked = false;
            document.newListForm.ch2.checked = false;
            document.newListForm.ch3.checked = false;
            document.newListForm.ch4.checked = false;
            document.newListForm.ch5.checked = false;
            document.newListForm.ch6.checked = false;
            document.newListForm.ch7.checked = false;
            document.newListForm.ch8.checked = false;
            document.newListForm.ch9.checked = false;
            document.newListForm.ch10.checked = false;
            document.newListForm.ch11.checked = false;
            document.newListForm.ch12.checked = false;
            document.newListForm.ch13.checked = false;
            document.newListForm.ch14.checked = false;
            document.newListForm.ch15.checked = false;
            document.newListForm.ch16.checked = false;

            url = "newList.php?f=Yes&tc=&pat=&tm=&os=&hr=&g=&cm=&nd=&hl=&pb=&pc=&vcs=&es=&yp=&sur=&all=&sort="+document.newListForm.sort.value;
            window.location.href(url);
         }
         return true;
      }

      function interestFilter()
      {
         url = "newList.php?f=Yes&tc=";
         if (document.newListForm.ch1.checked == true)
         {
            url = url+document.newListForm.ch1.value;
         }
         url = url+"&pat=";
         if (document.newListForm.ch2.checked == true)
         {
            url = url+document.newListForm.ch2.value;
         }
         url = url+"&tm=";
         if (document.newListForm.ch3.checked == true)
         {
            url = url+document.newListForm.ch3.value;
         }
         url = url+"&os=";
         if (document.newListForm.ch4.checked == true)
         {
            url = url+document.newListForm.ch4.value;
         }
         url = url+"&hr=";
         if (document.newListForm.ch5.checked == true)
         {
            url = url+document.newListForm.ch5.value;
         }
         url = url+"&g=";
         if (document.newListForm.ch6.checked == true)
         {
            url = url+document.newListForm.ch6.value;
         }
         url = url+"&cm=";
         if (document.newListForm.ch7.checked == true)
         {
            url = url+document.newListForm.ch7.value;
         }
         url = url+"&nd=";
         if (document.newListForm.ch8.checked == true)
         {
            url = url+document.newListForm.ch8.value;
         }
         url = url+"&hl=";
         if (document.newListForm.ch9.checked == true)
         {
            url = url+document.newListForm.ch9.value;
         }
         url = url+"&pb=";
         if (document.newListForm.ch10.checked == true)
         {
            url = url+document.newListForm.ch10.value;
         }
         url = url+"&pc=";
         if (document.newListForm.ch11.checked == true)
         {
            url = url+document.newListForm.ch11.value;
         }
         url = url+"&vcs=";
         if (document.newListForm.ch12.checked == true)
         {
            url = url+document.newListForm.ch12.value;
         }
         url = url+"&es=";
         if (document.newListForm.ch13.checked == true)
         {
            url = url+document.newListForm.ch13.value;
         }
         url = url+"&yp=";
         if (document.newListForm.ch14.checked == true)
         {
            url = url+document.newListForm.ch14.value;
         }
         url = url+"&sur=";
         if (document.newListForm.ch15.checked == true)
         {
            url = url+document.newListForm.ch15.value;
         }
         url = url+"&all=";
         var check = 1;
         for(var x=1;x<=15;x++)
         {
            var name = "ch" + x;
            var item = document.getElementById(name);
            if (item.checked == false)
            {
               check = 0;      
            }
         }
         if (check)
         {
            document.newListForm.ch16.checked = true;
            url = url+document.newListForm.ch16.value;
         }
         else
         {
            document.newListForm.ch16.checked = false;
         }
         url = url+"&sort="+document.newListForm.sort.value;
         
         window.location.href(url);
         return true;
      }
      function validateLinkForm()
      {
         if (document.linksForm.title.value == "")
         {
            alert('A title is required');
            document.linksForm.title.focus();
            return false;
         }
         if (document.linksForm.link.value == "")
         {
            alert('A link is required');
            document.linksForm.link.focus();
            return false;
         }
         return true;
      }            
      function validateRmLinksForm(id)
      {
         ans = confirm("Are you sure? This link will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmLink.php";
            url=url+"?id="+id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Link delete cancelled!');
            return false;
         }    
      }
      function bfImgHandler()
      {

         if(document.bfForm.nf.checked == true)
         {  
            var url = "editBF.php?bfid="+document.bfForm.bf_id.value+"&nf=yes";
            window.location.href(url);
         }
         else
         {
            var url = "editBF.php?bfid="+document.bfForm.bf_id.value+"&nf=no";
            window.location.href(url);
         }
         return true;
      }
      function validateBfForm()
      {  
         if(isEmpty(document.bfForm.title.value))
         {  
            alert('A title is required!');
            document.bfForm.title.focus();
            return false;
         }
         if(isEmpty(document.bfForm.desc.value))
         {  
            alert('A description is required!');
            document.bfForm.desc.focus();
            return false;
         }
         if(isEmpty(document.bfForm.link.value))
         {  
            alert('A link is required!');
            document.bfForm.link.focus();
            return false;
         }
         return true;
      }
      function yearNav()
      {
         var w = document.yearForm.yearSel.selectedIndex;
         var url = "calendar.php?yr="+document.yearForm.yearSel.options[w].value;
         window.location.href = url;
      }
      function validateRmBfForm(b_id)
      {
         var id = b_id;
         ans = confirm("Are you sure? This business will be permanently deleted");
         if (ans)
         {
            var temp = 0; 
         	var xmlhttp=null
         	if (window.XMLHttpRequest)
         	{
         	  xmlhttp=new XMLHttpRequest()
         	}
         	else if (window.ActiveXObject)
         	{
         	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
         	}
            var url="rmBF.php";
            url=url+"?id="+b_id;
            url=url+"&sid="+Math.random();
         
            xmlhttp.open("GET", url, false); 
            xmlhttp.send(null); 
         
         	if(xmlhttp.readyState == 4){
         
         		var response = xmlhttp.responseText;
               response = trim(response);
               if(response == "false")
               {
                  return false;
               }
               else
               {
                  return true;
               }
            }
            else
            {
               alert('Your browser does not support http requests');
            }
         }
         else
         {
            alert('Business delete cancelled!');
            return false;
         }    
      }
      function userYearNav(uid)
      {
         var w = document.yearForm.yearSel.selectedIndex;
         var url = "userCalendar.php?yr="+document.yearForm.yearSel.options[w].value+"&uid="+uid;
         window.location.href = url;
      }

      //-->

