<!--function checkWholeForm(theForm) {    var why = "";    if ((theForm.page.value == 1) || (theForm.assessment.value == "FIT") || (theForm.assessment.value == "DRC")) {     	why += checkYear(theForm.birth_year.value);    	why += checkSEX(theForm.sex.value);    	if (theForm.assessment.value != "GWB") {    		why += checkWeight(theForm.weight.value);    	}    	if (theForm.assessment.value != "GWB" && theForm.assessment.value != "FIT") {    		why += checkDropdown(theForm.race.value, "You did not enter your race.\n");    	}    	if ((theForm.assessment.value == "GHA")) {    		why += checkDropdown(theForm.smoke_status.value, "You did not enter your tobacco use.\n");    	}    }    if (theForm.assessment.value == "FIT") {    		why += checkWaist(theForm.waist.value);    		why += checkFrame(theForm.elbow.value, theForm.wrist.value);    		why += isEmpty(theForm.flexibility.value, "You did not enter your flexibility.\n");    		why += isEmpty(theForm.pulse_rate_30_seconds.value, "You did not enter your step score.\n");    		why += isEmpty(theForm.sit_up.value, "You did not enter your situps.\n");    		why += isEmpty(theForm.push_ups.value, "You did not enter your push-ups.\n");    }    if (theForm.assessment.value == "DRC") {    		why += isEmpty(theForm.exercise.value, "You did not enter your exercise.\n");    		why += checkDropdown(theForm.siblings_have_diabetes.value, "You did not enter your sibling history.\n");    		why += checkDropdown(theForm.parents_have_diabetes.value, "You did not enter your parents history.\n");    		if(theForm.sex.value == "Male"){    			theForm.big_kid.value = 'No';    			theForm.diabetes_gdm.value = 'No';    		}    		why += checkDropdown(theForm.big_kid.value, "You did not enter your childbirth information.\n");    		why += checkDropdown(theForm.diabetes_gdm.value, "You did not enter your Gestational Diabetes information.\n");    }    if ( ((theForm.page.value == 2) && (theForm.assessment.value == "HRA")) || ( (theForm.page.value == 5) && (theForm.assessment.value == "GHA")) ){    	if (theForm.sex.value == "Male"){    		why += checkDropdown(theForm.rectal_male.value, "You did not enter your prostate exam information.\n");    	}    	if (theForm.sex.value == "Female"){    		why += checkDropdown(theForm.menarche_female.value, "You did not enter your menstrual information.\n");    		why += checkDropdown(theForm.birth_age_female.value, "You did not enter your childbirth information.\n");    		why += checkDropdown(theForm.mammogram_female.value, "You did not enter your mammogram history.\n");    		why += checkDropdown(theForm.fam_breast_cancer.value, "You did not enter your family history.\n");    		why += checkDropdown(theForm.pap_female.value, "You did not enter your pap exam history.\n");    		why += checkDropdown(theForm.hyst_female.value, "You did not enter your hysterectomy status.\n");    		why += checkDropdown(theForm.self_breast_exam.value, "You did not enter your self breast exam information.\n");    		why += checkDropdown(theForm.clinic_breast_exam.value, "You did not enter your clinical breast exam information.\n");    		why += checkDropdown(theForm.rectal_female.value, "You did not enter your rectal exam information.\n");    	}    }    if ( ( (theForm.page.value == 4) && (theForm.assessment.value == "HRA") ) || ( (theForm.page.value == 3) && (theForm.assessment.value == "CRC") ) || ( (theForm.page.value == 2) && (theForm.assessment.value == "GHA") ) ) {     	why += checkSys(theForm.bp_sys.value);     	why += checkDias(theForm.bp_dias.value);     	why += checkChol(theForm.cholesterol.value);     	why += checkHDL(theForm.hdl.value);    }    if ( (theForm.page.value == 2) && (theForm.assessment.value == "CRC") ){    		why += checkDropdown(theForm.diabetes.value, "You did not enter your diabetes status.\n");     		why += checkDropdown(theForm.heart_attack.value, "You did not enter your heart history.\n");    		why += checkDropdown(theForm.family_heart_attack.value, "You did not enter your family history.\n");    		why += checkDropdown(theForm.loss.value, "You did not enter information about recent loss.\n");    		why += checkDropdown(theForm.stress.value, "You did not enter information about stress.\n");    }    if ( (theForm.page.value == 4) && (theForm.assessment.value == "CRC") ){    		why += checkDropdown(theForm.smoke_status.value, "You did not enter your tobacco use.\n");    		why += isEmpty(theForm.exercise.value, "You did not enter your exercise.\n");    		why += checkDropdown(theForm.fiber.value, "You did not enter your fiber.\n");    		why += checkDropdown(theForm.fat.value, "You did not enter information about your fat intake.\n");    }    if ( ( (theForm.page.value == 5) && (theForm.assessment.value == "HRA") ) || ( (theForm.page.value == 3) && (theForm.assessment.value == "GHA") ) ){		if ( (theForm.assessment.value == "HRA") ){			why += checkDropdown(theForm.smoke_status.value, "You did not enter your tobacco use.\n");    		}    		if(theForm.smoke_status.value != "Never smoked"){			why += checkDropdown(theForm.cigars_day.value, "You did not enter how many cigars you smoke.\n");			why += checkDropdown(theForm.chews_day.value, "You did not enter if you use smokeless tobacco.\n");			why += checkDropdown(theForm.pipes_day.value, "You did not enter how many pipes you smoke.\n");		}    		if(theForm.smoke_status.value == "Never smoked"){    			if(theForm.cigars_day.value == ''){ theForm.cigars_day.value = 'None'; }    			if(theForm.chews_day.value == ''){ theForm.chews_day.value = 'None'; }    			if(theForm.pipes_day.value == ''){ theForm.pipes_day.value = 'None'; }    		}    }    if ( (theForm.page.value == 3) && (theForm.assessment.value == "GHA") ){    		why += checkDropdown(theForm.fat.value, "You did not enter your fat intake.\n");    		why += checkDropdown(theForm.fiber.value, "You did not enter your fiber intake.\n");    }    if ( (theForm.page.value == 5) && (theForm.assessment.value == "GHA") ){    		why += isEmpty(theForm.drinks_week.value, "You did not enter a number for alcoholic drinks.\n");    		why += checkDropdown(theForm.exercise.value, "You did not enter your exercise information.\n");    }    if ( (theForm.page.value == 6) && (theForm.assessment.value == "GHA") ){    		why += checkDropdown(theForm.overall_health.value, "You did not enter your overall health status.\n");    		why += checkDropdown(theForm.life_satisfaction.value, "You did not enter your life satisfaction.\n");    		why += checkDropdown(theForm.loss.value, "You did not enter about any losses.\n");    		why += checkDropdown(theForm.violence.value, "You did not enter about any violence.\n");    }    if ( (theForm.page.value == 7) && (theForm.assessment.value == "HRA") ){    		why += checkDropdown(theForm.breads_check.value, "You did not enter your bread intake.\n");    		why += checkDropdown(theForm.fruits_check.value, "You did not enter your fruit intake.\n");    		why += checkDropdown(theForm.vegetables_check.value, "You did not enter vegetables intake.\n");    		why += checkDropdown(theForm.meats_check.value, "You did not enter your meats intake.\n");    		why += checkDropdown(theForm.fatty_meats_check.value, "You did not enter your fatty meats intake.\n");    		why += checkDropdown(theForm.rich_breads_check.value, "You did not enter your rich breads intake.\n");    		why += checkDropdown(theForm.desserts_check.value, "You did not enter your desserts intake.\n");    }    if ( (theForm.page.value == 8) && (theForm.assessment.value == "HRA") ){    		why += isEmpty(theForm.drinks_week.value, "You did not enter a number for alcoholic drinks.\n");    }    if ( ( (theForm.page.value == 9) && (theForm.assessment.value == "HRA") ) || ( (theForm.page.value == 4) && (theForm.assessment.value == "GHA") ) ){    		theForm.miles_car.value = niceNum(theForm.miles_car.value);  		theForm.miles_motorcycle.value = niceNum(theForm.miles_motorcycle.value);    		why += checkDropdown(theForm.travel_mode.value, "You did not enter your travel mode.\n");    		why += checkDropdown(theForm.seat_belt.value, "You did not enter your seat belt habits.\n");    		why += checkDropdown(theForm.helmet.value, "You did not enter your helmet information.\n");    		why += checkDropdown(theForm.speed.value, "You did not enter your driving speed habits.\n");    		why += isEmpty(theForm.drink_and_drive.value, "You did not enter a number (please enter 0 if you do not ride with drunk drivers) about riding with drunk drivers.\n");    }    if ( (theForm.page.value == 10) && (theForm.assessment.value == "HRA") ){    		why += checkDropdown(theForm.exercise.value, "You did not enter your exercise information.\n");    }    if ( (theForm.page.value == 12) && (theForm.assessment.value == "HRA") ){    		why += checkDropdown(theForm.overall_health.value, "You did not enter your overall health status.\n");    		why += checkDropdown(theForm.life_satisfaction.value, "You did not enter your life satisfaction.\n");    		why += checkDropdown(theForm.loss.value, "You did not enter about any losses.\n");    		why += checkDropdown(theForm.q3.value, "You did not enter about your feeling depressed.\n");    		why += checkDropdown(theForm.q5.value, "You did not enter about your feeling nervous.\n");    		why += checkDropdown(theForm.q7.value, "You did not enter about your feeling downhearted.\n");    		why += checkDropdown(theForm.q8.value, "You did not enter about your feeling tense.\n");    		why += checkDropdown(theForm.q11.value, "You did not enter about your feeling sad.\n");    		why += checkDropdown(theForm.q17.value, "You did not enter about your feeling anxious.\n");    		why += checkDropdown(theForm.q19.value, "You did not enter about your feeling relaxed.\n");    		why += checkDropdown(theForm.q22.value, "You did not enter about your feeling pressure.\n");    }    if (why != "") {       alert(why);       return false;    }return true;}function checkMailForm(theForm) {    var why = "";    why += isEmpty(theForm.name.value, "You did not enter your name.\n");    why += isEmpty(theForm.company.value, "You did not enter your company.\n");    why += isEmpty(theForm.phone.value, "You did not enter your phone number.\n");    why += isEmpty(theForm.email.value, "You did not enter your email.\n");    if (why != "") {       alert(why);       return false;    }return true;}function checkWeight(weight) {    var error = "";    if (weight == "") {        error = "You did not enter your weight.\n";    }    num = parseInt(weight);    if (num < 50 || num > 700) {    	error += "The weight must be between 50 and 700 for this assessment.\n";    }    return error;}function checkWaist(waist) {    var error = "";    if (waist == "") {        error = "You didn't enter your waist size.\n";    }    num = parseInt(waist);    if (num < 10 || num > 90) {    	error += "The waist size must be between 10 and 90 for this assessment.\n";    }    return error;}function checkFrame(elbow, wrist) {    var error = "";    if ((wrist == "0") && (elbow == "0")){        error = "You did not enter your wrist or elbow size.\n";    }    return error;}function checkYear(year) {    var error = "";    if (year == "") {        error = "The year of birth must be between 1900 and 1990 for this assessment.\n";    }    num = parseInt(year);    if (num < 1900 || num > 1990) {    	error = "The year of birth must be between 1900 and 1990 for this assessment.\n";    }    return error;}function checkSys(systolic) {    var error = "";    if (systolic == "" && (theForm.bp_check.value <= 0)) {        error = "You didn't enter your systolic blood pressure value.\n";    }    num = parseInt(systolic);    if ((num < 90 || num > 300) && (theForm.bp_check.value <= 0)) {    	error += "The systolic blood pressure number must be between 90 and 300 for this assessment.\n";    }    return error;}function checkDias(diastolic) {    var error = "";    if (diastolic == "" && (theForm.bp_check.value <= 0)) {        error = "You did not enter your diastolic blood pressure value.\n";    }    num = parseInt(diastolic);    if ((num < 50 || num > 150) && (theForm.bp_check.value <= 0)) {    	error += "The diastolic blood pressure number must be between 50 and 150 for this assessment.\n";    }    return error;}function checkChol(cholesterol) {    var error = "";    if (cholesterol == "" && (theForm.cholesterol_check.value <= 0)) {        error = "You did not enter your total cholesterol value.\n";    }    num = parseInt(cholesterol);    if ((num < 150 || num > 350) && (theForm.cholesterol_check.value <= 0)){    	error += "The total cholesterol number must be between 150 and 350 for this assessment.\n";    }    return error;}function checkHDL(hdl) {    var error = "";    if (hdl == "" && (theForm.cholesterol_check.value <= 0)) {        error = "You did not enter your HDL (good) cholesterol value.\n";    }    num = parseInt(hdl);    if ((num < 5 || num > 150) && (theForm.cholesterol_check.value <= 0)){    	error += "The total cholesterol number must be between 5 and 150 for this assessment.\n";    }    return error;}// Sexfunction checkSEX (strng) {var error = "";if (strng == "") {   error = "You did not enter your gender.\n";}    if (!(strng == "Male") && !(strng == "Female") ) {       error = "You did not enter your gender.\n";    }return error;}// non-empty textboxfunction isEmpty(strng, msg) {var error = "";  if (strng.length == 0) {     error = msg;  }return error;}// was textbox alteredfunction isDifferent(strng) {var error = "";  if (strng != "Can\'t touch this!") {     error = "You altered the inviolate text area.\n";  }return error;}// exactly one radio button is chosenfunction checkRadio(checkvalue, msg) {var error = "";   if (!(checkvalue)) {       error = msg;    }return error;}// valid selector from dropdown listfunction checkDropdown(choice,msg) {var error = "";    if (choice == "") {    error = msg;    }return error;}function gorecords(){	if (confirm("This will take you back to your Assessment Records page and you will lose any data\n entered on this assessment.  Is this what you want to do?")){		 window.location.href = "%%cgi_dir_short%%/assessment_recs.cgi";	}}function logout() {	if (confirm("If you chose to leave the assessments area you will have to reenter through the login page, continue?")) {		 window.location.href = "%%cgi_dir_short%%/logout.cgi"	}}function gohome() {	if (confirm("If you choose to leave the assessment it\nwill cause your session to logout and you\nwill lose any data entered.  You will need\nto reenter through the login page, continue?")) {		 window.location.href = "%%cgi_dir_short%%/logout.cgi"	}}function displayWindow(theURL,winName,width,height,features) {    var window_width = width;    var window_height = height;    var newfeatures= features;    var window_top = (screen.height-window_height)/2;    var window_left = (screen.width-window_width)/2;    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');    newWindow.focus();}function MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function P7_autoLayers() { //v1.4 by PVII var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0; if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){ p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){ b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){ if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false; for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}} if(!f){p7c[a][p7c[a].length++]=args[k];}}}}function niceNumTxt(textNumIn){///////THIS FUNCTION RETURNS A TEXT NUMBER WITHOUT COMMAS, ETC.//Initialipe function vars;textInMessy=""+textNumIn;textOutNice="";digits="01234567890";foundDigit=0;foundDecimal=0;//Only read digits PLUS... minus sign or single decimal point;for (p=0;p<textInMessy.length;p++){//Accept any digit.if(digits.indexOf(textInMessy.substring(p,p+1)) != -1){textOutNice+=textInMessy.substring(p,p+1);foundDigit=1;};//Accept a minus sign if nothing else found so far:if(textInMessy.substring(p,p+1) == "\-" && foundDigit==0 ){textOutNice+=textInMessy.substring(p,p+1);foundDigit=1;};//Accept a decimal point if none found so far:if(textInMessy.substring(p,p+1) == "\." && foundDecimal==0 ){textOutNice+=textInMessy.substring(p,p+1);foundDecimal=1;};};//If no digits at all then use zero.if (textOutNice ==""){textOutNice="0"};//Exit function always with nice TEXTreturn textOutNice;};function niceNum(textNumIn){////THIS FUNCTION ALWAYS RETURNS A NUMBER//Exit function always with a valid numeric floatreturn parseFloat(niceNumTxt(textNumIn));};//-->