

function select(menuItemId) 
{
    if (!document.getElementById) return false;
    menuItem = document.getElementById(menuItemId);
    menuItem.className = 'Selected';
}


function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}



$(function() {

	function wireupCreditBehavior()
	{
		if (!document.getElementById) return false;
		mainBottomDiv= document.getElementById('MainBottom');
		mainBottomDiv.onmouseover = function() { document.getElementById('Credit').className='Hover'; };
		mainBottomDiv.onmouseout = function() { document.getElementById('Credit').className=''; };
		mainBottomDiv.onclick = function() { window.open('http://www.caudillweb.com'); };
		// preload image
		preloadedImage = newImage('../images/cwt.on.gif')
	}


	var $applicationType = $("input[name='entry.31.group']");
	var $mainForm = $("div#MainForm");
	var $acceptRadioButton = $("input#group_64_1");
	var $submitContainer = $("p#SubmitContainer");

	function wireupMembershipForm() {
	$mainForm.hide();
	$submitContainer.hide();
		$applicationType.click(function() { 
			$mainForm.show();
		});
		$acceptRadioButton.click(function(){
		$submitContainer.show();
		});	
	}

	wireupCreditBehavior();
	wireupMembershipForm();
	
});

