//utility class for the site
//Author Ryan Medlin: yresnob@gmail.com
//Property of Tri-Valley Haven

var content = getQueryVariable("content");
//alert(content);
if(content != null && content != ""){
	
	setTimeout("showHideContent(" + content + ")","1"); 
}

    function getQueryVariable(variable) 
   {
    var query = window.location.search.substring(1);
  //  alert(query);
    var vars = query.split("&");
    for (var i=0;i<vars.length;i++) 
    {  
    var pair = vars[i].split("=");
     if (pair[0] == variable) 
     {
    
     return pair[1];
     }
    }
   // alert('Query Variable ' + variable + ' not found');
   }


function showHideContent(number){
	//alert(number);
	//number: the number to show..  it then hides the rest
	//this is for the main content areas for each page
	
	$("#content" + number).show();
	$("#sidecontent" + number).show();
	
	for (i=0;i<=8;i++)
	{
		
		if(i != number){
			$("#content" + i).hide();
			$("#sidecontent" + i).hide();
		}
	}
	
	
	
	
}
