$(document).ready(function(){
						

	$(".selectpayment").validate();
	$("#selectcourse").validate();
	$.metadata.setType("attr", "validate");

 	$(".infoBox").mouseover(function(event){
		$(this).children('.infoBoxContent').fadeIn();
	});
 
 	$(".infoBox").mouseleave(function(event){
		$(this).children('.infoBoxContent').fadeOut();
	});
	
	$("input:[name='paymentMethod']").click(function(event){
		if($(this).val() == 'CreditCard'){
			$("#ccvalues").show();
		$(":input",$("#ccvalues")).addClass('requiredField');
		} else {
		$(":input",$("#ccvalues")).removeClass('requiredField');
			$("#ccvalues").hide();
		}
	});


});

/*                function showDiv(divid){ 
                    var div = document.getElementById(divid);
                    div.style.display = 'block';
                } 
                function hideDiv(divid){
                    var div = document.getElementById(divid);
                    div.style.display = 'none';
                }
*/

function populateCourse(form)
{
	var val=form.city.options[form.city.options.selectedIndex].value; 
	self.location='selectcourse.php?city=' + val;
}
function populateAll(form)
{
	var val=form.course.options[form.course.options.selectedIndex].value; 
	self.location='selectcourse.php?course=' + val;
}
