/* AACP Survey specific javascript validation rules*/


function confirm_survey_submit( stype ) {

    var survey_type = 'Student'
    
    if ( stype == 7 ) {
        survey_type = 'Professional and Graduate Degree Programs'
    } else if ( stype == 8 ) {
        survey_type = 'Tuition'
    } else if ( stype == 9 ) {
        survey_type = 'Vacancy'
    } else if ( stype == 10 ) {
        survey_type = 'Financial'
    }
                
    if(confirm('Are you sure you would now like to submit '+survey_type+' Surveys to AACP? You will not be able to edit surveys later.')) {
   
      if( document.survey.submit ) {
        document.survey.submit();	
        return true;
      }
    }
    return false;    
}

function confirm_survey_reopen( stype ) {

    var survey_type = 'Annual Student'
    
    if ( stype == 7 ) {
        survey_type = 'Professional and Graduate Degree Programs'
    } else if ( stype == 8 ) {
        survey_type = 'Tuition'
    } else if ( stype == 9 ) {
        survey_type = 'Vacancy'
    } else if ( stype == 10 ) {
        survey_type = 'Financial'
    }
    
    if(confirm('Are you sure you would now like to reopen '+ survey_type +' Surveys back to this school?')) 	{
    
        eval('document.survey_reopen.submit()');	
        return true;
    }
    return false;        
}
        

function resetColor(target) {
    
    target.style.color = '#000000';
    target.style.background = '#FFFFFF';    
}

function setSectionComplete() {
    
    var nr = document.forms[0].not_required.checked;
    
    if( nr == true ) {
    
            alert('Please click the Save button at the bottom of the page to proceed to next survey.');
            document.forms[0].section_status.checked = true;
            document.forms[0].submit.focus();
    }
}
    
// ************************************************************
// Show the alert message to save any changes, while going back 
// to section list or survey list.
// ************************************************************
function confirm_save(flag) {

    if(flag == 1) {

        if(confirm('Please remember to save the form data before you leave this page.\nAre you sure you would now like to go back to the Survey Section page?')) {
            eval('document.back_to_section.submit()');
        }

    } else if(flag == 2) {

            eval('document.back_to_section.submit()');

    } else if(flag == 3) {

        if(confirm('Please remember to save the form data before you leave this page.\nAre you sure you would now like to go back to the Annual Survey page?')) {
            eval('document.back_to_surveys.submit()');
        }

    } else {

        eval('document.back_to_surveys.submit()');
    }

    return false;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total.
// ************************************************************

function set_app_race_total( race, gender ) {

    var a;
    var b;
    var c;

    var rtotal;
    var r_tag;


    if(race == 1) {

	    a = eval('document.forms[0].APP_WHITE_M.value');
	    b = eval('document.forms[0].APP_WHITE_F.value');
	    c = eval('document.forms[0].APP_WHITE_UK.value');

        r_tag = eval('document.forms[0].APP_WHITE_T');
        

    } else if (race == 2 ) {

	    a = eval('document.forms[0].APP_BLACK_M.value');
	    b = eval('document.forms[0].APP_BLACK_F.value');
	    c = eval('document.forms[0].APP_BLACK_UK.value');

    	r_tag = eval('document.forms[0].APP_BLACK_T');

    } else if (race == 3 ) {

	    a = eval('document.forms[0].APP_HISP_M.value');
	    b = eval('document.forms[0].APP_HISP_F.value');
	    c = eval('document.forms[0].APP_HISP_UK.value');

    	r_tag = eval('document.forms[0].APP_HISP_T');

    } else if (race == 4 ) {

	    a = eval('document.forms[0].APP_ASIAN_M.value');
	    b = eval('document.forms[0].APP_ASIAN_F.value');
	    c = eval('document.forms[0].APP_ASIAN_UK.value');

    	r_tag = eval('document.forms[0].APP_ASIAN_T');

    } else if (race == 5 ) {

	    a = eval('document.forms[0].APP_AI_M.value');
	    b = eval('document.forms[0].APP_AI_F.value');
	    c = eval('document.forms[0].APP_AI_UK.value');

    	r_tag = eval('document.forms[0].APP_AI_T');

    } else if (race == 6 ) {

	    a = eval('document.forms[0].APP_OTHER_M.value');
	    b = eval('document.forms[0].APP_OTHER_F.value');
	    c = eval('document.forms[0].APP_OTHER_UK.value');

    	r_tag = eval('document.forms[0].APP_OTHER_T');

    } else if (race == 7 ) {

	    a = eval('document.forms[0].APP_FOREIGN_M.value');
	    b = eval('document.forms[0].APP_FOREIGN_F.value');
	    c = eval('document.forms[0].APP_FOREIGN_UK.value');

    	r_tag = eval('document.forms[0].APP_FOREIGN_T');

    } else if (race == 8 ) {

	    a = eval('document.forms[0].APP_TOTAL_M.value');
	    b = eval('document.forms[0].APP_TOTAL_F.value');
	    c = eval('document.forms[0].APP_TOTAL_UK.value');

    	r_tag = eval('document.forms[0].APP_TOTAL_T');

    }

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
	
	var rtotal= parseInt(a) + parseInt(b) + parseInt(c);

    rtotal = rtotal == 0 ? '' : rtotal;
    r_tag.value = rtotal;

    /* Gender */

    var gtotal;
    var g_tag;

	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;

    if(gender == 1) {
    
	    d = eval('document.forms[0].APP_WHITE_M.value');          
	    e = eval('document.forms[0].APP_BLACK_M.value');          
	    f = eval('document.forms[0].APP_HISP_M.value');           
	    g = eval('document.forms[0].APP_ASIAN_M.value');          
	    h = eval('document.forms[0].APP_AI_M.value');             
	    i = eval('document.forms[0].APP_OTHER_M.value');          
	    j = eval('document.forms[0].APP_FOREIGN_M.value');     

    	g_tag = eval('document.forms[0].APP_TOTAL_M');
   
    } else if(gender == 2) {
    
	    d = eval('document.forms[0].APP_WHITE_F.value');          
	    e = eval('document.forms[0].APP_BLACK_F.value');          
	    f = eval('document.forms[0].APP_HISP_F.value');           
	    g = eval('document.forms[0].APP_ASIAN_F.value');          
	    h = eval('document.forms[0].APP_AI_F.value');             
	    i = eval('document.forms[0].APP_OTHER_F.value');          
	    j = eval('document.forms[0].APP_FOREIGN_F.value');     

    	g_tag = eval('document.forms[0].APP_TOTAL_F');
   
    } else if(gender == 3) {
    
	    d = eval('document.forms[0].APP_WHITE_UK.value');          
	    e = eval('document.forms[0].APP_BLACK_UK.value');          
	    f = eval('document.forms[0].APP_HISP_UK.value');           
	    g = eval('document.forms[0].APP_ASIAN_UK.value');          
	    h = eval('document.forms[0].APP_AI_UK.value');             
	    i = eval('document.forms[0].APP_OTHER_UK.value');          
	    j = eval('document.forms[0].APP_FOREIGN_UK.value');     

    	g_tag = eval('document.forms[0].APP_TOTAL_UK');
   
     } else if(gender == 4) {
    
	    d = eval('document.forms[0].APP_WHITE_T.value');          
	    e = eval('document.forms[0].APP_BLACK_T.value');          
	    f = eval('document.forms[0].APP_HISP_T.value');           
	    g = eval('document.forms[0].APP_ASIAN_T.value');          
	    h = eval('document.forms[0].APP_AI_T.value');             
	    i = eval('document.forms[0].APP_OTHER_T.value');          
	    j = eval('document.forms[0].APP_FOREIGN_T.value');     

    	g_tag = eval('document.forms[0].APP_TOTAL_T');
   
    }

	d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;

    var gtotal= parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) + parseInt(h) + parseInt(i) + parseInt(j);
    gtotal = gtotal == 0 ? '' : gtotal;
    g_tag.value = gtotal;

    set_ethnic_total();

	return true;
}


/**************************************************************/

function set_ethnic_total() {

    var wm = eval('document.forms[0].APP_WHITE_M.value');
    var wf = eval('document.forms[0].APP_WHITE_F.value');
    var wu = eval('document.forms[0].APP_WHITE_UK.value');

    var bm = eval('document.forms[0].APP_BLACK_M.value');
    var bf = eval('document.forms[0].APP_BLACK_F.value');
    var bu = eval('document.forms[0].APP_BLACK_UK.value');

    var hm = eval('document.forms[0].APP_HISP_M.value');
    var hf = eval('document.forms[0].APP_HISP_F.value');
    var hu = eval('document.forms[0].APP_HISP_UK.value');

    var am = eval('document.forms[0].APP_ASIAN_M.value');
    var af = eval('document.forms[0].APP_ASIAN_F.value');
    var au = eval('document.forms[0].APP_ASIAN_UK.value');

    var rm = eval('document.forms[0].APP_AI_M.value');
    var rf = eval('document.forms[0].APP_AI_F.value');
    var ru = eval('document.forms[0].APP_AI_UK.value');

    var om = eval('document.forms[0].APP_OTHER_M.value');
    var of = eval('document.forms[0].APP_OTHER_F.value');
    var ou = eval('document.forms[0].APP_OTHER_UK.value');

    var fm = eval('document.forms[0].APP_FOREIGN_M.value');
    var ff = eval('document.forms[0].APP_FOREIGN_F.value');
    var fu = eval('document.forms[0].APP_FOREIGN_UK.value');

    
    wm = parseInt(wm)? parseInt(wm) : 0;
	wf = parseInt(wf)? parseInt(wf) : 0;
	wu = parseInt(wu)? parseInt(wu) : 0;

    bm = parseInt(bm)? parseInt(bm) : 0;
	bf = parseInt(bf)? parseInt(bf) : 0;
	bu = parseInt(bu)? parseInt(bu) : 0;

    hm = parseInt(hm)? parseInt(hm) : 0;
	hf = parseInt(hf)? parseInt(hf) : 0;
	hu = parseInt(hu)? parseInt(hu) : 0;

    am = parseInt(am)? parseInt(am) : 0;
	af = parseInt(af)? parseInt(af) : 0;
	au = parseInt(au)? parseInt(au) : 0;

    rm = parseInt(rm)? parseInt(rm) : 0;
	rf = parseInt(rf)? parseInt(rf) : 0;
	ru = parseInt(ru)? parseInt(ru) : 0;

    om = parseInt(om)? parseInt(om) : 0;
	of = parseInt(of)? parseInt(of) : 0;
	ou = parseInt(ou)? parseInt(ou) : 0;

    fm = parseInt(fm)? parseInt(fm) : 0;
	ff = parseInt(ff)? parseInt(ff) : 0;
	fu = parseInt(fu)? parseInt(fu) : 0;

    var ftotal = parseInt(wm) + parseInt(wf) + parseInt(wu) +
                 parseInt(bm) + parseInt(bf) + parseInt(bu) +
                 parseInt(hm) + parseInt(hf) + parseInt(hu) +
                 parseInt(am) + parseInt(af) + parseInt(au) +
                 parseInt(rm) + parseInt(rf) + parseInt(ru) +
                 parseInt(om) + parseInt(of) + parseInt(ou) +
                 parseInt(fm) + parseInt(ff) + parseInt(fu);

    var g_tag = eval('document.forms[0].APP_TOTAL_T');
    ftotal = ftotal == 0 ? '' : ftotal;
    g_tag.value = ftotal;

}


// ************************************************************
// Calculate the sum of all experience breakdowns and set to the total.
// ************************************************************

