

/* Medreth's forms don't validate because they use the "name=" attribute, so redirect form to another page with the "name=" attribute in the <input> tag, so the ywill work*/
function formRedirect(Id)
{
	var x = document.getElementById(String(Id));
	
	switch(Id)
	{
		case "SWForm":
			document.location = "http://www.kjmaclean.com/SWForm.php";
		break;
	}
}

function resetPage()
{
		document
}


function ToggleBackground(bg) {
   
   if (bg =="background") {document.getElementById('container').style.background = "url(BrightSkies.jpg) repeat";
                              		   }
   else if (bg=="nobackground") {document.getElementById('container').style.background = "#FBFBFB";
   						}
 }



/* Eric Wendelin's text-size increase function. Thanks Eric! */
 function resizeText(multiplier) {  
   if (document.body.style.fontSize == "") {  
     document.body.style.fontSize = "12pt"; 
    }  
   document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 1.6) + "pt";  
 
} 

 function getTextSize() {  
   
   return document.body.style.fontSize = parseFloat(document.body.style.fontSize) + "em";  
 }  

// === text size start

var currFont = 1;

var sops = "";



function setTextSize(s) {

	 var arrFont = new Array('.8em', '1em', '1.2em', '1.4em', '1.6em'); 

	 var arrHeight = new Array('1.3em', '1.35em', '1.4em', '1.45em', '1.5em');
	 
	 var arrCol = new Array(0.8, 1.0, 1.2, 1.4, 1.6);
	 
	 var element, idCol;

	 if (s == 'up') {

		currFont++; 

	 }

	 if (s == 'down') {

		currFont--; 

	 }

	 if (currFont >= 4) {

		currFont = 4; 

	 }

	 if (currFont <= 0) {

		currFont = 0; 

	 }

	 document.getElementById('PageContentText').style.fontSize = arrFont[currFont];

	 document.getElementById('PageContentText').style.lineHeight = arrHeight[currFont];
	 
	

}// --- text size end 


/* 
  ------------------------------------
  PVII Menu CSS Express Drop-Down Menu
  by Project Seven Development
  www.projectseven.com
  ------------------------------------
*/
function ExpMenu(){ 
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 
 var i,k,g,lg,r=/\s*IEhvr/,nn='',c,cs='IEhvr',bv='menubar';
 
 for(i=0;i<10;i++){
 g=document.getElementById(bv+nn);
 	if(g){
 			
 			lg=g.getElementsByTagName("LI");
 			if(lg)
 				{
 				 for(k=0;k<lg.length;k++)
 				 	{
 						lg[k].onmouseover=function(){
 							c=this.className;cl=(c)?c+' '+cs:cs;
							 this.className=cl;
							 };
							 lg[k].onmouseout=function(){
									c=this.className;
									 this.className=(c)?c.replace(r,''):'';
							};
					 }
				}
			}nn=i+1;
	}
}


/* this validates in XHTML Strict because it does not use the Form <name> tag */
function ValidateFormPC() {
var getform;

	getform = document.getElementById('PersonalCoachingForm');  
          if (getform.spambots.value != "yes") {
				return false;  
			}
			else { return true;  }
}


//Scott Andrews'  Event Handlers
function addEvent(obj, evType, fn)
{
 	if (obj.addEventListener)
	{
  		 obj.addEventListener(evType, fn, false);
  		 return true;
 	} 
 	else if (obj.attachEvent)
	{
   		var r = obj.attachEvent("on"+evType, fn);
  		 return r;
 	}
  	else { return false; }
}

function removeEvent(obj, evType, fn)
{
	  if (obj.removeEventListener)
	  {
		    obj.removeEventListener(evType, fn, false);
    		return true;
  	   } 
	   else if (obj.detachEvent)
	   {
		    var r = obj.detachEvent("on"+evType, fn);
    		return r;
  	    } 
 	    else { return false;}
  }

















