   function resizeW(w,id) {
			    document.getElementById(id).style.width=w;
			 }
   function resizeH(h,id) {
			    document.getElementById(id).style.height=h;
			 }

   function show(id) {
                        document.getElementById(id).style.display='block';
                     }

   function hide(id) {
                        document.getElementById(id).style.display='none';
                     }
   function changeSrc(newSrc,id) {
				    document.getElementById(id).src=newSrc;
				 }
   function floatLeft(id) {
                        document.getElementById(id).style.float='left';
                     }
   function floatNone(id) {
                        document.getElementById(id).style.float='none';
                     }
   function padding(id, padNos) {
                        document.getElementById(id).style.padding=padNos;
                     }
   
   function submitLink() {
			    show('submitForm');
			    hide('statsDiv');
			    resizeH('226px','userMenuInner');
			    resizeW('300px','userMenuIn');
			    hide('submitLink');
			    show('userMenuCollapse');
			    show('statsLink');
			    show('submitGuide');
			    hide('submitGuideDiv');
			 }

   function submitGuide() {
			   show('submitGuideDiv');
			   hide('statsDiv');
			   hide('submitForm');
			   hide('submitGuide');
			   show('statsLink');
			   show('submitLink');
			   resizeH('266px','userMenuInner');
			   resizeW('300px','userMenu');
			}

   function statsLink() {
			    show('statsDiv');
			    hide('submitForm');
			    resizeH('142px','userMenuInner');
			    resizeW('200px','userMenuIn');
			    hide('statsLink');
			    show('userMenuCollapse');
			    show('submitLink');
			    hide('submitGuide');
			    hide('submitGuideDiv');
			 }

   function popularLink() {
			    show('popularDiv');
			    hide('latestDiv');
			    hide('popularLink');
			    show('footerCollapse');
			    show('latestLink2');
			    hide('latestLink');
			 }

   function latestLink() {
			    padding('popularLink','0 0 0 110px');
			    show('latestDiv');
			    hide('popularDiv');
			    hide('latestLink');
			    hide('latestLink2');
			    show('footerCollapse');
			    show('popularLink');
			 }

   function latestLink2() {
			    padding('popularLink','0 0 0 110px');
			    show('latestDiv');
			    hide('popularDiv');
			    hide('latestLink');
			    hide('latestLink2');
			    show('footerCollapse');
			    show('popularLink');
			 }

   function ucm() {
				hide('loginForm');
				hide('signupForm');
				resizeH('19px','userMenuInner');
				resizeW('147px','userMenu');
				show('loginLink');
				hide('userMenuCollapse');
				show('signupLink');
				hide('aboutDiv');
				show('aboutLink');
				hide('signupLink2');
			     }

   function fcm() {
			        padding('latestLink','0 0 0 55px');
				padding('popularLink','0');
				hide('popularDiv');
				hide('latestDiv');
				hide('footerCollapse');
				hide('latestLink2');
			        show('latestLink');
			        show('popularLink');
			     }
   function ucmIn() {
				hide('submitForm');
				hide('statsDiv');
				resizeH('19px','userMenuInner');
				resizeW('152px','userMenuIn');
				show('submitLink');
				show('statsLink');
				hide('userMenuCollapse');
			        hide('submitGuideDiv');
			        hide('submitGuide');
			     }
   function addThesaurus() {
  				var ni = document.getElementById('thesaurusEntry');
  				var numi = document.getElementById('theValue');
  				var num = (document.getElementById('theValue').value -1)+ 2;
  				numi.value = num;
  				var newdiv = document.createElement('div');
  				var divIdName = 'thesaurus'+num+'Entry';
  				newdiv.setAttribute('id',divIdName);
				newdiv.setAttribute('name',divIdName);
				newdiv.setAttribute('style','float:right;');
  				newdiv.innerHTML = '<div style="float:right;padding:5px;border:1px solid #ccc;"><textarea cols="50" rows"25" id="'+divIdName+'" name="'+divIdName+'" style="float:right;" ></textarea><a href="#" style="float:right;" onclick="removeElement('+'\''+divIdName+'\''+')">Remove this Thesaurus Entry field</a><br style="clear:both;" /></div>';
  				ni.appendChild(newdiv);
			}
   function removeElement(divNum) {
  				var d = document.getElementById('thesaurusEntry');
  				var olddiv = document.getElementById(divNum);
  				d.removeChild(olddiv);
				}
   function setMaxWidth(id,percent) {
				document.getElementById(id).style.maxWidth=percent+"%";
			}