function set_app_experience_total( expe, gender ) {

    var a;
    var b;
    var c;

    var rtotal;
    var r_tag;


    if(expe == 1) {

	    a = eval('document.forms[0].APP_EXP_NO_COL_M.value');
	    b = eval('document.forms[0].APP_EXP_NO_COL_F.value');
	    c = eval('document.forms[0].APP_EXP_NO_COL_UK.value');

        r_tag = eval('document.forms[0].APP_EXP_NO_COL_T');
        

    } else if (expe == 2 ) {

	    a = eval('document.forms[0].APP_EXP_COL_1_2_YRS_M.value');
	    b = eval('document.forms[0].APP_EXP_COL_1_2_YRS_F.value');
	    c = eval('document.forms[0].APP_EXP_COL_1_2_YRS_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_COL_1_2_YRS_T');

    } else if (expe == 3 ) {

	    a = eval('document.forms[0].APP_EXP_AS_M.value');
	    b = eval('document.forms[0].APP_EXP_AS_F.value');
	    c = eval('document.forms[0].APP_EXP_AS_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_AS_T');

    } else if (expe == 4 ) {

	    a = eval('document.forms[0].APP_EXP_COL_3_YRS_M.value');
	    b = eval('document.forms[0].APP_EXP_COL_3_YRS_F.value');
	    c = eval('document.forms[0].APP_EXP_COL_3_YRS_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_COL_3_YRS_T');

    } else if (expe == 5 ) {

	    a = eval('document.forms[0].APP_EXP_BS_M.value');
	    b = eval('document.forms[0].APP_EXP_BS_F.value');
	    c = eval('document.forms[0].APP_EXP_BS_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_BS_T');

    } else if (expe == 6 ) {

	    a = eval('document.forms[0].APP_EXP_MS_M.value');
	    b = eval('document.forms[0].APP_EXP_MS_F.value');
	    c = eval('document.forms[0].APP_EXP_MS_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_MS_T');

    } else if (expe == 7 ) {

	    a = eval('document.forms[0].APP_EXP_PHD_M.value');
	    b = eval('document.forms[0].APP_EXP_PHD_F.value');
	    c = eval('document.forms[0].APP_EXP_PHD_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_PHD_T');

    } else if (expe == 8 ) {

	    a = eval('document.forms[0].APP_EXP_TOTAL_M.value');
	    b = eval('document.forms[0].APP_EXP_TOTAL_F.value');
	    c = eval('document.forms[0].APP_EXP_TOTAL_UK.value');

    	r_tag = eval('document.forms[0].APP_EXP_TOTAL_T');

    }

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
	
	var rtotal= parseInt(a) + parseInt(b) + parseInt(c);
	rtotal = rtotal == 0 ? '': rtotal;
	
    r_tag.value = rtotal;

    /* Gender */

    var gtotal;
    var g_tag;

	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;

    if(gender == 1) {
    
	    d = eval('document.forms[0].APP_EXP_NO_COL_M.value');          
	    e = eval('document.forms[0].APP_EXP_COL_1_2_YRS_M.value');          
	    f = eval('document.forms[0].APP_EXP_AS_M.value');           
	    g = eval('document.forms[0].APP_EXP_COL_3_YRS_M.value');          
	    h = eval('document.forms[0].APP_EXP_BS_M.value');             
	    i = eval('document.forms[0].APP_EXP_MS_M.value');          
	    j = eval('document.forms[0].APP_EXP_PHD_M.value');     

    	g_tag = eval('document.forms[0].APP_EXP_TOTAL_M');
   
    } else if(gender == 2) {
    
	    d = eval('document.forms[0].APP_EXP_NO_COL_F.value');          
	    e = eval('document.forms[0].APP_EXP_COL_1_2_YRS_F.value');          
	    f = eval('document.forms[0].APP_EXP_AS_F.value');           
	    g = eval('document.forms[0].APP_EXP_COL_3_YRS_F.value');          
	    h = eval('document.forms[0].APP_EXP_BS_F.value');             
	    i = eval('document.forms[0].APP_EXP_MS_F.value');          
	    j = eval('document.forms[0].APP_EXP_PHD_F.value');     

    	g_tag = eval('document.forms[0].APP_EXP_TOTAL_F');
   
    } else if(gender == 3) {
    
	    d = eval('document.forms[0].APP_EXP_NO_COL_UK.value');          
	    e = eval('document.forms[0].APP_EXP_COL_1_2_YRS_UK.value');          
	    f = eval('document.forms[0].APP_EXP_AS_UK.value');           
	    g = eval('document.forms[0].APP_EXP_COL_3_YRS_UK.value');          
	    h = eval('document.forms[0].APP_EXP_BS_UK.value');             
	    i = eval('document.forms[0].APP_EXP_MS_UK.value');          
	    j = eval('document.forms[0].APP_EXP_PHD_UK.value');     

    	g_tag = eval('document.forms[0].APP_EXP_TOTAL_UK');
   
     } else if(gender == 4) {
    
	    d = eval('document.forms[0].APP_EXP_NO_COL_T.value');          
	    e = eval('document.forms[0].APP_EXP_COL_1_2_YRS_T.value');          
	    f = eval('document.forms[0].APP_EXP_AS_T.value');           
	    g = eval('document.forms[0].APP_EXP_COL_3_YRS_T.value');          
	    h = eval('document.forms[0].APP_EXP_BS_T.value');             
	    i = eval('document.forms[0].APP_EXP_MS_T.value');          
	    j = eval('document.forms[0].APP_EXP_PHD_T.value');     

    	g_tag = eval('document.forms[0].APP_EXP_TOTAL_T');
   
    }

	d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;

    var gtotal= parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) + parseInt(h) + parseInt(i) + parseInt(j);

    gtotal = gtotal == 0 ? '': gtotal;
    g_tag.value = gtotal;

    set_experience_total();

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total.
// ************************************************************

function set_experience_total() {

	var no_m = eval('document.forms[0].APP_EXP_NO_COL_M.value');
	var no_f = eval('document.forms[0].APP_EXP_NO_COL_F.value');
	var no_u = eval('document.forms[0].APP_EXP_NO_COL_UK.value');
	var co_m = eval('document.forms[0].APP_EXP_COL_1_2_YRS_M.value');
	var co_f = eval('document.forms[0].APP_EXP_COL_1_2_YRS_F.value');
	var co_u = eval('document.forms[0].APP_EXP_COL_1_2_YRS_UK.value');
	var as_m = eval('document.forms[0].APP_EXP_AS_M.value');
	var as_f = eval('document.forms[0].APP_EXP_AS_F.value');
	var as_u = eval('document.forms[0].APP_EXP_AS_UK.value');
	var c3_m = eval('document.forms[0].APP_EXP_COL_3_YRS_M.value');
	var c3_f = eval('document.forms[0].APP_EXP_COL_3_YRS_F.value');
	var c3_u = eval('document.forms[0].APP_EXP_COL_3_YRS_UK.value');
	var bs_m = eval('document.forms[0].APP_EXP_BS_M.value');
	var bs_f = eval('document.forms[0].APP_EXP_BS_F.value');
	var bs_u = eval('document.forms[0].APP_EXP_BS_UK.value');
	var ms_m = eval('document.forms[0].APP_EXP_MS_M.value');
	var ms_f = eval('document.forms[0].APP_EXP_MS_F.value');
	var ms_u = eval('document.forms[0].APP_EXP_MS_UK.value');
	var ph_m = eval('document.forms[0].APP_EXP_PHD_M.value');
	var ph_f = eval('document.forms[0].APP_EXP_PHD_F.value');
	var ph_u = eval('document.forms[0].APP_EXP_PHD_UK.value');


    
        no_m = parseInt(no_m)? parseInt(no_m) : 0;
        no_f = parseInt(no_f)? parseInt(no_f) : 0;
        no_u = parseInt(no_u)? parseInt(no_u) : 0;
        co_m = parseInt(co_m)? parseInt(co_m) : 0;
        co_f = parseInt(co_f)? parseInt(co_f) : 0;
        co_u = parseInt(co_u)? parseInt(co_u) : 0;
        as_m = parseInt(as_m)? parseInt(as_m) : 0;
        as_f = parseInt(as_f)? parseInt(as_f) : 0;
        as_u = parseInt(as_u)? parseInt(as_u) : 0;
        c3_m = parseInt(c3_m)? parseInt(c3_m) : 0;
        c3_f = parseInt(c3_f)? parseInt(c3_f) : 0;
        c3_u = parseInt(c3_u)? parseInt(c3_u) : 0;
        bs_m = parseInt(bs_m)? parseInt(bs_m) : 0;
        bs_f = parseInt(bs_f)? parseInt(bs_f) : 0;
        bs_u = parseInt(bs_u)? parseInt(bs_u) : 0;
        ms_m = parseInt(ms_m)? parseInt(ms_m) : 0;
        ms_f = parseInt(ms_f)? parseInt(ms_f) : 0;
        ms_u = parseInt(ms_u)? parseInt(ms_u) : 0;
        ph_m = parseInt(ph_m)? parseInt(ph_m) : 0;
        ph_f = parseInt(ph_f)? parseInt(ph_f) : 0;
        ph_u = parseInt(ph_u)? parseInt(ph_u) : 0;

    var ftotal = parseInt(no_m) + parseInt(no_f) + parseInt(no_u) +
                 parseInt(co_m) + parseInt(co_f) + parseInt(co_u) +
                 parseInt(as_m) + parseInt(as_f) + parseInt(as_u) +
                 parseInt(c3_m) + parseInt(c3_f) + parseInt(c3_u) +
                 parseInt(bs_m) + parseInt(bs_f) + parseInt(bs_u) +
                 parseInt(ms_m) + parseInt(ms_f) + parseInt(ms_u) +
                 parseInt(ph_m) + parseInt(ph_f) + parseInt(ph_u);

    var g_tag = eval('document.forms[0].APP_EXP_TOTAL_T');

    ftotal = ftotal == 0 ? '': ftotal;
    g_tag.value = ftotal;

}


// ************************************************************
// Calculate the sum of all residency breakdowns and set to the total.
// ************************************************************

