
function hideContactInfo(){
	// if JavaScript is disabled, divs will be visible
	// if JavaScript is enabled, this script will run onload to hide the client worksheet
	
	var radio = $('form_select');
	radio[0].checked = true;
	
	hideShow("Contact Form");
}

function hideShow(trigger){
	//used to toggle the visibility of the contact form divs

	var contact = $('contact_form_div');
	var worksheet = $('client_worksheet_div');

	if(trigger == "Client Worksheet"){
		contact.set('class', 'hideMe');
		worksheet.set('class', 'showMe');
	} else {
		contact.set('class', 'showMe');
		worksheet.set('class', 'hideMe');
	}
}

window.addEvent('domready', function(){
	// get all anchors
	var allAnchors = $$('a');
	
	// get url as a string
	var page = window.location.toString();
	
	//if only directory is given, append 'index.html'
	if(page.charAt(page.length -1) == '/'){
		page = page.concat('index.html');
	}
	
	// set the class of all anchors to none and
	// compare anchors to url to determine which is/are active
	
	for(i=0; i<allAnchors.length; i++){
		allAnchors[i].erase('class');
		if(allAnchors[i].match(page)){
			//alert('Found one! ' + allAnchors[i]);
			allAnchors[i].set('class', 'active');
		}
	}
	hideContactInfo();
});

