//For clearing the google text out of the search box
function clearText(id){
	if (document.getElementById(id).value == "Enter Zip Code") {
		document.getElementById(id).value = "";
	}
}


$(document).ready(function(){

	$('#title .graphic').click(function(){
			document.location.href="/";			
		}
	);


	$("#body").css({height: "100%"});	
	$("#modalPopupOverlay").css({ height: document.body.clientHeight + "px" });

	$(".used-make-select").each(
		function(){
			ua_load_makes($(this).attr("id"));
		}
	);
	
	$(".zip-field").each(
		function(){
			$(this).val($.cookie("zipCode"));
		}
	);
	
	$('.zip-field').keypress( function(evt){
		var charCd = (evt.which) ? evt.which : event.keyCode;
		if (charCd > 31 && (charCd < 48 || charCd > 57))
    		return false;
 		return true;
	});	
	
	
	

});

function showPopup(sPopupID, bShow) {
	if (bShow)
	{
		$("body").css({overflow: "hidden"});
		$("#" + sPopupID).show();
		$("#modalPopupOverlay").show();
	} else {
		$("body").css({overflow: "auto"});
		$("#" + sPopupID).hide();
		$("#modalPopupOverlay").hide();
	}
}