function set_app_residency_total( expe, gender ) {

    var a;
    var b;
    var c;

    var rtotal;
    var r_tag;


    if(expe == 1) {

	    a = eval('document.forms[0].APP_RESIDENCY_INSTATE_M.value');
	    b = eval('document.forms[0].APP_RESIDENCY_INSTATE_F.value');
	    c = eval('document.forms[0].APP_RESIDENCY_INSTATE_UK.value');

        r_tag = eval('document.forms[0].APP_RESIDENCY_INSTATE_T');
        

    } else if (expe == 2 ) {

	    a = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_M.value');
	    b = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_F.value');
	    c = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_UK.value');

    	r_tag = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_T');

    } else if (expe == 3 ) {

	    a = eval('document.forms[0].APP_RESIDENCY_TOTAL_M.value');
	    b = eval('document.forms[0].APP_RESIDENCY_TOTAL_F.value');
	    c = eval('document.forms[0].APP_RESIDENCY_TOTAL_UK.value');

    	r_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_T');

    } 

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
	var rtotal= parseInt(a) + parseInt(b) + parseInt(c);

	rtotal = rtotal == 0 ? '' : rtotal;
    r_tag.value = rtotal;

    /* Gender */

    var gtotal;
    var g_tag;

	var d;
	var e;

    if(gender == 1) {
    
	    d = eval('document.forms[0].APP_RESIDENCY_INSTATE_M.value');          
	    e = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_M.value');          

    	g_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_M');
   
    } else if(gender == 2) {
    
	    d = eval('document.forms[0].APP_RESIDENCY_INSTATE_F.value');          
	    e = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_F.value');          

    	g_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_F');
   
    } else if(gender == 3) {
    
	    d = eval('document.forms[0].APP_RESIDENCY_INSTATE_UK.value');          
	    e = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_UK.value');          

    	g_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_UK');
   
    } else if(gender == 4) {
    
	    d = eval('document.forms[0].APP_RESIDENCY_INSTATE_T.value');          
	    e = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_T.value');          

    	g_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_T');
   
    } 

	d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;

    var gtotal= parseInt(d) + parseInt(e);

	gtotal = gtotal == 0 ? '' : gtotal;
    g_tag.value = gtotal;

    set_residency_total();

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total.
// ************************************************************

function set_residency_total() {

    var a = eval('document.forms[0].APP_RESIDENCY_INSTATE_M.value');
	var b = eval('document.forms[0].APP_RESIDENCY_INSTATE_F.value');
	var c = eval('document.forms[0].APP_RESIDENCY_INSTATE_UK.value');

    var d = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_M.value');
	var e = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_F.value');
	var f = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_UK.value');


   
    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
    e = parseInt(e)? parseInt(e) : 0;
    f = parseInt(f)? parseInt(f) : 0;


    var ftotal = parseInt(a) + parseInt(b) + parseInt(c) +
                 parseInt(d) + parseInt(e) + parseInt(f);

    var g_tag = eval('document.forms[0].APP_RESIDENCY_TOTAL_T');

	ftotal = ftotal == 0 ? '' : ftotal;
    g_tag.value = ftotal;

}

// ************************************************************
// Check if the GRE values are between 0 and 4
// ************************************************************
function check_gpa_value()  {

	var GPAArray = new Array();
	var GPATagArray = new Array();
	
	GPAArray[0] = 'APP_AVG_GPA_M';
	GPAArray[1] = 'APP_AVG_GPA_F';
	GPAArray[2] = 'APP_AVG_GPA_UK';
	
	GPATagArray[0] = 't_APP_AVG_GPA_M';
	GPATagArray[1] = 't_APP_AVG_GPA_F';
	GPATagArray[2] = 't_APP_AVG_GPA_UK';
	
	var i;
    				   	
	for (i =0;i<3;i = i+1) 	{

		var gpa = eval('document.forms[0].'+GPAArray[i]+'.value');
		
		var tag = document.all ?  document.all.t_APP_AVG_GPA // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_AVG_GPA') // NN6
    				   : null; 		
		if(gpa > 4 && gpa != '')
		{
			alert("GPA value should be between 0 and 4.00");
			tag.className = 'tfvHighlight';
			
			eval('document.forms[0].'+GPAArray[i]+'.focus()');
			return false;
		}	
		tag.className = 'tfvNormal';
	}	
	return true;
}

// ************************************************************
// Set the average value in the Total Avg age field.
// ************************************************************
function set_average_age () {

   var a = eval('document.forms[0].APP_AVG_AGE_M.value');
   var b = eval('document.forms[0].APP_AVG_AGE_F.value');
   var c = eval('document.forms[0].APP_AVG_AGE_UK.value');

   var age = new Array();
   age[0] = a;
   age[1] = b;
   age[2] = c;
   
   var i;
   var num = 0;
   var ftotal = 0;
   //alert("a = " + a + "\n" + "b = " + b + "\n" +"c = " + c);     				   	
   for (i =0;i<3;i = i+1) 	{

      if(age[i] != '' && age[i] > 0 ) {
         ftotal = ftotal + parseFloat(age[i]);
         num = num + 1;
      }
   }

   //a = parseFloat(a)? parseFloat(a) : 0;
   //b = parseFloat(b)? parseFloat(b) : 0;
   //c = parseFloat(c)? parseFloat(c) : 0;

   //var ftotal = parseFloat(a) + parseFloat(b) + parseFloat(c);
   var g_tag = eval('document.forms[0].APP_AVG_AGE_T');
   if ( num > 0 ) {
      var avg = ftotal/num;
      avg     = Math.round(avg * 100) / 100;

      g_tag.value = avg;
   } 
   else {
      g_tag.value = '';
   }
}

////////////////////////////////////////////////////////////
// function kill_keys_nzero(e, ele_name, gpa, id_tag)
//  - forces the user to enter a positive float only
//
// arguments:
//           e                 event = needed for IE
//           ele_name          this
//           gpa (optional)    flag to overload for more specific validations (so far just "gpa")
//           id_tag (optional) ID of other element to be manipulated    
//
function kill_keys_nzero(e, ele_name, gpa, id_tag) {
   var a = ele_name.value;
   if (!e) var e = window.event;
   var g_tag = ele_name;

   // non-digits /^[\d\.]+$/
   var numeric_format = /^[\d\.]+$/;
   for (i = 0; i <= a.length; i++) {
      if ( ! numeric_format.test(a.charAt(i)) && e.keyCode > 40 ) {
         if(a.substring((i+1),a.length)){
            a = a.substring(0,(i)) + a.substring((i+1),a.length);
            i--;
         }
         else {
            a = a.substring(0,(i));
         }
         g_tag.value = a;
      }
   }

   /////////////////////////////////////////////////////////////
   // leading zero
   //
   // Allow a leading zero only as the only character in anticipation 
   // of the 2nd character possibly being a decimal point. Edit only
   // when the 2nd character is not a zero.
   var lz_test = '1';
   while( lz_test == '1' &&  a.length > 0) {
      if (a.charAt(0) == '0' && e.keyCode != 13) {
         // alert("leading zero detected: \n\ne.keyCode = " + e.keyCode + ", \na.length = " + a.length + ".\n" + "lz_test = " + lz_test + ".");
         if( a.length > 1 ) {          // do editing if length is > 1
            if ( a.charAt(1) == '.' ){ // allow if 2nd character is a decimal
               // alert("allowing leading zero with adjacent decimal: \n\ne.keyCode = " + e.keyCode + ", \na.length = " + a.length + ".\n" + "lz_test = " + lz_test + "." );
               lz_test = '0';
            }
            else { // remove the leading zero
               // alert("leading zero not allowed: \n\ne.keyCode = " + e.keyCode + ", \na.length = " + a.length + ".\n" + "lz_test = " + lz_test + ".");
               a = a.substring(1, a.length);
               if( a.length > 0) {
                  g_tag.value = a;
               }
               lz_test = '0';
            }
         }
         else { // leave the leading zero for now
            // alert("leading zero allowed (FOR NOW...): \n\ne.keyCode = " + e.keyCode + ", \na.length = " + a.length + ".\n" + "lz_test = " + lz_test + ".");
            a = a.substring(1, a.length);
            if( a.length > 0) {
               g_tag.value = a;
            }
            lz_test = '0';
         } // end if a.length > 1
      } // end if leading zero

      lz_test = '0';
   } // end while lz_test && a.length > 0

   /////////////////////////////////////////////////////////////////
   // insert a leading zero when input begins with a decimal point
   //
   if (a.charAt(0) == '.'  && e.keyCode != 13) {
      // alert("inserting leading zero for decimal point: \n\ne.keyCode = " + e.keyCode + ", \na.length = " + a.length + ".\n" + "lz_test = " + lz_test + ".");
      a = '0' + a;
      g_tag.value = a;
   }

   // more than 1 decimal point
   var num_decimals=0;
   for (i = 0; i <= a.length; i++) {
      if (a.charAt(i) == '.') {
         num_decimals++;
         if(num_decimals > 1){
            a = a.substring(0,((a.length) - 1));
            g_tag.value = a;
            i--;
         }
      }     
   } 

   ////////////////////////////////////////////////////////////////
   // overloaded arguments (so far just "gpa")
   if (gpa) {
      //alert("gpa");
      //var tag = document.all ?  document.all.t_APP_AVG_GPA // IE4+
      //      	 : document.getElementById ? document.getElementById('t_APP_AVG_GPA') // NN6
      //      	 : null;
      var tag = document.getElementById(id_tag);


      if( parseFloat(a) > 4.0  && e.keyCode != 13  && e.keyCode > 40) {

         //alert("gpa must be in a range of 0 to 4.0 (e.g. 3.86)");
         if(tag) tag.className = 'tfvHighlight';

         a = a.substring(0,((a.length) - 1));
         if( a.substring( a.length, 1 ) == '.' ) {
            a = a.substring(0,((a.length) - 1));
         }
      }
      else {
         if(tag) tag.className = 'tfvNormal';
      }
   } // end of overloaded arguments -- standard validation follows

} // end function kill_keys_nzero()

//
// forces the user to enter a positive integer only
//
function kill_keys_nzero_int(e, ele_name) {
   var a = ele_name.value;
   if (!e) var e = window.event;
   var g_tag = ele_name;

   // debug
   //alert(e.keyCode);

   // non-digits /^\d+$/
   var numeric_format = /^\d+$/;
   for (i = 0; i <= a.length; i++) {
      if ( ! numeric_format.test(a.charAt(i)) && e.keyCode > 40) {
         if(a.substring((i+1),a.length)){
            a = a.substring(0,(i)) + a.substring((i+1),a.length);
            i--;
         }
         else {
            a = a.substring(0,(i));
         }
         g_tag.value = a;
      }
   }

   ////////////////////////////////////////////////////////
   // original version
   //
   // leading zero
   // while(a.length>=0 && (a.charAt(0) == '0') ) {
   //    if (a.charAt(0) == '0' && e.keyCode != 13) {
   //       a = a.substring(0,((a.length) - 1));
   //       g_tag.value = a;
   //    }
   // }

   ///////////////////////////////////////////////////////
   // new version doesn't kill the rest of the data
   //
   // leading zero
   while(a.length>=0 && (a.charAt(0) == '0') ) {
      if (a.charAt(0) == '0' && e.keyCode != 13) {
         a = a.substring(1,((a.length)));
         g_tag.value = a;
      }
   }


} // end function kill_keys_nzero_int()




// ************************************************************
// Set the average GPA in the Total Avg GPA field.
// ************************************************************
function set_average_gpa () {

   var m = eval('document.forms[0].APP_TOTAL_M.value');
   var f = eval('document.forms[0].APP_TOTAL_F.value');
   var uk = eval('document.forms[0].APP_TOTAL_UK.value');
   var total = eval('document.forms[0].APP_TOTAL_T.value');

   var a = eval('document.forms[0].APP_AVG_GPA_M.value');
   var b = eval('document.forms[0].APP_AVG_GPA_F.value');
   var c = eval('document.forms[0].APP_AVG_GPA_UK.value');
   
   a = parseFloat(a)? parseFloat(a) : 0;
   b = parseFloat(b)? parseFloat(b) : 0;
   c = parseFloat(c)? parseFloat(c) : 0;

   m = parseInt(m)? parseInt(m) : 0;
   f = parseInt(f)? parseInt(f) : 0;
   uk = parseInt(uk)? parseInt(uk) : 0;
   total = parseInt(total)? parseInt(total) : 0;

   //alert("a = " + a + "\n" + "b = " + b + "\n" +"c = " + a + "\n" + "c = " + a + "\n" + "m = " + m + "\n" + "f = " + f + "\n" + "uk = " + uk + "\n" );

   var gpa_by_apptype = new Array();
   gpa_by_apptype[0] = (a * m);
   gpa_by_apptype[1] = (b * f);
   gpa_by_apptype[2] = (c * uk);

   var i;
   var num = 0;
   var ftotal = 0.0;
   for (i = 0; i < 3; i = i + 1) {
      if (gpa_by_apptype[i] != '' && gpa_by_apptype[i] > 0 ) {
         ftotal = ftotal + gpa_by_apptype[i];
         num = num + 1;
      }     
   }
   
   //var avg = ftotal/num;
   //var ftotal = (a * m) + (b * f) + (c * uk);
   
   var avg = '';
   if( ftotal > 0 && total > 0 ) {
        avg = ftotal/total;
        avg = Math.round(avg*100)/100;
   }    
   
   var g_tag = eval('document.forms[0].APP_AVG_GPA_T');
   g_tag.value = avg;
}


// ************************************************************
// Set Total Offers Made Field.
// ************************************************************

function set_total_offers () {

    var a = eval('document.forms[0].APP_OFFER_M.value');
	var b = eval('document.forms[0].APP_OFFER_F.value');
	var c = eval('document.forms[0].APP_OFFER_UK.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;


    var ftotal  = parseInt(a) + parseInt(b) + parseInt(c);
	ftotal      = ftotal == 0 ? '' : ftotal;
	    
    var g_tag = eval('document.forms[0].APP_OFFER_T');

    g_tag.value = ftotal;
}

// ************************************************************
// Set Total Accpeted Field
// ************************************************************

function set_total_accepted () {

    var a = eval('document.forms[0].APP_ACCEPTED_M.value');
	var b = eval('document.forms[0].APP_ACCEPTED_F.value');
	var c = eval('document.forms[0].APP_ACCEPTED_UK.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;


    var ftotal = parseInt(a) + parseInt(b) + parseInt(c);
	ftotal      = ftotal == 0 ? '' : ftotal;
	    
    var g_tag = eval('document.forms[0].APP_ACCEPTED_T');

    g_tag.value = ftotal;
}

// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for various race/ethnic questions.
// ************************************************************

function check_ethnic_total() {

    // White
    var a = eval('document.forms[0].APP_WHITE_M.value');
	var b = eval('document.forms[0].APP_WHITE_F.value');
	var c = eval('document.forms[0].APP_WHITE_UK.value');
	var w_total = eval('document.forms[0].APP_WHITE_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var wtotal = parseInt(a) + parseInt(b) + parseInt(c);

	var wtag = document.all ?  document.all.t_APP_WHITE // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_WHITE') // NN6
    				   : null; 		

	if( parseInt(wtotal) !=  parseInt(w_total) && (wtotal != 0 && w_total == '') ) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (WHITE).");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_WHITE_T.focus()');
			return false;
	}	

    // Black

    a = eval('document.forms[0].APP_BLACK_M.value');
	b = eval('document.forms[0].APP_BLACK_F.value');
	c = eval('document.forms[0].APP_BLACK_UK.value');
	b_total = eval('document.forms[0].APP_BLACK_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var btotal = parseInt(a) + parseInt(b) + parseInt(c);

	var btag = document.all ?  document.all.t_APP_BLACK // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_BLACK') // NN6
    				   : null; 		

	if( btotal !=  parseInt(b_total) && (btotal != 0 && b_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (BLACK).");
			btag.className = 'tfvHighlight';
			eval('document.forms[0].APP_BLACK_T.focus()');
			return false;
	}	

    // Hispanic

    a = eval('document.forms[0].APP_HISP_M.value');
	b = eval('document.forms[0].APP_HISP_F.value');
	c = eval('document.forms[0].APP_HISP_UK.value');
	h_total = eval('document.forms[0].APP_HISP_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var htotal = parseInt(a) + parseInt(b) + parseInt(c);

	var htag = document.all ?  document.all.t_APP_HISP // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_HISP') // NN6
    				   : null; 		

	if( htotal !=  parseInt(h_total) && (htotal != 0 && h_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (HISPANIC).");
			htag.className = 'tfvHighlight';
			eval('document.forms[0].APP_HISP_T.focus()');
			return false;
	}	

    // Asian

    a = eval('document.forms[0].APP_ASIAN_M.value');
	b = eval('document.forms[0].APP_ASIAN_F.value');
	c = eval('document.forms[0].APP_ASIAN_UK.value');
	a_total = eval('document.forms[0].APP_ASIAN_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var atotal = parseInt(a) + parseInt(b) + parseInt(c);

	var atag = document.all ?  document.all.t_APP_ASIAN // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_ASIAN') // NN6
    				   : null; 		

	if( atotal !=  parseInt(a_total) && (atotal != 0 && a_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (ASIAN).");
			atag.className = 'tfvHighlight';
			eval('document.forms[0].APP_ASIAN_T.focus()');
			return false;
	}	

    // Asian

    a = eval('document.forms[0].APP_AI_M.value');
	b = eval('document.forms[0].APP_AI_F.value');
	c = eval('document.forms[0].APP_AI_UK.value');
	i_total = eval('document.forms[0].APP_AI_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var itotal = parseInt(a) + parseInt(b) + parseInt(c);

	var itag = document.all ?  document.all.t_APP_AI // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_AI') // NN6
    				   : null; 		

	if( itotal !=  parseInt(i_total) && (itotal != 0 && i_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (American Indian).");
			itag.className = 'tfvHighlight';
			eval('document.forms[0].APP_AI_T.focus()');
			return false;
	}

    // Asian

    a = eval('document.forms[0].APP_OTHER_M.value');
	b = eval('document.forms[0].APP_OTHER_F.value');
	c = eval('document.forms[0].APP_OTHER_UK.value');
	o_total = eval('document.forms[0].APP_OTHER_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ototal = parseInt(a) + parseInt(b) + parseInt(c);

	var otag = document.all ?  document.all.t_APP_OTHER // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_OTHER') // NN6
    				   : null; 		

	if( ototal !=  parseInt(o_total) && (ototal != 0 && o_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (OTHER-UNKNOWN).");
			otag.className = 'tfvHighlight';
			eval('document.forms[0].APP_OTHER_T.focus()');
			return false;
	}

    // Foreign

    a = eval('document.forms[0].APP_FOREIGN_M.value');
	b = eval('document.forms[0].APP_FOREIGN_F.value');
	c = eval('document.forms[0].APP_FOREIGN_UK.value');
	f_total = eval('document.forms[0].APP_FOREIGN_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ftotal = parseInt(a) + parseInt(b) + parseInt(c);

	var ftag = document.all ?  document.all.t_APP_FOREIGN // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_FOREIGN') // NN6
    				   : null; 		

	if( ftotal !=  parseInt(f_total) && (ftotal != 0 && f_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (Foreign).");
			ftag.className = 'tfvHighlight';
			eval('document.forms[0].APP_FOREIGN_T.focus()');
			return false;
	}

    // Total

    a = eval('document.forms[0].APP_TOTAL_M.value');
	b = eval('document.forms[0].APP_TOTAL_F.value');
	c = eval('document.forms[0].APP_TOTAL_UK.value');
	t_total = eval('document.forms[0].APP_TOTAL_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ttotal = parseInt(a) + parseInt(b) + parseInt(c);

	var ttag = document.all ?  document.all.t_APP_TOTAL // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_TOTAL') // NN6
    				   : null; 		

	if( ttotal !=  parseInt(t_total) && (ttotal != 0 && t_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (Total).");
			ttag.className = 'tfvHighlight';
			eval('document.forms[0].APP_TOTAL_T.focus()');
			return false;
	}

	wtag.className = 'tfvNormal';
	btag.className = 'tfvNormal';
    htag.className = 'tfvNormal';
    atag.className = 'tfvNormal';
    itag.className = 'tfvNormal';
    otag.className = 'tfvNormal';
    ftag.className = 'tfvNormal';
    ttag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for various Experince group questions.
// ************************************************************

function check_experience_total() {

    // 0 Years of College
    var a = eval('document.forms[0].APP_EXP_NO_COL_M.value');
	var b = eval('document.forms[0].APP_EXP_NO_COL_F.value');
	var c = eval('document.forms[0].APP_EXP_NO_COL_UK.value');
	var w_total = eval('document.forms[0].APP_EXP_NO_COL_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var wtotal = parseInt(a) + parseInt(b) + parseInt(c);

	var wtag = document.all ?  document.all.t_APP_EXP_NO_COL // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_NO_COL') // NN6
    				   : null; 		

	if( wtotal !=  parseInt(w_total) && (wtotal != 0 && w_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section ( 0 Years of College).");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_NO_COL_T.focus()');
			return false;
	}	

    //  1-2 Years of College (No Degree)

    a = eval('document.forms[0].APP_EXP_COL_1_2_YRS_M.value');
	b = eval('document.forms[0].APP_EXP_COL_1_2_YRS_F.value');
	c = eval('document.forms[0].APP_EXP_COL_1_2_YRS_UK.value');
	b_total = eval('document.forms[0].APP_EXP_COL_1_2_YRS_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var btotal = parseInt(a) + parseInt(b) + parseInt(c);

	var btag = document.all ?  document.all.t_APP_EXP_COL_1_2_YRS // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_COL_1_2_YRS') // NN6
    				   : null; 		

	if( btotal !=  parseInt(b_total) && (btotal != 0 && b_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (1-2 Years of College (No Degree)).");
			btag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_COL_1_2_YRS_T.focus()');
			return false;
	}	


    //  Associate Degree

    a = eval('document.forms[0].APP_EXP_AS_M.value');
	b = eval('document.forms[0].APP_EXP_AS_F.value');
	c = eval('document.forms[0].APP_EXP_AS_UK.value');
	h_total = eval('document.forms[0].APP_EXP_AS_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var htotal = parseInt(a) + parseInt(b) + parseInt(c);

	var htag = document.all ?  document.all.t_APP_EXP_AS // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_AS') // NN6
    				   : null; 		

	if( htotal !=  parseInt(h_total) && (htotal != 0 && h_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section ( Associate Degree).");
			htag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_AS_T.focus()');
			return false;
	}	

    //  3 or more Years of College (No Degree)

    a = eval('document.forms[0].APP_EXP_COL_3_YRS_M.value');
	b = eval('document.forms[0].APP_EXP_COL_3_YRS_F.value');
	c = eval('document.forms[0].APP_EXP_COL_3_YRS_UK.value');
	a_total = eval('document.forms[0].APP_EXP_COL_3_YRS_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var atotal = parseInt(a) + parseInt(b) + parseInt(c);

	var atag = document.all ?  document.all.t_APP_EXP_COL_3_YRS // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_COL_3_YRS') // NN6
    				   : null; 		

	if( atotal !=  parseInt(a_total) && (atotal != 0 && a_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section \(3 or more Years of College \(No Degree\)\).");
			atag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_COL_3_YRS_T.focus()');
			return false;
	}	

    //  Bachelor's Degree

    a = eval('document.forms[0].APP_EXP_BS_M.value');
	b = eval('document.forms[0].APP_EXP_BS_F.value');
	c = eval('document.forms[0].APP_EXP_BS_UK.value');
	i_total = eval('document.forms[0].APP_EXP_BS_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var itotal = parseInt(a) + parseInt(b) + parseInt(c);

	var itag = document.all ?  document.all.t_APP_EXP_BS // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_BS') // NN6
    				   : null; 		

	if( itotal !=  parseInt(i_total) && (itotal != 0 && i_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section ( Bachelor\'s Degree).");
			itag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_BS_T.focus()');
			return false;
	}

    // Master's Degree

    a = eval('document.forms[0].APP_EXP_MS_M.value');
	b = eval('document.forms[0].APP_EXP_MS_F.value');
	c = eval('document.forms[0].APP_EXP_MS_UK.value');
	o_total = eval('document.forms[0].APP_EXP_MS_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ototal = parseInt(a) + parseInt(b) + parseInt(c);

	var otag = document.all ?  document.all.t_APP_EXP_MS // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_MS') // NN6
    				   : null; 		

	if( ototal !=  parseInt(o_total) && (ototal != 0 && o_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section ( Master\'s Degree).");
			otag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_MS_T.focus()');
			return false;
	}

    //  Doctoral Degree

    a = eval('document.forms[0].APP_EXP_PHD_M.value');
	b = eval('document.forms[0].APP_EXP_PHD_F.value');
	c = eval('document.forms[0].APP_EXP_PHD_UK.value');
	f_total = eval('document.forms[0].APP_EXP_PHD_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ftotal = parseInt(a) + parseInt(b) + parseInt(c);

	var ftag = document.all ?  document.all.t_APP_EXP_PHD // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_PHD') // NN6
    				   : null; 		

	if( ftotal !=  parseInt(f_total) && (ftotal != 0 && f_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (Doctoral Degree).");
			ftag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_PHD_T.focus()');
			return false;
	}

    // Total

    a = eval('document.forms[0].APP_EXP_TOTAL_M.value');
	b = eval('document.forms[0].APP_EXP_TOTAL_F.value');
	c = eval('document.forms[0].APP_EXP_TOTAL_UK.value');
	t_total = eval('document.forms[0].APP_EXP_TOTAL_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ttotal = parseInt(a) + parseInt(b) + parseInt(c);

	var ttag = document.all ?  document.all.t_APP_EXP_TOTAL // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_EXP_TOTAL') // NN6
    				   : null; 		

	if( ttotal !=  parseInt(t_total) && (ttotal != 0 && t_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (Total).");
			ttag.className = 'tfvHighlight';
			eval('document.forms[0].APP_EXP_TOTAL_T.focus()');
			return false;
	}

	wtag.className = 'tfvNormal';
	btag.className = 'tfvNormal';
    htag.className = 'tfvNormal';
    atag.className = 'tfvNormal';
    itag.className = 'tfvNormal';
    otag.className = 'tfvNormal';
    ftag.className = 'tfvNormal';
    ttag.className = 'tfvNormal';

	return true;
}



// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for various Residency group questions.
// ************************************************************

function check_residency_total() {

    //  In-state Resident
    var a = eval('document.forms[0].APP_RESIDENCY_INSTATE_M.value');
	var b = eval('document.forms[0].APP_RESIDENCY_INSTATE_F.value');
	var c = eval('document.forms[0].APP_RESIDENCY_INSTATE_UK.value');
	var w_total = eval('document.forms[0].APP_RESIDENCY_INSTATE_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var wtotal = parseInt(a) + parseInt(b) + parseInt(c);

	var wtag = document.all ?  document.all.t_APP_RESIDENCY_INSTATE // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_RESIDENCY_INSTATE') // NN6
    				   : null; 		

	if( wtotal !=  parseInt(w_total) && (wtotal != 0 && w_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (In-state Resident).");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_RESIDENCY_INSTATE_T.focus()');
			return false;
	}	


    //   Out-of-State/Foreign

    a = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_M.value');
	b = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_F.value');
	c = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_UK.value');
	b_total = eval('document.forms[0].APP_RESIDENCY_OUTSTATE_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var btotal = parseInt(a) + parseInt(b) + parseInt(c);

	var btag = document.all ?  document.all.t_APP_RESIDENCY_OUTSTATE // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_RESIDENCY_OUTSTATE') // NN6
    				   : null; 		

	if( btotal !=  parseInt(b_total) && (btotal != 0 && b_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section ( Out-of-State/Foreign).");
			btag.className = 'tfvHighlight';
			eval('document.forms[0].APP_RESIDENCY_OUTSTATE_T.focus()');
			return false;
	}	


    // Total

    a = eval('document.forms[0].APP_RESIDENCY_TOTAL_M.value');
	b = eval('document.forms[0].APP_RESIDENCY_TOTAL_F.value');
	c = eval('document.forms[0].APP_RESIDENCY_TOTAL_UK.value');
	t_total = eval('document.forms[0].APP_RESIDENCY_TOTAL_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var ttotal = parseInt(a) + parseInt(b) + parseInt(c);

	var ttag = document.all ?  document.all.t_APP_RESIDENCY_TOTAL // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_RESIDENCY_TOTAL') // NN6
    				   : null; 		

	if( ttotal !=  parseInt(t_total) && (ttotal != 0 && t_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (Total).");
			ttag.className = 'tfvHighlight';
			eval('document.forms[0].APP_RESIDENCY_TOTAL_T.focus()');
			return false;
	}


	wtag.className = 'tfvNormal';
	btag.className = 'tfvNormal';
    ttag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for NUMBER OF OFFERS MADE
// ************************************************************

function check_offers_made_total() {

    //  In-state Resident
    var a = eval('document.forms[0].APP_OFFER_M.value');
	var b = eval('document.forms[0].APP_OFFER_F.value');
	var c = eval('document.forms[0].APP_OFFER_UK.value');
	var w_total = eval('document.forms[0].APP_OFFER_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var wtotal = parseInt(a) + parseInt(b) + parseInt(c);

	var wtag = document.all ?  document.all.t_APP_OFFER // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_OFFER') // NN6
    				   : null; 		

	if( wtotal !=  parseInt(w_total) && (wtotal != 0 && w_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (NUMBER OF OFFERS MADE).");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_OFFER_T.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for NUMBER OF OFFERS ACCEPTED
// ************************************************************

function check_offers_accepted_total() {

    //  In-state Resident
    var a = eval('document.forms[0].APP_ACCEPTED_M.value');
	var b = eval('document.forms[0].APP_ACCEPTED_F.value');
	var c = eval('document.forms[0].APP_ACCEPTED_UK.value');
	var w_total = eval('document.forms[0].APP_ACCEPTED_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;
    c = parseInt(c)? parseInt(c) : 0;
    var wtotal = parseInt(a) + parseInt(b) + parseInt(c);

	var wtag = document.all ?  document.all.t_APP_ACCEPTED // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_ACCEPTED') // NN6
    				   : null; 		

	if( wtotal !=  parseInt(w_total) && (wtotal != 0 && w_total == '')) {

			alert("The MALE, FEMALE, UNKNOWN and TOTAL columns should be equal for each section (NUMBER OF OFFERS ACCEPTED).");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_ACCEPTED_T.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// ENROLLMENTS FALL - Non Licensure-Eligible B.S. Degrees
// ************************************************************

function set_non_lic_bs_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;

    if(year == 1) {

	    a = eval('document.forms[0].ENR_NL_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_NL_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_NL_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_NL_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_NL_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_NL_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_NL_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_NL_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_NL_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_NL_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_NL_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_NL_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_NL_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_NL_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_NL_05_06_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_NL_06_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_NL_06_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_NL_06_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_NL_06_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_NL_06_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_NL_06_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_NL_06_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_NL_06_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_NL_06_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_NL_06_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_NL_06_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_NL_06_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_NL_06_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_NL_06_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_NL_06_07_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_NL_07_08_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_NL_07_08_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_NL_07_08_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_NL_07_08_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_NL_07_08_HISP_M.value');      
	    f = eval('document.forms[0].ENR_NL_07_08_HISP_F.value');      
	    g = eval('document.forms[0].ENR_NL_07_08_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_NL_07_08_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_NL_07_08_AI_M.value');        
	    j = eval('document.forms[0].ENR_NL_07_08_AI_F.value');       
	    k = eval('document.forms[0].ENR_NL_07_08_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_NL_07_08_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_NL_07_08_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_NL_07_08_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_NL_07_08_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_NL_08_09_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_NL_08_09_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_NL_08_09_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_NL_08_09_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_NL_08_09_HISP_M.value');      
	    f = eval('document.forms[0].ENR_NL_08_09_HISP_F.value');      
	    g = eval('document.forms[0].ENR_NL_08_09_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_NL_08_09_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_NL_08_09_AI_M.value');        
	    j = eval('document.forms[0].ENR_NL_08_09_AI_F.value');       
	    k = eval('document.forms[0].ENR_NL_08_09_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_NL_08_09_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_NL_08_09_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_NL_08_09_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_NL_08_09_TOTAL');

    }

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// ENROLLMENTS FALL - Non Licensure-Eligible B.S. Degrees
// ************************************************************

function set_first_prof_deg_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;

    if(year == 1) {

	    a = eval('document.forms[0].ENR_PHARMD1_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_05_06_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_PHARMD1_06_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_06_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_06_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_06_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_06_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_06_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_06_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_06_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_06_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_06_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_06_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_06_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_06_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_06_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_06_07_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_PHARMD1_07_08_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_07_08_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_07_08_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_07_08_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_07_08_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_07_08_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_07_08_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_07_08_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_07_08_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_07_08_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_07_08_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_07_08_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_07_08_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_07_08_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_07_08_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_PHARMD1_08_09_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_08_09_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_08_09_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_08_09_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_08_09_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_08_09_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_08_09_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_08_09_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_08_09_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_08_09_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_08_09_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_08_09_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_08_09_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_08_09_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_08_09_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].ENR_PHARMD1_09_10_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_09_10_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_09_10_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_09_10_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_09_10_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_09_10_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_09_10_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_09_10_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_09_10_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_09_10_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_09_10_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_09_10_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_09_10_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_09_10_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_09_10_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].ENR_PHARMD1_10_11_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD1_10_11_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD1_10_11_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD1_10_11_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD1_10_11_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD1_10_11_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD1_10_11_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD1_10_11_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD1_10_11_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD1_10_11_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD1_10_11_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD1_10_11_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD1_10_11_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD1_10_11_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD1_10_11_TOTAL');

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// State
// ************************************************************

function set_state_total (flag, suffix) {
	// 20071003 gamache: changes to args:
	// flag may be integer or string
	// suffix is optional argument
	// all state fields in form must be named by two letter state code + suffix

	if (!suffix) {
		suffix = ''
	}

    var tag;

    if(flag == 1) {

        tag = 'Total';

    } else if(flag == 2) {

        tag = 'TOTAL_PBAC_TRAD'

    } else if(flag == 3) {

        tag = 'TOTAL_PBAC_NONTRAD'
    }
	
	// 20071003 gamache -- allow flag to be string
	else if (flag.length > 0) {
		tag = flag
	}
	
	

    var total_elements = document.forms[0].elements.length;

    var total   = 0;
    for(var i=0; i < total_elements;i++) {

		var typ = document.forms[0].elements[i].type;    
        var txt_obj = document.forms[0].elements[i];
        var nam    = document.forms[0].elements[i].name;

		// 20071003 gamache -- deal with multiple surveys
        if (	
			typ == 'text' 	&& 
			nam != tag 		&& 
			(	nam.substring(2) == suffix  || 
				(suffix.length == 0 && nam.length == 2)
			)
		  ) {
            
            var txt_val = txt_obj.value;
            txt_val     = parseInt(txt_val) ? parseInt(txt_val) : 0;
			
			// 20071005 gamache -- disallow negative numbers, as a backup
			if (txt_val < 0) {
				txt_val = Math.abs(txt_val)
				txt_obj.value = txt_val
			}
			
            total      += parseInt(txt_val);
        }
    }

    var total_tag = eval('document.forms[0].'+tag);
    total_tag.value = total;

    return true;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// POSTGRADUATE EDUCATION AND TRAINING PROGRAMS: Enrollments
// ************************************************************

function set_pg_programs_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;

    if(year == 1) {

	    a = eval('document.forms[0].ENR_PG_PHD_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PG_PHD_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PG_PHD_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PG_PHD_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PG_PHD_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PG_PHD_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PG_PHD_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PG_PHD_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PG_PHD_AI_M.value');        
	    j = eval('document.forms[0].ENR_PG_PHD_AI_F.value');       
	    k = eval('document.forms[0].ENR_PG_PHD_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PG_PHD_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PG_PHD_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PG_PHD_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PG_PHD_TOTAL');

    }  else if (year == 2) {

	    a = eval('document.forms[0].ENR_PG_PHARMD_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PG_PHARMD_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PG_PHARMD_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PG_PHARMD_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PG_PHARMD_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PG_PHARMD_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PG_PHARMD_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PG_PHARMD_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PG_PHARMD_AI_M.value');        
	    j = eval('document.forms[0].ENR_PG_PHARMD_AI_F.value');       
	    k = eval('document.forms[0].ENR_PG_PHARMD_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PG_PHARMD_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PG_PHARMD_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PG_PHARMD_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PG_PHARMD_TOTAL');

    }  else if (year == 3) {

	    a = eval('document.forms[0].ENR_PG_BS_PHARMD_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PG_BS_PHARMD_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PG_BS_PHARMD_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PG_BS_PHARMD_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PG_BS_PHARMD_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PG_BS_PHARMD_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PG_BS_PHARMD_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PG_BS_PHARMD_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PG_BS_PHARMD_AI_M.value');        
	    j = eval('document.forms[0].ENR_PG_BS_PHARMD_AI_F.value');       
	    k = eval('document.forms[0].ENR_PG_BS_PHARMD_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PG_BS_PHARMD_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PG_BS_PHARMD_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PG_BS_PHARMD_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PG_BS_PHARMD_TOTAL');

    }  


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Postbaccalaureate Pharm.D. Degree Programs
// ************************************************************

function set_pbac_pharmd_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_05_06_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_06_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_06_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_06_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_06_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_06_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_06_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_06_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_06_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_06_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_06_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_06_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_06_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_06_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_06_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_06_07_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_PHARMD2_PT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_PT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_PT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_PT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_PT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_PT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_PT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_PT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_PT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_PT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_PT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_PT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_PT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_PT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_PT_05_06_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].ENR_PHARMD2_NT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_NT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_NT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_NT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_NT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_NT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_NT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_NT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_NT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_NT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_NT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_NT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_NT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_NT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_NT_05_06_TOTAL');

    } else if(year == 7) {

	    a = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_TOTAL');

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Enrollments Master of Science (M.S.)
// ************************************************************

function set_ms_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].ENR_MS_FT_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_CHEM_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_CHEM_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_CHEM_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_CHEM_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_CHEM_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_MS_FT_COL_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_COL_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_COL_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_COL_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_COL_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_COL_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_COL_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_COL_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_COL_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_COL_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_COL_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_MS_FT_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_SAS_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_SAS_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_SAS_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_SAS_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_SAS_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_SAS_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_SAS_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_MS_FT_PP_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_PP_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_PP_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_PP_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_PP_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_PP_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_PP_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_PP_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_PP_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_PP_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_PP_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].ENR_MS_FT_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_CEU_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_CEU_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_CEU_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_CEU_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_CEU_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_CEU_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_CEU_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].ENR_MS_FT_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_FT_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_FT_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_FT_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_FT_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_FT_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_FT_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_FT_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_FT_OTHER_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_FT_OTHER_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_FT_OTHER_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_FT_OTHER_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_FT_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_FT_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_FT_OTHER_TOTAL');

    } else if(year == 7) {

	    a = eval('document.forms[0].ENR_MS_PT_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_CHEM_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_CHEM_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_CHEM_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_CHEM_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_CHEM_TOTAL');

    } else if(year == 8) {

	    a = eval('document.forms[0].ENR_MS_PT_COL_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_COL_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_COL_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_COL_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_COL_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_COL_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_COL_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_COL_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_COL_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_COL_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_COL_TOTAL');

    } else if(year == 9) {

	    a = eval('document.forms[0].ENR_MS_PT_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_SAS_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_SAS_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_SAS_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_SAS_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_SAS_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_SAS_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_SAS_TOTAL');

    } else if(year == 10) {

	    a = eval('document.forms[0].ENR_MS_PT_PP_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_PP_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_PP_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_PP_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_PP_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_PP_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_PP_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_PP_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_PP_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_PP_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_PP_TOTAL');

    } else if(year == 11) {

	    a = eval('document.forms[0].ENR_MS_PT_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_CEU_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_CEU_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_CEU_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_CEU_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_CEU_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_CEU_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_CEU_TOTAL');

    } else if(year == 12) {

	    a = eval('document.forms[0].ENR_MS_PT_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_MS_PT_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_MS_PT_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_MS_PT_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_MS_PT_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].ENR_MS_PT_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].ENR_MS_PT_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_MS_PT_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_MS_PT_OTHER_AI_M.value');        
	    j = eval('document.forms[0].ENR_MS_PT_OTHER_AI_F.value');       
	    k = eval('document.forms[0].ENR_MS_PT_OTHER_UK_M.value');     
	    l = eval('document.forms[0].ENR_MS_PT_OTHER_UK_F.value');     
	    m = eval('document.forms[0].ENR_MS_PT_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_MS_PT_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_MS_PT_OTHER_TOTAL');
    }

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}
 

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Postbaccalaureate Pharm.D. Degree Programs
// ************************************************************

function set_pbac_pharmd_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_05_06_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_06_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_06_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_06_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_06_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_06_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_06_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_06_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_06_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_06_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_06_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_06_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_06_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_06_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_06_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_06_07_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_FT_AFTER_07_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_PHARMD2_PT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_PT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_PT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_PT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_PT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_PT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_PT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_PT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_PT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_PT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_PT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_PT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_PT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_PT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_PT_05_06_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_PT_AFTER_06_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].ENR_PHARMD2_NT_05_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_NT_05_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_NT_05_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_NT_05_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_NT_05_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_NT_05_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_NT_05_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_NT_05_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_NT_05_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_NT_05_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_NT_05_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_NT_05_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_NT_05_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_NT_05_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_NT_05_06_TOTAL');

    } else if(year == 7) {

	    a = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_OTHER_M.value');     
	    l = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_OTHER_F.value');     
	    m = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHARMD2_NT_AFTER_06_TOTAL');

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Enrollments Doctor of Philosophy (PH.D.)
// ************************************************************

function set_phd_enr_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].ENR_PHD_FT_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_CHEM_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_CHEM_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_CHEM_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_CHEM_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_CHEM_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].ENR_PHD_FT_COL_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_COL_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_COL_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_COL_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_COL_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_COL_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_COL_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_COL_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_COL_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_COL_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_COL_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].ENR_PHD_FT_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_SAS_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_SAS_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_SAS_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_SAS_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_SAS_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_SAS_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_SAS_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].ENR_PHD_FT_PP_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_PP_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_PP_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_PP_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_PP_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_PP_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_PP_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_PP_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_PP_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_PP_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_PP_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].ENR_PHD_FT_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_CEU_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_CEU_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_CEU_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_CEU_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_CEU_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_CEU_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_CEU_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].ENR_PHD_FT_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_FT_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_FT_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_FT_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_FT_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_FT_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_FT_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_FT_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_FT_OTHER_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_FT_OTHER_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_FT_OTHER_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_FT_OTHER_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_FT_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_FT_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_FT_OTHER_TOTAL');

    } else if(year == 7) {

	    a = eval('document.forms[0].ENR_PHD_PT_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_CHEM_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_CHEM_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_CHEM_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_CHEM_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_CHEM_TOTAL');

    } else if(year == 8) {

	    a = eval('document.forms[0].ENR_PHD_PT_COL_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_COL_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_COL_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_COL_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_COL_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_COL_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_COL_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_COL_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_COL_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_COL_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_COL_TOTAL');

    } else if(year == 9) {

	    a = eval('document.forms[0].ENR_PHD_PT_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_SAS_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_SAS_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_SAS_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_SAS_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_SAS_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_SAS_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_SAS_TOTAL');

    } else if(year == 10) {

	    a = eval('document.forms[0].ENR_PHD_PT_PP_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_PP_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_PP_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_PP_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_PP_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_PP_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_PP_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_PP_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_PP_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_PP_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_PP_TOTAL');

    } else if(year == 11) {

	    a = eval('document.forms[0].ENR_PHD_PT_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_CEU_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_CEU_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_CEU_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_CEU_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_CEU_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_CEU_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_CEU_TOTAL');

    } else if(year == 12) {

	    a = eval('document.forms[0].ENR_PHD_PT_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].ENR_PHD_PT_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].ENR_PHD_PT_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].ENR_PHD_PT_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].ENR_PHD_PT_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].ENR_PHD_PT_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].ENR_PHD_PT_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].ENR_PHD_PT_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].ENR_PHD_PT_OTHER_AI_M.value');        
	    j = eval('document.forms[0].ENR_PHD_PT_OTHER_AI_F.value');       
	    k = eval('document.forms[0].ENR_PHD_PT_OTHER_UK_M.value');     
	    l = eval('document.forms[0].ENR_PHD_PT_OTHER_UK_F.value');     
	    m = eval('document.forms[0].ENR_PHD_PT_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].ENR_PHD_PT_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].ENR_PHD_PT_OTHER_TOTAL');
    }

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// UNDERGRADUATE AND PROFESSIONAL PHARMACY DEGREES CONFERRED SURVEY 2004-2005 Academic Year
// ************************************************************

function set_ug_deg_conferred_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].DC_NL_WHITE_M.value');  
	    b = eval('document.forms[0].DC_NL_WHITE_F.value');    
	    c = eval('document.forms[0].DC_NL_BLACK_M.value');    
	    d = eval('document.forms[0].DC_NL_BLACK_F.value');     
	    e = eval('document.forms[0].DC_NL_HISP_M.value');      
	    f = eval('document.forms[0].DC_NL_HISP_F.value');      
	    g = eval('document.forms[0].DC_NL_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_NL_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_NL_AI_M.value');        
	    j = eval('document.forms[0].DC_NL_AI_F.value');       
	    k = eval('document.forms[0].DC_NL_OTHER_M.value');     
	    l = eval('document.forms[0].DC_NL_OTHER_F.value');     
	    m = eval('document.forms[0].DC_NL_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_NL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_NL_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].DC_BS_WHITE_M.value');  
	    b = eval('document.forms[0].DC_BS_WHITE_F.value');    
	    c = eval('document.forms[0].DC_BS_BLACK_M.value');    
	    d = eval('document.forms[0].DC_BS_BLACK_F.value');     
	    e = eval('document.forms[0].DC_BS_HISP_M.value');      
	    f = eval('document.forms[0].DC_BS_HISP_F.value');      
	    g = eval('document.forms[0].DC_BS_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_BS_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_BS_AI_M.value');        
	    j = eval('document.forms[0].DC_BS_AI_F.value');       
	    k = eval('document.forms[0].DC_BS_OTHER_M.value');     
	    l = eval('document.forms[0].DC_BS_OTHER_F.value');     
	    m = eval('document.forms[0].DC_BS_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_BS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_BS_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].DC_PHARMD1_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHARMD1_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHARMD1_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHARMD1_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHARMD1_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHARMD1_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHARMD1_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHARMD1_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHARMD1_AI_M.value');        
	    j = eval('document.forms[0].DC_PHARMD1_AI_F.value');       
	    k = eval('document.forms[0].DC_PHARMD1_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHARMD1_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHARMD1_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHARMD1_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHARMD1_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].DC_PHARMD2_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHARMD2_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHARMD2_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHARMD2_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHARMD2_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHARMD2_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHARMD2_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHARMD2_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHARMD2_AI_M.value');        
	    j = eval('document.forms[0].DC_PHARMD2_AI_F.value');       
	    k = eval('document.forms[0].DC_PHARMD2_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHARMD2_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHARMD2_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHARMD2_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHARMD2_TOTAL');

    } 

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}
   

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// DEGREES CONFERRED 2004-2005 - Master of Science (M.S.) Academic Year
// ************************************************************

function set_ms_deg_conferred_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].DC_MS_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_CHEM_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_CHEM_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_CHEM_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_CHEM_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_CHEM_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].DC_MS_COL_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_COL_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_COL_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_COL_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_COL_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_COL_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_COL_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_COL_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_COL_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_COL_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_COL_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].DC_MS_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_SAS_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_SAS_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_SAS_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_SAS_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_SAS_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_SAS_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_SAS_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].DC_MS_PP_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_PP_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_PP_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_PP_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_PP_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_PP_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_PP_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_PP_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_PP_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_PP_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_PP_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].DC_MS_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_CEU_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_CEU_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_CEU_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_CEU_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_CEU_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_CEU_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_CEU_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].DC_MS_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].DC_MS_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].DC_MS_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].DC_MS_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].DC_MS_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].DC_MS_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].DC_MS_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_MS_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_MS_OTHER_AI_M.value');        
	    j = eval('document.forms[0].DC_MS_OTHER_AI_F.value');       
	    k = eval('document.forms[0].DC_MS_OTHER_OTHER_M.value');     
	    l = eval('document.forms[0].DC_MS_OTHER_OTHER_F.value');     
	    m = eval('document.forms[0].DC_MS_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_MS_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_MS_OTHER_TOTAL');

    } 

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}
   

// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// DEGREES CONFERRED - Doctor of Philosophy (Ph.D.)
// ************************************************************

function set_phd_deg_conferred_total( year ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;
	var g;
	var h;
	var i;
	var j;
    var k;
    var l;
    var m;
    var n;

    var rtotal;
    var r_tag;


    if(year == 1) {

	    a = eval('document.forms[0].DC_PHD_CHEM_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_CHEM_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_CHEM_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_CHEM_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_CHEM_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_CHEM_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_CHEM_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_CHEM_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_CHEM_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_CHEM_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_CHEM_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_CHEM_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_CHEM_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_CHEM_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_CHEM_TOTAL');

    }  else if(year == 2) {

	    a = eval('document.forms[0].DC_PHD_COL_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_COL_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_COL_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_COL_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_COL_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_COL_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_COL_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_COL_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_COL_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_COL_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_COL_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_COL_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_COL_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_COL_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_COL_TOTAL');

    }  else if(year == 3) {

	    a = eval('document.forms[0].DC_PHD_SAS_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_SAS_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_SAS_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_SAS_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_SAS_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_SAS_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_SAS_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_SAS_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_SAS_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_SAS_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_SAS_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_SAS_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_SAS_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_SAS_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_SAS_TOTAL');

    } else if(year == 4) {

	    a = eval('document.forms[0].DC_PHD_PP_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_PP_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_PP_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_PP_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_PP_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_PP_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_PP_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_PP_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_PP_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_PP_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_PP_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_PP_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_PP_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_PP_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_PP_TOTAL');

    } else if(year == 5) {

	    a = eval('document.forms[0].DC_PHD_CEU_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_CEU_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_CEU_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_CEU_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_CEU_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_CEU_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_CEU_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_CEU_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_CEU_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_CEU_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_CEU_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_CEU_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_CEU_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_CEU_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_CEU_TOTAL');

    } else if(year == 6) {

	    a = eval('document.forms[0].DC_PHD_OTHER_WHITE_M.value');  
	    b = eval('document.forms[0].DC_PHD_OTHER_WHITE_F.value');    
	    c = eval('document.forms[0].DC_PHD_OTHER_BLACK_M.value');    
	    d = eval('document.forms[0].DC_PHD_OTHER_BLACK_F.value');     
	    e = eval('document.forms[0].DC_PHD_OTHER_HISP_M.value');      
	    f = eval('document.forms[0].DC_PHD_OTHER_HISP_F.value');      
	    g = eval('document.forms[0].DC_PHD_OTHER_ASIAN_M.value');     
	    h = eval('document.forms[0].DC_PHD_OTHER_ASIAN_F.value');     
	    i = eval('document.forms[0].DC_PHD_OTHER_AI_M.value');        
	    j = eval('document.forms[0].DC_PHD_OTHER_AI_F.value');       
	    k = eval('document.forms[0].DC_PHD_OTHER_OTHER_M.value');     
	    l = eval('document.forms[0].DC_PHD_OTHER_OTHER_F.value');     
	    m = eval('document.forms[0].DC_PHD_OTHER_FOREIGN_M.value');   
	    n = eval('document.forms[0].DC_PHD_OTHER_FOREIGN_F.value');   
                                        
        r_tag = eval('document.forms[0].DC_PHD_OTHER_TOTAL');

    } 

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;
	g = parseInt(g)? parseInt(g) : 0;
	h = parseInt(h)? parseInt(h) : 0;
	i = parseInt(i)? parseInt(i) : 0;
	j = parseInt(j)? parseInt(j) : 0;
	k = parseInt(k)? parseInt(k) : 0;
	l = parseInt(l)? parseInt(l) : 0;
	m = parseInt(m)? parseInt(m) : 0;
	n = parseInt(n)? parseInt(n) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f) + parseInt(g) +
                parseInt(h) + parseInt(i) + parseInt(j) + parseInt(k) + parseInt(l) + parseInt(m) + parseInt(n);

    r_tag.value = rtotal;

	return true;
}
   

// ************************************************************
// Check if the Non-Lic BS Total in Degree conferred survey.
// ************************************************************

function check_non_lic_bs_conferred_total() {

    var a = eval('document.forms[0].DC_NL_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_NL // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_NL') // NN6
    				   : null; 		
    

	if( a >= 150) {

			alert("Total for BS Non Licensure-Eligible B.S in all ethnic categories should be less than 150.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_NL_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the BS Total in Degree conferred survey.
// ************************************************************

function check_bs_conferred_total() {

    var a = eval('document.forms[0].DC_BS_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_BS // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_BS') // NN6
    				   : null; 		
    

	if( a >= 100) {

			alert("Total for  B.S. Pharmacy Professional Baccalaureate in all ethnic categories should be less than 100.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_BS_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the PharmD1 Total in Degree conferred survey.
// ************************************************************

function check_pharmd1_conferred_total() {

    var a = eval('document.forms[0].DC_PHARMD1_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHARMD1 // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHARMD1') // NN6
    				   : null; 		
    

	if( a >= 300) {

			alert("Total for PHARM.D. 1st Professional Degree in all ethnic categories should be less than 300.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHARMD1_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the PharmD2 Total in Degree conferred survey.
// ************************************************************

function check_pharmd2_conferred_total() {

    var a = eval('document.forms[0].DC_PHARMD2_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHARMD2 // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHARMD2') // NN6
    				   : null; 		
    

	if( a >= 200) {

			alert("Total for PHARM.D. Postbaccalaureate Degree in all ethnic categories should be less than 200.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHARMD2_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the Medicinal Chemistry Total in MS Degree conferred survey.
// ************************************************************

function check_ms_med_checm_conferred_total() {

    var a = eval('document.forms[0].DC_MS_CHEM_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_CHEM // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_CHEM') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Medicinal Chemistry in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_CHEM_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the Pharmacology Total in MS Degree conferred survey.
// ************************************************************

function check_ms_pharmacology_conferred_total() {

    var a = eval('document.forms[0].DC_MS_COL_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_COL // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_COL') // NN6
    				   : null; 		
    

	if( a >= 30) {

			alert("Total for Pharmacology in all ethnic categories should be less than 30.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_COL_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the Social and Administrative Sciences Total in MS Degree conferred survey.
// ************************************************************

function check_ms_sas_conferred_total() {

    var a = eval('document.forms[0].DC_MS_SAS_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_SAS // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_SAS') // NN6
    				   : null; 		
    

	if( a >= 50) {

			alert("Total for Social and Administrative Sciences in all ethnic categories should be less than 50.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_SAS_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Pharmacy Practice Total in MS Degree conferred survey.
// ************************************************************

function check_ms_pp_conferred_total() {

    var a = eval('document.forms[0].DC_MS_PP_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_PP // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_PP') // NN6
    				   : null; 		
    

	if( a >= 50) {

			alert("Total for Pharmacy Practice in all ethnic categories should be less than 50.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_PP_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Pharmaceutics Total in MS Degree conferred survey.
// ************************************************************

function check_ms_ceu_conferred_total() {

    var a = eval('document.forms[0].DC_MS_CEU_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_CEU // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_CEU') // NN6
    				   : null; 		
    

	if( a >= 35) {

			alert("Total for Pharmaceutics in all ethnic categories should be less than 35.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_CEU_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Other Total in MS Degree conferred survey.
// ************************************************************

function check_ms_other_conferred_total() {

    var a = eval('document.forms[0].DC_MS_OTHER_TOTAL.value');
    var b = eval('document.forms[0].DC_MS_OTHER_SPECIFY.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_MS_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_MS_OTHER_SPECIFY') // NN6
    				   : null; 		

    if(b == '' && a > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_OTHER_SPECIFY.focus()');
			return false;
    }    

	if( a >= 200) {

			alert("Total for Other in all ethnic categories should be less than 200.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_MS_OTHER_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}



// ************************************************************
// Check if the Medicinal Chemistry Total in PHD Degree conferred survey.
// ************************************************************

function check_phd_med_checm_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_CHEM_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_CHEM // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_CHEM') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Medicinal Chemistry in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_CHEM_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the Pharmacology Total in MS Degree conferred survey.
// ************************************************************

function check_phd_pharmacology_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_COL_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_COL // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_COL') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Pharmacology in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_COL_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the Social and Administrative Sciences Total in MS Degree conferred survey.
// ************************************************************

function check_phd_sas_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_SAS_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_SAS // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_SAS') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Social and Administrative Sciences in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_SAS_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Pharmacy Practice Total in MS Degree conferred survey.
// ************************************************************

function check_phd_pp_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_PP_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_PP // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_PP') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Pharmacy Practice in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_PP_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Pharmaceutics Total in MS Degree conferred survey.
// ************************************************************

function check_phd_ceu_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_CEU_TOTAL.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_CEU // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_CEU') // NN6
    				   : null; 		
    

	if( a >= 20) {

			alert("Total for Pharmaceutics in all ethnic categories should be less than 20.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_CEU_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check if the  Other Total in MS Degree conferred survey.
// ************************************************************

function check_phd_other_conferred_total() {

    var a = eval('document.forms[0].DC_PHD_OTHER_TOTAL.value');
    var b = eval('document.forms[0].DC_PHD_OTHER_SPECIFY.value');

    a = parseInt(a)? parseInt(a) : 0;

	var wtag = document.all ?  document.all.t_DC_PHD_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_DC_PHD_OTHER_SPECIFY') // NN6
    				   : null; 		

    if(b == '' && a > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_OTHER_SPECIFY.focus()');
			return false;
    }    

	if( a >= 200) {

			alert("Total for Other in all ethnic categories should be less than 200.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].DC_PHD_OTHER_TOTAL.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check Other in MS Degree enr.
// ************************************************************

function check_grad_ms_other_enr_total(flag) {

    var a = eval('document.forms[0].ENR_MS_FT_OTHER_TOTAL.value');
    var b = eval('document.forms[0].ENR_MS_FT_OTHER_SPECIFY.value');

	var wtag = document.all ?  document.all.t_ENR_MS_FT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_ENR_MS_FT_OTHER_SPECIFY') // NN6
    				   : null; 		

    var ftag = document.forms[0].ENR_MS_FT_OTHER_SPECIFY;

    if(flag == 2) {

        var a = eval('document.forms[0].ENR_MS_PT_OTHER_TOTAL.value');
        var b = eval('document.forms[0].ENR_MS_PT_OTHER_SPECIFY.value');

	    var wtag = document.all ?  document.all.t_ENR_MS_PT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_ENR_MS_PT_OTHER_SPECIFY') // NN6
    				   : null; 		

        var ftag = document.forms[0].ENR_MS_PT_OTHER_SPECIFY;
    }

    a = parseInt(a)? parseInt(a) : 0;



    if(b == '' && a > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			ftag.focus();
			return false;
    }    

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check Other in MASTER OF SCIENCE (M.S.): School at Which Undergraduate Degree Received
// ************************************************************

function check_ms_scl_deg_recvd_other_total(flag) {

    var o = eval('document.forms[0].MS_UG_FT_OTHER_SPECIFY.value');

	var wtag = document.all ?  document.all.t_MS_UG_FT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_MS_UG_FT_OTHER_SPECIFY') // NN6
    				   : null; 		

    var ftag = document.forms[0].MS_UG_FT_OTHER_SPECIFY;

    var a = eval('document.forms[0].MS_UG_FT_OTHER_US_PHARM.value');
    var b = eval('document.forms[0].MS_UG_FT_OTHER_US_NON.value');
    var c = eval('document.forms[0].MS_UG_FT_OTHER_CA_PHARM.value');
    var d = eval('document.forms[0].MS_UG_FT_OTHER_CA_NON.value');
    var e = eval('document.forms[0].MS_UG_FT_OTHER_FOREIGN_PHARM.value');
    var f = eval('document.forms[0].MS_UG_FT_OTHER_FOREIGN_NON.value');

    if(flag == 2) {

        var o = eval('document.forms[0].MS_UG_PT_OTHER_SPECIFY.value');

	    var wtag = document.all ?  document.all.t_MS_UG_PT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_MS_UG_PT_OTHER_SPECIFY') // NN6
    				   : null; 		

        var ftag = document.forms[0].MS_UG_PT_OTHER_SPECIFY;

        var a = eval('document.forms[0].MS_UG_PT_OTHER_US_PHARM.value');
        var b = eval('document.forms[0].MS_UG_PT_OTHER_US_NON.value');
        var c = eval('document.forms[0].MS_UG_PT_OTHER_CA_PHARM.value');
        var d = eval('document.forms[0].MS_UG_PT_OTHER_CA_NON.value');
        var e = eval('document.forms[0].MS_UG_PT_OTHER_FOREIGN_PHARM.value');
        var f = eval('document.forms[0].MS_UG_PT_OTHER_FOREIGN_NON.value');

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;

    var total= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f);


    if(o == '' && total > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			ftag.focus();
			return false;
    }    

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check Other in PHD Degree enr.
// ************************************************************

function check_grad_phd_other_enr_total(flag) {

    var a = eval('document.forms[0].ENR_PHD_FT_OTHER_TOTAL.value');
    var b = eval('document.forms[0].ENR_PHD_FT_OTHER_SPECIFY.value');

	var wtag = document.all ?  document.all.t_ENR_PHD_FT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_ENR_PHD_FT_OTHER_SPECIFY') // NN6
    				   : null; 		

    var ftag = document.forms[0].ENR_PHD_FT_OTHER_SPECIFY;

    if(flag == 2) {

        var a = eval('document.forms[0].ENR_PHD_PT_OTHER_TOTAL.value');
        var b = eval('document.forms[0].ENR_PHD_PT_OTHER_SPECIFY.value');

	    var wtag = document.all ?  document.all.t_ENR_PHD_PT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_ENR_PHD_PT_OTHER_SPECIFY') // NN6
    				   : null; 		

        var ftag = document.forms[0].ENR_PHD_PT_OTHER_SPECIFY;
    }

    a = parseInt(a)? parseInt(a) : 0;



    if(b == '' && a > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			ftag.focus();
			return false;
    }    

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Check Other in MASTER OF SCIENCE (M.S.): School at Which Undergraduate Degree Received
// ************************************************************

function check_phd_scl_deg_recvd_other_total(flag) {

    var o = eval('document.forms[0].PHD_UG_FT_OTHER_SPECIFY.value');

	var wtag = document.all ?  document.all.t_PHD_UG_FT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_PHD_UG_FT_OTHER_SPECIFY') // NN6
    				   : null; 		

    var ftag = document.forms[0].PHD_UG_FT_OTHER_SPECIFY;

    var a = eval('document.forms[0].PHD_UG_FT_OTHER_US_PHARM.value');
    var b = eval('document.forms[0].PHD_UG_FT_OTHER_US_NON.value');
    var c = eval('document.forms[0].PHD_UG_FT_OTHER_CA_PHARM.value');
    var d = eval('document.forms[0].PHD_UG_FT_OTHER_CA_NON.value');
    var e = eval('document.forms[0].PHD_UG_FT_OTHER_FOREIGN_PHARM.value');
    var f = eval('document.forms[0].PHD_UG_FT_OTHER_FOREIGN_NON.value');

    if(flag == 2) {

        var o = eval('document.forms[0].PHD_UG_PT_OTHER_SPECIFY.value');

	    var wtag = document.all ?  document.all.t_PHD_UG_PT_OTHER_SPECIFY // IE4+
    				   : document.getElementById ? document.getElementById('t_PHD_UG_PT_OTHER_SPECIFY') // NN6
    				   : null; 		

        var ftag = document.forms[0].PHD_UG_PT_OTHER_SPECIFY;

        var a = eval('document.forms[0].PHD_UG_PT_OTHER_US_PHARM.value');
        var b = eval('document.forms[0].PHD_UG_PT_OTHER_US_NON.value');
        var c = eval('document.forms[0].PHD_UG_PT_OTHER_CA_PHARM.value');
        var d = eval('document.forms[0].PHD_UG_PT_OTHER_CA_NON.value');
        var e = eval('document.forms[0].PHD_UG_PT_OTHER_FOREIGN_PHARM.value');
        var f = eval('document.forms[0].PHD_UG_PT_OTHER_FOREIGN_NON.value');

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;

    var total= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f);


    if(o == '' && total > 0 ) {

			alert("Please specify the other category.");
			wtag.className = 'tfvHighlight';
			ftag.focus();
			return false;
    }    

	wtag.className = 'tfvNormal';

	return true;
}

// ************************************************************
// Check if the Total field match with sum of Male, Female and 
// Unknown numbers for NUMBER OF OFFERS MADE
// ************************************************************

function check_offer_value() {

    //  In-state Resident
    var a = eval('document.forms[0].APP_OFFER_T.value');
	var b = eval('document.forms[0].APP_ACCEPTED_T.value');

    a = parseInt(a)? parseInt(a) : 0;
    b = parseInt(b)? parseInt(b) : 0;

	var wtag = document.all ?  document.all.t_APP_ACCEPTED // IE4+
    				   : document.getElementById ? document.getElementById('t_APP_ACCEPTED') // NN6
    				   : null; 		

	if( a < b) {

			alert("Offers Accepted should be less than the number of Offers Made.");
			wtag.className = 'tfvHighlight';
			eval('document.forms[0].APP_ACCEPTED_T.focus()');
			return false;
	}	

	wtag.className = 'tfvNormal';

	return true;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Master of Science (M.S.): School at Which Undergraduate Degree Received
// ************************************************************

function set_enrollment_school_total( section ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;

    var rtotal;
    var r_tag;


    if( section == 1 ) {

	    a = eval('document.forms[0].MS_UG_FT_CHEM_US_PHARM.value');  
	    b = eval('document.forms[0].MS_UG_FT_CHEM_US_NON.value');    
	    c = eval('document.forms[0].MS_UG_FT_CHEM_CA_PHARM.value');    
	    d = eval('document.forms[0].MS_UG_FT_CHEM_CA_NON.value');     
	    e = eval('document.forms[0].MS_UG_FT_CHEM_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].MS_UG_FT_CHEM_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].MS_UG_FT_CHEM_TOTAL');

    }  else if(section == 2) {

        a = eval('document.forms[0].MS_UG_FT_COL_US_PHARM.value');  
	    b = eval('document.forms[0].MS_UG_FT_COL_US_NON.value');    
	    c = eval('document.forms[0].MS_UG_FT_COL_CA_PHARM.value');    
	    d = eval('document.forms[0].MS_UG_FT_COL_CA_NON.value');     
	    e = eval('document.forms[0].MS_UG_FT_COL_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].MS_UG_FT_COL_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].MS_UG_FT_COL_TOTAL');

    }  else if(section == 3) {

        a = eval('document.forms[0].MS_UG_FT_SAS_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_FT_SAS_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_FT_SAS_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_FT_SAS_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_FT_SAS_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_FT_SAS_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].MS_UG_FT_SAS_TOTAL');

    } else if(section == 4) {

        a = eval('document.forms[0].MS_UG_FT_PP_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_FT_PP_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_FT_PP_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_FT_PP_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_FT_PP_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_FT_PP_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].MS_UG_FT_PP_TOTAL');


    } else if(section == 5) {

        a = eval('document.forms[0].MS_UG_FT_CEU_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_FT_CEU_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_FT_CEU_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_FT_CEU_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_FT_CEU_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_FT_CEU_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].MS_UG_FT_CEU_TOTAL');              


    } else if(section == 6) {

        a = eval('document.forms[0].MS_UG_FT_OTHER_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_FT_OTHER_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_FT_OTHER_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_FT_OTHER_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_FT_OTHER_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_FT_OTHER_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].MS_UG_FT_OTHER_TOTAL');              

    } else if( section == 7 ) {

	    a = eval('document.forms[0].MS_UG_PT_CHEM_US_PHARM.value');  
	    b = eval('document.forms[0].MS_UG_PT_CHEM_US_NON.value');    
	    c = eval('document.forms[0].MS_UG_PT_CHEM_CA_PHARM.value');    
	    d = eval('document.forms[0].MS_UG_PT_CHEM_CA_NON.value');     
	    e = eval('document.forms[0].MS_UG_PT_CHEM_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].MS_UG_PT_CHEM_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].MS_UG_PT_CHEM_TOTAL');

    }  else if(section == 8) {

        a = eval('document.forms[0].MS_UG_PT_COL_US_PHARM.value');  
	    b = eval('document.forms[0].MS_UG_PT_COL_US_NON.value');    
	    c = eval('document.forms[0].MS_UG_PT_COL_CA_PHARM.value');    
	    d = eval('document.forms[0].MS_UG_PT_COL_CA_NON.value');     
	    e = eval('document.forms[0].MS_UG_PT_COL_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].MS_UG_PT_COL_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].MS_UG_PT_COL_TOTAL');

    }  else if(section == 9) {

        a = eval('document.forms[0].MS_UG_PT_SAS_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_PT_SAS_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_PT_SAS_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_PT_SAS_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_PT_SAS_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_PT_SAS_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].MS_UG_PT_SAS_TOTAL');

    } else if(section == 10) {

        a = eval('document.forms[0].MS_UG_PT_PP_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_PT_PP_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_PT_PP_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_PT_PP_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_PT_PP_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_PT_PP_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].MS_UG_PT_PP_TOTAL');              


    } else if(section == 11) {

        a = eval('document.forms[0].MS_UG_PT_CEU_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_PT_CEU_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_PT_CEU_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_PT_CEU_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_PT_CEU_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_PT_CEU_FOREIGN_NON.value');      
                                                                           
        r_tag = eval('document.forms[0].MS_UG_PT_CEU_TOTAL');              


    } else if(section == 12) {

        a = eval('document.forms[0].MS_UG_PT_OTHER_US_PHARM.value');         
	    b = eval('document.forms[0].MS_UG_PT_OTHER_US_NON.value');           
	    c = eval('document.forms[0].MS_UG_PT_OTHER_CA_PHARM.value');         
	    d = eval('document.forms[0].MS_UG_PT_OTHER_CA_NON.value');           
	    e = eval('document.forms[0].MS_UG_PT_OTHER_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].MS_UG_PT_OTHER_FOREIGN_NON.value');      
                                                                             
        r_tag = eval('document.forms[0].MS_UG_PT_OTHER_TOTAL');              

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;


    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f);

    r_tag.value = rtotal;

	return true;
}


// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// Master of Science (M.S.): School at Which Undergraduate Degree Received
// ************************************************************

function set_enrollment_phd_school_total( section ) {

    var a;
    var b;
    var c;
	var d;
	var e;
	var f;

    var rtotal;
    var r_tag;


    if( section == 1 ) {


	    a = eval('document.forms[0].PHD_UG_FT_CHEM_US_PHARM.value');  
	    b = eval('document.forms[0].PHD_UG_FT_CHEM_US_NON.value');    
	    c = eval('document.forms[0].PHD_UG_FT_CHEM_CA_PHARM.value');    
	    d = eval('document.forms[0].PHD_UG_FT_CHEM_CA_NON.value');     
	    e = eval('document.forms[0].PHD_UG_FT_CHEM_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].PHD_UG_FT_CHEM_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].PHD_UG_FT_CHEM_TOTAL');

    }  else if(section == 2) {

        a = eval('document.forms[0].PHD_UG_FT_COL_US_PHARM.value');  
	    b = eval('document.forms[0].PHD_UG_FT_COL_US_NON.value');    
	    c = eval('document.forms[0].PHD_UG_FT_COL_CA_PHARM.value');    
	    d = eval('document.forms[0].PHD_UG_FT_COL_CA_NON.value');     
	    e = eval('document.forms[0].PHD_UG_FT_COL_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].PHD_UG_FT_COL_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].PHD_UG_FT_COL_TOTAL');

    }  else if(section == 3) {

        a = eval('document.forms[0].PHD_UG_FT_SAS_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_FT_SAS_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_FT_SAS_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_FT_SAS_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_FT_SAS_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_FT_SAS_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].PHD_UG_FT_SAS_TOTAL');

    } else if(section == 4) {

        a = eval('document.forms[0].PHD_UG_FT_PP_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_FT_PP_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_FT_PP_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_FT_PP_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_FT_PP_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_FT_PP_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].PHD_UG_FT_PP_TOTAL');


    } else if(section == 5) {

        a = eval('document.forms[0].PHD_UG_FT_CEU_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_FT_CEU_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_FT_CEU_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_FT_CEU_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_FT_CEU_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_FT_CEU_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].PHD_UG_FT_CEU_TOTAL');              


    } else if(section == 6) {

        a = eval('document.forms[0].PHD_UG_FT_OTHER_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_FT_OTHER_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_FT_OTHER_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_FT_OTHER_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_FT_OTHER_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_FT_OTHER_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].PHD_UG_FT_OTHER_TOTAL');              

    } else if( section == 7 ) {

	    a = eval('document.forms[0].PHD_UG_PT_CHEM_US_PHARM.value');  
	    b = eval('document.forms[0].PHD_UG_PT_CHEM_US_NON.value');    
	    c = eval('document.forms[0].PHD_UG_PT_CHEM_CA_PHARM.value');    
	    d = eval('document.forms[0].PHD_UG_PT_CHEM_CA_NON.value');     
	    e = eval('document.forms[0].PHD_UG_PT_CHEM_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].PHD_UG_PT_CHEM_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].PHD_UG_PT_CHEM_TOTAL');

    }  else if(section == 8) {

        a = eval('document.forms[0].PHD_UG_PT_COL_US_PHARM.value');  
	    b = eval('document.forms[0].PHD_UG_PT_COL_US_NON.value');    
	    c = eval('document.forms[0].PHD_UG_PT_COL_CA_PHARM.value');    
	    d = eval('document.forms[0].PHD_UG_PT_COL_CA_NON.value');     
	    e = eval('document.forms[0].PHD_UG_PT_COL_FOREIGN_PHARM.value');      
	    f = eval('document.forms[0].PHD_UG_PT_COL_FOREIGN_NON.value');      
                                        
        r_tag = eval('document.forms[0].PHD_UG_PT_COL_TOTAL');

    }  else if(section == 9) {

        a = eval('document.forms[0].PHD_UG_PT_SAS_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_PT_SAS_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_PT_SAS_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_PT_SAS_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_PT_SAS_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_PT_SAS_FOREIGN_NON.value');      

        r_tag = eval('document.forms[0].PHD_UG_PT_SAS_TOTAL');

    } else if(section == 10) {

        a = eval('document.forms[0].PHD_UG_PT_PP_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_PT_PP_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_PT_PP_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_PT_PP_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_PT_PP_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_PT_PP_FOREIGN_NON.value');      
                                                                          
        r_tag = eval('document.forms[0].PHD_UG_PT_PP_TOTAL');              


    } else if(section == 11) {

        a = eval('document.forms[0].PHD_UG_PT_CEU_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_PT_CEU_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_PT_CEU_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_PT_CEU_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_PT_CEU_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_PT_CEU_FOREIGN_NON.value');      
                                                                           
        r_tag = eval('document.forms[0].PHD_UG_PT_CEU_TOTAL');              


    } else if(section == 12) {

        a = eval('document.forms[0].PHD_UG_PT_OTHER_US_PHARM.value');         
	    b = eval('document.forms[0].PHD_UG_PT_OTHER_US_NON.value');           
	    c = eval('document.forms[0].PHD_UG_PT_OTHER_CA_PHARM.value');         
	    d = eval('document.forms[0].PHD_UG_PT_OTHER_CA_NON.value');           
	    e = eval('document.forms[0].PHD_UG_PT_OTHER_FOREIGN_PHARM.value');    
	    f = eval('document.forms[0].PHD_UG_PT_OTHER_FOREIGN_NON.value');      
                                                                             
        r_tag = eval('document.forms[0].PHD_UG_PT_OTHER_TOTAL');              

    }


	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;
    d = parseInt(d)? parseInt(d) : 0;
	e = parseInt(e)? parseInt(e) : 0;
	f = parseInt(f)? parseInt(f) : 0;


    var rtotal= parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d) + parseInt(e) + parseInt(f);

    r_tag.value = rtotal;

	return true;
}



// ************************************************************
// Calculate the sum of all breakdowns and set to the total for
// School At Which Professional Baccalaureate Was Received
// ************************************************************

function set_school_total( school_type ) {

    var a;
    var b;
    var c;

    var rtotal;
    var r_tag;

    if( school_type == 1 ) {

	    a = eval('document.forms[0].PHARMD2_FT_SAME.value');  
	    b = eval('document.forms[0].PHARMD2_PT_SAME.value');    
	    c = eval('document.forms[0].PHARMD2_NT_SAME.value');    
                                        
        r_tag = eval('document.forms[0].PHARMD2_TOTAL_SAME');

    }  else if( school_type == 2 ) {

	    a = eval('document.forms[0].PHARMD2_FT_OTHERUS.value');  
	    b = eval('document.forms[0].PHARMD2_PT_OTHERUS.value');    
	    c = eval('document.forms[0].PHARMD2_NT_OTHERUS.value');    
                                        
        r_tag = eval('document.forms[0].PHARMD2_TOTAL_OTHERUS');

    }  else if( school_type == 3 ) {

	    a = eval('document.forms[0].PHARMD2_FT_FOREIGN.value');  
	    b = eval('document.forms[0].PHARMD2_PT_FOREIGN.value');    
	    c = eval('document.forms[0].PHARMD2_NT_FOREIGN.value');    
                                        
        r_tag = eval('document.forms[0].PHARMD2_TOTAL_FOREIGN');

    } 

	a = parseInt(a)? parseInt(a) : 0;
	b = parseInt(b)? parseInt(b) : 0;
	c = parseInt(c)? parseInt(c) : 0;

    var rtotal= parseInt(a) + parseInt(b) + parseInt(c);

    r_tag.value = rtotal;

	return true;
}

function check_form_is_empty() {

    var flag = true;
    for(var count=0; count < document.forms[0].elements.length; count++){
        
        if ( document.forms[0].elements[count].type == 'text' && document.forms[0].elements[count].value != "" ) {
            
            flag = false;
            break;  
        }  
    }      
    
    return flag;
}
            
function hidediv( name ) {
        if (document.getElementById) { // DOM3 = IE5, NS6
                    document.getElementById( name ).style.visibility = 'hidden';
                        }
}

function showdiv( name ) {
        if (document.getElementById) { // DOM3 = IE5, NS6
                    document.getElementById( name ).style.visibility = 'visible';
                        }
}


/* 
 * these 3 are for financial survey 
 * they used to be in the HTML template files but i moved them all here
 */
function intramural_total() {
    var target = document.getElementById('intramural_total_revenue');

    if ( target ) {
      target.value = sum_fields('intramural_');
    }
}

function extramural_total() {
    var target = document.getElementById('extramural_total_revenue');
    if ( target ) {
      target.value = sum_fields('extramural_');
    }
}

function sum_fields (filter_re) {
   
    // this is the form element
    var pageElems=document.getElementById("survey");

    var re = new RegExp(filter_re);
    var total_re = new RegExp('_total_revenue');
    var total = 0;
    for (var i=0;i<pageElems.length;i++)
      {
        if (re.test(pageElems.elements[i].name)==true && 
            total_re.test(pageElems.elements[i].name)==false && // do not include current total in calculations
            pageElems.elements[i].value) {
          total = parseInt(total,10) + parseInt(pageElems.elements[i].value, 10);
        }
      }

    if (isNaN(total) ) { total = '' };
    return total;
}
