
// click event for checkboxes writes "must have" next to required form elements : dynamically according to which checkboxes are selected
function mustHaves(){
	reqsChecks = new Array();
	// reqsChecks is a paralell array to reqs.  reqs has the form element name, reqsChecks has the required state ( zero or one )
	// if address is required and phone is not ... reqs[3]="address"; reqs[6]="phone"; reqsChecks[3]=1; reqsChecks[6]=0;
	for(i=0;i<reqs.length;i++){
		reqsChecks[i] = 0;
	}
	a = "unchecked";
	if($("#wantavailability").attr("checked")){
		for( i in wantavailability){
			for(j in reqs){
				if(reqs[j]==wantavailability[i]){
					reqsChecks[j] = 1;
				}
			}
		}
	}
	if($("#wantquote").attr("checked")){
		for( i in wantquote){
			for(j in reqs){
				if(reqs[j]==wantquote[i]){
					reqsChecks[j] = 1;
				}
			}
		}
	}
	if($("#wantpromopack").attr("checked")){
		for( i in wantpromopack){
			for(j in reqs){
				if(reqs[j]==wantpromopack[i]){
					reqsChecks[j] = 1;
				}
			}
		}
	}
	if($("#wantcall").attr("checked")){
		for( i in wantcall){
			for(j in reqs){
				if(reqs[j]==wantcall[i]){
					reqsChecks[j] = 1;
				}
			}
		}
	}
	for( i in reqs){
		reqName = "#req" + reqs[i];
		if(reqsChecks[i]){
			$(reqName).html("must have &raquo;");
			$(reqName).animate( { right: 10 }, 'slow').animate({ right: 0}, 'fast');
		}else{
		 	$(reqName).html("");
		}
	}
}