<!--
//copyright Karen Hall
//completed 1 july 06
//last edited 17 nov 08 - commented out alerts for multiple loci selection: 2-loci, 3-loci, 4 loci, & added alert for 1-locus selection 
//probabilities calculator, 2 to 4 loci selected only, no multiple alleles per loci, no sex-linked loci, no linkages.
var lociNb = 23; //number of mutations/loci
var probF = [[1,0,0,0],[2,2,0,0],[4,2,4,0],[4,4,4,4]]; //set probabilities fraction array
var countLoci = 0; //count loci selected
var win; //set variable for new window (results.htm)
// all loci probabilities  results nomenclature 
var PRN = [[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]; // [0 =E, 1=Bl, 2=Lav, 3=C, 4=Mo][0 = nomenclature 1, etc]
// all loci probabilities results fractions
var PRF = [[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]; // [0 =E, 1=Bl, 2=Lav, 3=C, 4=Mo][0 = fraction 1, etc]
//set default Locus Selected equals false, one for each locus/mutation
var locSel = new Array();
locSel[0] = false; //E
locSel[1] = false; //C
locSel[2] = false; //Lav
locSel[3] = false; //Bl
locSel[4] = false; //I
locSel[5] = false; //Choc
locSel[6] = false; //Ml
locSel[7] = false; //Cha
locSel[8] = false; //Co
locSel[9] = false; //Db
locSel[10] = false; //Di
locSel[11] = false; //ig
locSel[12] = false; //Cb
locSel[13] = false; //S
locSel[14] = false; //Mh
locSel[15] = false; //Pg
locSel[16] = false; //B
locSel[17] = false; //Er
locSel[18] = false; //Mo
locSel[19] = false; //Fm
locSel[20] = false; //Id
locSel[21] = false; //W
locSel[22] = false; //Y
//following used in for loop comparisons (compare below defaults to radio button "name" 
var mLocus = new Array();    //male loci
mLocus[0] = "maleE";
mLocus[1] = "maleC";
mLocus[2] = "maleLav";
mLocus[3] = "maleBl";
mLocus[4] = "maleI";
mLocus[5] = "maleChoc";
mLocus[6] = "maleMl";
mLocus[7] = "maleCha";
mLocus[8] = "maleCo";
mLocus[9] = "maleDb";
mLocus[10] = "maleDi";
mLocus[11] = "maleIg";
mLocus[12] = "maleCb"
mLocus[13] = "maleS";
mLocus[14] = "maleMh";
mLocus[15] = "malePg";
mLocus[16] = "maleB";
mLocus[17] = "maleEr";
mLocus[18] = "maleMo";
mLocus[19] = "maleFm";
mLocus[20] = "maleId";
mLocus[21] = "maleW";
mLocus[22] = "maleY";
var fLocus = new Array();   //female loci
fLocus[0] = "femE";
fLocus[1] = "femC";
fLocus[2] = "femLav";
fLocus[3] = "femBl";
fLocus[4] = "femI";
fLocus[5] = "femChoc";
fLocus[6] = "femMl";
fLocus[7] = "femCha";
fLocus[8] = "femCo";
fLocus[9] = "femDb";
fLocus[10] = "femDi";
fLocus[11] = "femIg";
fLocus[12] = "femCb"
fLocus[13] = "femS";
fLocus[14] = "femMh";
fLocus[15] = "femPg";
fLocus[16] = "femB";
fLocus[17] = "femEr";
fLocus[18] = "femMo";
fLocus[19] = "femFm";
fLocus[20] = "femId";
fLocus[21] = "femW";
fLocus[22] = "femY";
//set default locus wild type
var mG = new Array();    //male wild type gametes
mG[0] = "e+/e+";  //e
mG[1] = "C+/C+"; //c
mG[2] = "Lav+/Lav+"; //lav
mG[3] = "bl+/bl+";  //Bl
mG[4] = "i+/i+";  //I
mG[5] = "Choc+/Choc+";  //choc
mG[6] = "ml+/ml+";  //Ml
mG[7] = "Cha+/Cha+";  //cha
mG[8] = "co+/co+";  //Co
mG[9] = "db+/db+";  //Db
mG[10] = "di+/di+";  //Di
mG[11] = "Ig+/Ig+";  //ig
mG[12] = "cb+/cb+";  //Cb
mG[13] = "s+/s+";  //S
mG[14] = "mh+/mh+";  //Mh
mG[15] = "pg+/pg+";  //Pg
mG[16] = "b+/b+";  //B
mG[17] = "er+/er+";  //Er
mG[18] = "Mo+/Mo+";  //Mo
mG[19] = "fm+/fm+";  //Fm
mG[20] = "id+/id+";  //Id
mG[21] = "W+/W+";  //w
mG[22] = "Y+/Y+";  //y
var fG = new Array();   //female wild type gametes
fG[0] = "e+/e+";
fG[1] = "C+/C+";
fG[2] = "Lav+/Lav+";
fG[3] = "bl+/bl+";
fG[4] = "i+/i+";
fG[5] = "Choc+/-";  //choc
fG[6] = "ml+/ml+";  //Ml
fG[7] = "Cha+/Cha+";  //cha
fG[8] = "co+/co+";  //Co
fG[9] = "db+/db+";  //Db
fG[10] = "di+/di+";  //Di
fG[11] = "Ig+/Ig+";  //ig
fG[12] = "cb+/cb+";  //Cb
fG[13] = "s+/-";  //S
fG[14] = "mh+/mh+";  //Mh
fG[15] = "pg+/pg+";  //Pg
fG[16] = "b+/b+";  //B
fG[17] = "er+/er+";  //Er
fG[18] = "Mo+/Mo+";  //Mo
fG[19] = "fm+/fm+";  //Fm
fG[20] = "id+/-";  //Id
fG[21] = "W+/W+";  //w
fG[22] = "Y+/-";  //y
/* -----------set mutation- genotype/phenotype nomenclature ------------- */
//multidimensional  array set (probabilities nomenclature output text)
var PN = [["E/E (Extended Black), ","E/e<sup>+</sup> (Extended Black), ","e<sup>+</sup>/e<sup>+</sup> (wild type), ","E/E<sup>R</sup> (Extended Black), ","E/e<sup>Wh</sup> (Extended Black), ","E<sup>R</sup>/E<sup>R</sup> (Birchen), ","E<sup>R</sup>/e<sup>+</sup> (Birchen), ","E<sup>R</sup>/e<sup>Wh</sup> (Birchen), ","e<sup>Wh</sup>/e<sup>Wh</sup> (Wheaten), ","e<sup>Wh</sup>/e<sup>+</sup> (Wheaten), ","E/e<sup>b</sup> (Extended Black), ","E<sup>R</sup>/e<sup>b</sup> (Birchen), ","e<sup>Wh</sup>/e<sup>b</sup> (Wheaten), ","e<sup>b</sup>/e<sup>b</sup> (Brown), ","e<sup>b</sup>/e<sup>+</sup> (Wild type), "],
     ["c/c (Recessive White), ","C<sup>+</sup>/c (non recessive white), ","C<sup>+</sup>/C<sup>+</sup> (non recessive white), "],
		["lav/lav (Lavender), ","Lav<sup>+</sup>/lav (non-lavender), ","Lav<sup>+</sup>/Lav<sup>+</sup> (non-lavender), "],
		["Bl/Bl (Blue-Splash), ","Bl/bl<sup>+</sup> (Blue), ","bl<sup>+</sup>/bl<sup>+</sup> (non-blue), "],		
		["I/I (Dominant White), ","I/i<sup>+</sup> (Dominant White), ","i<sup>+</sup>/i<sup>+</sup> (non dominant white), ","I/I<sup>D</sup> (Dominant White), ","I/I<sup>S</sup> (Dominant White), ","I<sup>D</sup>/I<sup>D</sup> (Dun Splash), ","I<sup>D</sup>/i<sup>+</sup> (Dun), ","I<sup>D</sup>/I<sup>S</sup> (Dun), ","I<sup>S</sup>/I<sup>S</sup> (Smoky Adult), ","I<sup>S</sup>/i<sup>+</sup> (Smoky chick down, non-smoky adult), "],
	["choc/choc (Sex-linked Chocolate), ","Choc<sup>+</sup>/choc (non-chocolate), ","Choc<sup>+</sup>/Choc<sup>+</sup> (non-chocolate), ","choc/- (Sex-linked Chocolate female), ","Y<sup>+</sup>/- (Sex-linked Chocolate female), "],
		["Ml/Ml (Melanotic), ","Ml/ml<sup>+</sup> (Melanotic), ","ml<sup>+</sup>/ml<sup>+</sup> (non-melanotic), "],
		["cha/cha (Charcoal), ","Cha<sup>+</sup>/cha (non-charcoal), ","Cha<sup>+</sup>/Cha<sup>+</sup> (non-charcoal), "],
		["Co/Co (Columbian), ","Co/co<sup>+</sup> (Columbian), ","co<sup>+</sup>/co<sup>+</sup> (non-columbian), "],
		["Db/Db (Dark Brown), ","Db/db<sup>+</sup> (Dark Brown), ","db<sup>+</sup>/db<sup>+</sup> (non dark brown), "],
		["Di/Di (Dilute), ","Di/di<sup>+</sup> (Dilute), ","di<sup>+</sup>/di<sup>+</sup> (non dilute), "],
		["ig/ig (Cream), ","Ig<sup>+</sup>/ig (non-cream), ","Ig<sup>+</sup>/Ig<sup>+</sup> (non-cream), "],
["Cb/Cb (Champagne Blond), ","Cb/cb<sup>+</sup> (Champagne Blond), ","cb<sup>+</sup>/cb<sup>+</sup> (non-champagne blond), "],
	["S/S (Sex-linked Silver], ","S/s<sup>+</sup> (Sex-linked Silver), ","s<sup>+</sup>/s<sup>+</sup> (sex-linked gold), ","S/- (Sex-linked Silver female), ","s<sup>+</sup>/- (sex-linked gold female), "],
	["Mh/Mh (Mahogany), ","Mh/mh<sup>+</sup> (Mahogany), ","mh<sup>+</sup>/mh<sup>+</sup> (non-mahogany), "],
	["Pg/Pg (Pattern), ","Pg/pg<sup>+</sup> (Pattern), ","pg<sup>+</sup>/pg<sup>+</sup> (non-pattern), "],
	["B/B (Sex-linked Barring male), ","B/b<sup>+</sup> (Sex-linked Barring male), ","b<sup>+</sup>/b<sup>+</sup> (non-barring male), ","B/B<sup>Sd</sup> (Sex-linked Dilution male), ","B<sup>Sd</sup>/B<sup>Sd</sup> (Sex-linked Dilution- White male)","B<sup>Sd</sup>/b<sup>+</sup> (Sex-linked Dilution male), ","B/- (Sex-linked Barring female), ","B<sup>Sd</sup>/- (Sex-linked Dilution female), ","b<sup>+</sup>/- (non-barring female), "],
	["Er/Er (Erminette-white), ","Er/er<sup>+</sup> (Erminette), ","er<sup>+</sup>/er<sup>+</sup> (non-erminette), "],
		["mo/mo (Mottled), ","Mo<sup>+</sup>/mo (non-mottled), ","Mo<sup>+</sup>/Mo<sup>+</sup> (non-mottled), "],
	["Fm/Fm (Fibromelanosis), ","Fm/fm<sup>+</sup> (Fibromelanosis), ","fm<sup>+</sup>/fm<sup>+</sup> (non-fibromelanosis), "],
["Id/Id (Inhibitor of Dermal Pigment male], ","Id/id<sup>+</sup> (Inhibitor of Dermal Pigment male), ","id<sup>+</sup>/id<sup>+</sup> (dermal pigment male), ","Id/- (Inhibitor of Dermal Pigment female), ","id<sup>+</sup>/- (dermal pigment female), "],
	["w/w (Yellow Skin), ","W<sup>+</sup>/w (White Skin), ","W<sup>+</sup>/W<sup>+</sup> (White Skin), "],	
["y/y (Sex-linked Yellow Skin male), ","Y<sup>+</sup>/y (Sex-linked White Skin male), ","Y<sup>+</sup>/Y<sup>+</sup> (Sex-linked White Skin male), ","y/- (Sex-linked Yellow Skin female), ","Y<sup>+</sup>/- (Sex-linked White Skin female), "]];
/* PN Array
PN[0][0] = "E/E (Extended Black), ";//var ePN = new Array();
PN[0][1] = "E/e<sup>+</sup> (Extended Black), ";
PN[0][2] = "e<sup>+</sup>/e<sup>+</sup> (wild type), ";
PN[1][0] = "c/c (White), ";     //var cPN = new Array();
PN[1][1] = "C<sup>+</sup>/c (non recessive white), ";
PN[1][2] = "C<sup>+</sup>/C<sup>+</sup> (non recessive white), ";
PN[2][0] = "lav/lav (Lavender), ";//var lavPN = new Array();
PN[2][1] = "Lav<sup>+</sup>/lav (non-lavender), ";
PN[2][2] = "Lav<sup>+</sup>/Lav<sup>+</sup> (non-lavender), ";
PN[3][0] = "Bl/Bl (Blue-Splash), ";//var blPN = new Array();
PN[3][1] = "Bl/bl<sup>+</sup> (Blue), ";
PN[3][2] = "bl<sup>+</sup>/bl<sup>+</sup> (non-blue), ";


PN[18][0] = "mo/mo (Mottled), "; //var moPN = new Array();
PN[18][1] = "Mo<sup>+</sup>/mo (non-mottled), ";
PN[18][2] = "Mo<sup>+</sup>/Mo<sup>+</sup> (non-mottled), ";
*/				
/* -----------END mutation- genotype/phenotype nomenclature ------------- */
//Gamete Nomenclature - for comparison to mG[i] and fG[i] variables
var GN = [["E/E","E/e+","e+/e+","E/ER","E/eWh","ER/ER","ER/e+","ER/eWh","eWh/eWh","eWh/e+","E/eb","ER/eb","eWh/eb","eb/eb","eb/e+"],
		   ["c/c","C+/c","C+/C+"],
		   ["lav/lav","Lav+/lav","Lav+/Lav+"],
		  ["Bl/Bl","Bl/bl+","bl+/bl+"],
		  ["I/I","I/i+","i+/i+","I/ID","I/IS","ID/ID","ID/i+","ID/IS","IS/IS","IS/i+"],
		  ["choc/choc","Choc+/choc","Choc+/Choc+","choc/-","Choc+/-"],
		  ["Ml/Ml","Ml/ml+","ml+/ml+"],
		  ["cha/cha","Cha+/cha","Cha+/Cha+"],
		  ["Co/Co","Co/co+","co+/co+"],
		  ["Db/Db","Db/db+","db+/db+"],
		  ["Di/Di", "Di/di+","di+/di+"],
		  ["ig/ig","Ig+/ig","Ig+/Ig+"],
		  ["Cb/Cb","Cb/cb+","cb+/cb+"],
		  ["S/S","S/s+","s+/s+","S/-","s+/-"],
		  ["Mh/Mh","Mh/mh+","mh+/mh+"],
		  ["Pg/Pg","Pg/pg+","pg+/pg+"],
		  ["B/B","B/b+","b+/b+","B/BSd","BSd/BSd","BSd/b+","B/-","BSd/-","b+/-"],
		  ["Er/Er","Er/er+","er+/er+"],
		  ["mo/mo","Mo+/mo","Mo+/Mo+"],
		  ["Fm/Fm","Fm/fm+","fm+/fm+"],
		  ["Id/Id","Id/id+","id+/id+","Id/-","id+/-"],
		  ["w/w","W+/w","W+/W+"],
		  ["y/y","Y+/y","Y+/Y+","y/-","Y+/-"]];
/*
GN[0][0] = "E/E"
GN[0][1] = "E/e"
GN[0][2] = "e+/e+"
GN[1][0] = "c/c"
GN[1][1] = "C+/c"
GN[1][2] = "C+/C+"
GN[2][0] = "lav/lav"
GN[2][1] = "Lav+/lav"
GN[2][2] = "Lav+/Lav+"
GN[3][0] = "Bl/Bl"
GN[3][1] = "Bl/bl+"
GN[3][2] = "bl+/bl+"
GN[18][0] = "mo/mo"
GN[18][1] = "Mo+/mo"
GN[18][2] = "Mo+/Mo+"
*/						
/* -------When radio buttons are clicked - change wild type variables------ */
function radGM(oRadM){    //onclick="radGM('this');"   //for males
 for (var i = 0;i < lociNb;i++){
   if (oRadM.name == mLocus[i]){ 
		 mG[i] = oRadM.value; //only need this 
   } //end if 
 }  // end for loop 
} //end function
function radGF(oRadF){    //onclick="radGF('this');"   //for females
 for (var i = 0;i < lociNb;i++){
   if (oRadF.name == fLocus[i]){ 
		 fG[i] = oRadF.value; //only need this	  
   } //end if 
 }  // end for loop 
} //end function
/* -----------------------END change wild type variables ------------------ */
/* ---------------------- START calculate probabilities & output %/fraction & nomenclature ------------------- */
// --- when CALCULATE - submit button is clicked --- //
function submitCalc(){
//Set up "results" document with headings, format, etc
if (win != null){ // check if results.htm is open & close window if open
  win.close();
}
win = window.open("results.htm", null); //size of results.htm
win.document.write("<body bgcolor='#AA8899'>"); // background colour of results.htm
win.document.write("<h2>" + "---Parent Genotypes Selected---" + "</h2>"); //heading 
win.document.write("Parent Male Genotype is: " + "<p style='color: #660000;'>"); //heading
for (var i = 0;i < lociNb;i++){
win.document.write(mG[i] + " ");// + maleMo + " " + maleC + " " + maleLav + " " + maleBl + maleE
}
win.document.write("</p>");
win.document.write("</br>" + "Parent Female Genotype is: " + "<p style='color: #660000;'>");//heading
for (var i = 0;i < lociNb;i++){
win.document.write(fG[i] + " ");// + femE + " " + femMo + " " + femC + " " + femLav + " " + femBl
}
win.document.write("</br>" + "<h2>" + "---Offspring Probabilities---" + "</h2>"); //heading
/* -------- START 1-mutation per locus probabilities -fractions & nomenclature ---------- */

for (var i = 0;i < lociNb;i++){
 if (mG[i]  == GN[i][0]){ //if maleE = E/E (ie male E/E radio button selected) 
    locSel[i] = true; //set "E locus Selected" to true
    if (fG[i] == GN[i][0]){ //if femaleE = E/E (ie female E/E radio button selected) 
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][0];	     //set E(a) probabilities nomenclature to "E/E (Extended Black)"	  
    } else if (fG[i] == GN[i][1]){//if femaleE = E/e+ (ie female E/e+ radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];       //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"		
    } else { //e+/e+  if (fG[i] == GN[i][2])    //if femaleE = e+/e+ (ie default, no female radio button selected for this locus)
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"			
   } //end femE if comparisons
 }else if(mG[i] == GN[i][1]) { //if maleE = E/e+ (ie male E/e= radio button selected) 
 		locSel[i] = true;
    if (fG[i] == GN[i][0]){  //if femaleE = E/E (ie female E/E radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];      //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];	     //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"			
    } else if (fG[i] == GN[i][1]){ //if femaleE = E/e+ (ie female E/e+ radio button selected)
      PRF[i][0] = probF[2][0]; //set fraction to 1/4
      PRF[i][1] = probF[2][1]; //set fraction to 1/2
      PRF[i][2] = probF[2][2]; //set fraction to 1/4
      PRF[i][3] = probF[2][3];
      PRN[i][0] = PN[i][0];      //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];      //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"
			PRN[i][2] = PN[i][2];      //set E(c) probabilities nomenclature to "e+/e+ (wild type)"		
    } else   { //e+/e+ if (fG[i] == GN[i][2])    //if femaleE = e+/e+ (ie default, no female radio button selected for this locus)
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][2];      //set E(b) probabilities nomenclature to "e+/e+ (wild type)"			
    } //end femE if comparisons
 }else { //if maleE = e+/e+ (ie NO maleE radio button selected) if (mG[i]  == GN[i][2])  
    if (fG[i] == GN[i][0]){ //if femaleE = E/E (ie female E/E radio button selected) 
		  locSel[i] = true; //set "E locus Selected" to true
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"			
    } else if (fG[i] == GN[i][1]){//if femaleE = E/e+ (ie female E/e+ radio button selected)
	    locSel[i] = true; //set "E locus Selected" to true 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2 (50%)
      PRF[i][1] = probF[1][1]; //set fraction to 1/2 
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][1];     //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][2];     //set E(b) probabilities nomenclature to "e+/e+ (wild type)"	
    } //end femE if comparisons 
 } //end ALL maleE if comparisons
} //end for loop 
/* --------------- END 1-mutation locus probabilities -fractions & nomenclature ---------- */

////////////////////////////////////////////
//--(commented out) THIS TO BE COMPLETED ..... FOR MULTIPLE ALLELES on E, I LOCI (to replace '1-mutation' above)------
//set fraction probabilities & nomenclature to what has been selected (for each mutation)
//GN:0"E/E",1"E/e+",2"e+/e+",3"E/ER",4"E/eWh",5"ER/ER",6"ER/e+",7"ER/eWh",8"eWh/eWh",9"eWh/e+",10"E/eb",11"ER/eb",12"eWh/eb",13"eb/eb",14"eb/e+"
//0"I/I",1"I/i+",2"i+/i+",3"I/ID",4"I/IS",5"ID/ID",6"ID/i+",7"ID/IS",8"IS/IS",9"IS/i+"
/*for (var i = 0;i < lociNb;i++){
 if (mG[i]  == GN[i][0]){ //if maleE = E/E (ie male E/E radio button selected) 
    locSel[i] = true; //set "E locus Selected" to true
    if (fG[i] == GN[i][0]){ //if femaleE = E/E (ie female E/E radio button selected) 
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][0];	     //set E(a) probabilities nomenclature to "E/E (Extended Black)"	  
    } else if (fG[i] == GN[i][1]){//if femaleE = E/e+ (ie female E/e+ radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];       //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"	
	  } else if (fG[i] == GN[i][2]) { //if femaleE = e+/e+ (ie default, no female radio button selected for this locus)
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"	
	  } else if (fG[i] == GN[i][3]){//if femaleE = E/ER (ie female E/ER radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][3];       //set E(b) probabilities nomenclature to "E/ER (Extended Black)"	
	  } else if (fG[i] == GN[i][4]){//if femaleE = E/eWh (ie female E/eWh radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][4];       //set E(b) probabilities nomenclature to "E/eWh (Extended Black)" 
	} else if (fG[i] == GN[i][5]){//if femaleE = ER/ER (ie female ER/ER radio button selected) 
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)" 
	} else if (fG[i] == GN[i][6]){//if femaleE = ER/e+ (ie female ER/e+ radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)" 
	  PRN[i][1] = PN[i][1];       //set E(a) probabilities nomenclature to "E/e+ (Extended Black)" 
	} else if (fG[i] == GN[i][7]){//if femaleE = ER/eWh (ie female ER/eWh radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2 
      PRF[i][2] = probF[1][2]; 
      PRF[i][3] = probF[1][3]; 
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"
      PRN[i][1] = PN[i][3];       //set E(b) probabilities nomenclature to "E/ER (Extended Black)" 		  
	 } else if (fG[i] == GN[i][8]){//if femaleE = eWh/eWh (ie female eWh/eWh radio button selected) 
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0   
      PRN[i][0] = PN[i][4];       //set E(b) probabilities nomenclature to "E/eWh (Extended Black)"	
	  } else if (fG[i] == GN[i][9]) { //if femaleE = eWh/e+ (ie eWh/e+ female radio button selected for this locus)
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"
      PRN[i][1] = PN[i][1];       //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"	
	  } else if (fG[i] == GN[i][10]){//if femaleE = E/eb (ie female E/eb radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"	
	  PRN[i][1] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)"
	  } else if (fG[i] == GN[i][11]){//if femaleE = ER/eb (ie female ER/eb radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)"
      PRN[i][1] = PN[i][10];       //set E(b) probabilities nomenclature to "E/eb (Extended Black)" 
	} else if (fG[i] == GN[i][12]){//if femaleE = eWh/eb (ie female eWh/eb radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2 
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"
      PRN[i][1] = PN[i][10];      //set E(b) probabilities nomenclature to "E/eb (Extended Black)" 
	} else if (fG[i] == GN[i][13]){//if femaleE = eb/eb (ie female eb/eb radio button selected) 
      PRF[i][0] = probF[0][0]; //set fraction to 1/1
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)"  
	} else if (fG[i] == GN[i][14]){//if femaleE = eb/e+ (ie female eb/e+ radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; 
      PRF[i][3] = probF[1][3]; 
      PRN[i][0] = PN[i][1];       //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][10];      //set E(b) probabilities nomenclature to "E/eb (Extended Black)" 		
   } //end femE if comparisons
 }else if(mG[i] == GN[i][1]) { //if maleE = E/e+ (ie male E/e= radio button selected) 
 		locSel[i] = true;
    if (fG[i] == GN[i][0]){  //if femaleE = E/E (ie female E/E radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][0];      //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];	     //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"			
    } else if (fG[i] == GN[i][1]){ //if femaleE = E/e+ (ie female E/e+ radio button selected)
      PRF[i][0] = probF[2][0]; //set fraction to 1/4
      PRF[i][1] = probF[2][1]; //set fraction to 1/2
      PRF[i][2] = probF[2][2]; //set fraction to 1/4
      PRF[i][3] = probF[2][3];
      PRN[i][0] = PN[i][0];      //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][1];      //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"
	  PRN[i][2] = PN[i][2];      //set E(c) probabilities nomenclature to "e+/e+ (wild type)"		
    } else if (fG[i] == GN[i][2]){    //if femaleE = e+/e+ (ie default, no female radio button selected for this locus)
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][2];      //set E(b) probabilities nomenclature to "e+/e+ (wild type)"
	  } else if (fG[i] == GN[i][3]){//if femaleE = E/ER (ie female E/ER radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][3];       //set E(b) probabilities nomenclature to "E/ER (Extended Black)"	
	  PRN[i][2] = PN[i][1];       //set E(c) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][3] = PN[i][6];       //set E(d) probabilities nomenclature to "ER/e+ (Birchen)"	
	  } else if (fG[i] == GN[i][4]){//if femaleE = E/eWh (ie female E/eWh radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"
      PRN[i][1] = PN[i][4];       //set E(b) probabilities nomenclature to "E/eWh (Extended Black)"	
	  PRN[i][2] = PN[i][1];       //set E(c) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][3] = PN[i][9];      //set E(d) probabilities nomenclature to "eWh/e+ (Wheaten)"
	} else if (fG[i] == GN[i][5]){//if femaleE = ER/ER (ie female ER/ER radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; 
      PRF[i][3] = probF[1][3];
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)"
      PRN[i][1] = PN[i][6];       //set E(b) probabilities nomenclature to "ER/e+ (Birchen)"		  
	} else if (fG[i] == GN[i][6]){//if femaleE = ER/e+ (ie female ER/e+ radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4 
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)" 
	  PRN[i][1] = PN[i][8];       //set E(a) probabilities nomenclature to "ER/e+ (Birchen)"
	  PRN[i][2] = PN[i][1];       //set E(c) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][3] = PN[i][2];      //set E(d) probabilities nomenclature to "e+/e+ (wild type)"  	  	  
	} else if (fG[i] == GN[i][7]){//if femaleE = ER/eWh (ie female ER/eWh radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4  
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)"
      PRN[i][1] = PN[i][4];       //set E(b) probabilities nomenclature to "E/eWh (Extended Black)" 
	  PRN[i][2] = PN[i][6];   //set E(c) probabilities nomenclature to "ER/e+ (Extended Black)"
      PRN[i][3] = PN[i][9];       //set E(d) probabilities nomenclature to "eWh/e+ (wild type)"
	 } else if (fG[i] == GN[i][8]){//if femaleE = eWh/eWh (ie female eWh/eWh radio button selected)
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"
      PRN[i][1] = PN[i][9];       //set E(b) probabilities nomenclature to "eWh/e+ (Wheaten)"	  
	  } else if (fG[i] == GN[i][9]) { //if femaleE = eWh/e+ (ie eWh/e+ female radio button selected for this locus)
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4 
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"
      PRN[i][1] = PN[i][1];       //set E(b) probabilities nomenclature to "E/e+ (Extended Black)"	
	  PRN[i][2] = PN[i][9];       //set E(a) probabilities nomenclature to "eWh/e+ (Wheaten)"
      PRN[i][3] = PN[i][2];       //set E(b) probabilities nomenclature to "e+/e+ (Wild type)"		  
	  } else if (fG[i] == GN[i][10]){//if femaleE = E/eb (ie female E/eb radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4 
      PRN[i][0] = PN[i][0];       //set E(a) probabilities nomenclature to "E/E (Extended Black)"	
	  PRN[i][1] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)"	
	  PRN[i][2] = PN[i][1];       //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"	
	  PRN[i][3] = PN[i][14];       //set E(a) probabilities nomenclature to "e+/eb (Wild type)"		  
	  } else if (fG[i] == GN[i][11]){//if femaleE = ER/eb (ie female ER/eb radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4 
      PRN[i][0] = PN[i][3];       //set E(a) probabilities nomenclature to "E/ER (Extended Black)"	
	  PRN[i][1] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)"	
	  PRN[i][2] = PN[i][6];       //set E(a) probabilities nomenclature to "ER/e+ (Extended Black)"	
	  PRN[i][3] = PN[i][14];       //set E(a) probabilities nomenclature to "e+/eb (Wild type)"		  
	} else if (fG[i] == GN[i][12]){//if femaleE = eWh/eb (ie female eWh/eb radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4 
      PRN[i][0] = PN[i][4];       //set E(a) probabilities nomenclature to "E/eWh (Extended Black)"	
	  PRN[i][1] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)"	
	  PRN[i][2] = PN[i][9];       //set E(a) probabilities nomenclature to "eWh/e+ (Wheaten)"	
	  PRN[i][3] = PN[i][14];       //set E(a) probabilities nomenclature to "e+/eb (Wild type)"		  
	} else if (fG[i] == GN[i][13]){//if femaleE = eb/eb (ie female eb/eb radio button selected) 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2
      PRF[i][1] = probF[1][1]; //set fraction to 1/2
      PRF[i][2] = probF[1][2]; 
      PRF[i][3] = probF[1][3]; 
      PRN[i][0] = PN[i][10];       //set E(a) probabilities nomenclature to "E/eb (Extended Black)" 
	  PRN[i][1] = PN[i][14];       //set E(a) probabilities nomenclature to "e+/eb (Wild type)"
	 	   
	} else if (fG[i] == GN[i][14]){//if femaleE = eb/e+ (ie female eb/e+ radio button selected) 
      PRF[i][0] = probF[3][0]; //set fraction to 1/4
      PRF[i][1] = probF[3][1]; //set fraction to 1/4
      PRF[i][2] = probF[3][2]; //set fraction to 1/4
      PRF[i][3] = probF[3][3]; //set fraction to 1/4  
      PRN[i][0] = PN[i][1];       //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][10];       //set E(b) probabilities nomenclature to "E/eb (Extended Black)" 		
	  PRN[i][2] = PN[i][2];       //set E(a) probabilities nomenclature to "e+/e+ (Wild type)"	
	  PRN[i][3] = PN[i][14];       //set E(a) probabilities nomenclature to "e+/eb (Wild type)"	
    } //end all femE if comparisons
	
	//GN:0"E/E",1"E/e+",2"e+/e+",3"E/ER",4"E/eWh",5"ER/ER",6"ER/e+",7"ER/eWh",8"eWh/eWh",9"eWh/e+",10"E/eb",11"ER/eb",12"eWh/eb",13"eb/eb",14"eb/e+"
//0"I/I",1"I/i+",2"i+/i+",3"I/ID",4"I/IS",5"ID/ID",6"ID/i+",7"ID/IS",8"IS/IS",9"IS/i+"   //editing here!!!
	  //UP TO HERE!! 12 june 06  ///maleE = e+/e+	 
	
 }else { //if maleE = e+/e+ (ie NO maleE radio button selected) if (mG[i]  == GN[i][2])  
    if (fG[i] == GN[i][0]){ //if femaleE = E/E (ie female E/E radio button selected) 
		  locSel[i] = true; //set "E locus Selected" to true
      PRF[i][0] = probF[0][0]; //set fraction to 1/1 (100%)
      PRF[i][1] = probF[0][1]; //0
      PRF[i][2] = probF[0][2]; //0
      PRF[i][3] = probF[0][3]; //0
      PRN[i][0] = PN[i][1];      //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"			
    } else if (fG[i] == GN[i][1]){//if femaleE = E/e+ (ie female E/e+ radio button selected)
	    locSel[i] = true; //set "E locus Selected" to true 
      PRF[i][0] = probF[1][0]; //set fraction to 1/2 (50%)
      PRF[i][1] = probF[1][1]; //set fraction to 1/2 
      PRF[i][2] = probF[1][2]; //0
      PRF[i][3] = probF[1][3]; //0
      PRN[i][0] = PN[i][1];     //set E(a) probabilities nomenclature to "E/e+ (Extended Black)"
      PRN[i][1] = PN[i][2];     //set E(b) probabilities nomenclature to "e+/e+ (wild type)"	
    } //end femE if comparisons 
 } //end ALL maleE if comparisons
} //end for loop 
*/
// end of edited version - for multiple allele loci
///////////////////////////////////////////

/*-----------------------START update Loci count - increment--------------------- */
for (var i = 0;i < lociNb;i++){
  if (locSel[i]){
    countLoci++;
  } //end if locSel
} //end for
/*-----------------------END update Loci count - increment--------------------- */
     ////////////////////////////////////// ONE LOCI SELECTED ///////////////////////////////////
/*---------- For ONE locus- Calculate percentage probabilities, then output results --------- */
if (countLoci == 1){ // if count loci = 1 only 
    win.alert("Please select mutations from more than one locus.");
 /* NEED TO FINISH THIS - for multiple alleles on a locus
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
		if (PRN[i][0] == PN[i][0]  || PRN[i][0] == PN[i][1]){ //a  //if ePRN-a = EE or E/e+
		 var probP = (1 / PRF[i][0]) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0]); 	//output probability % and fraction    
		} 
		if (PRN[i][1] == PN[i][1] || PRN[i][1] == PN[i][2]){   //b  //if ePRN-b = EE or Ee+
		 var probP = (1 / PRF[i][1]) * 100;
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1]); 	// output probability % and fraction
		} 
		if (PRN[i][2] == PN[i][2]){ // && PRN[i][3] != PN[i][3] //later -when extend to 4/4/4/4
		 var probP = (1 / PRF[i][2]) * 100;             //c  //if ePRN-c = e+/e+
		 win.document.write(probP + "% (1/" + PRF[i][2] + ") " + PRN[i][2]); 	// output probability % and fraction
		}
		if (PRN[i][3] == PN[i][3]){ //extended to 4/4/4/4
		 var probP = (1 / PRF[i][3]) * 100;            
		 win.document.write(probP + "% (1/" + PRF[i][3] + ") " + PRN[i][3]); 	// output probability % and fraction
		} //end ALL if PRN = PN
   } //end for PRN loop 
	//} //end if countLoci = 1 
*/
 /*
  for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
		if (PRF[i][0] == probF[0][0]){ //a  //if ePRN-a = EE or E/e+ 100%
		 var probP = (1 / PRF[i][0]) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0]); 	//output probability % and fraction    
		} 
		if (PRF[i][0] == probF[1][0]){   //b  //if ePRN-b = EE or Ee+ 50%
		 var probP = (1 / PRF[i][1]) * 100;
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1]); 	// output probability % and fraction
		} 
		if (PRF[i][2] == probF[2][0]){ // && PRN[i][3] != PN[i][3] //later -when extend to 4/4/4/4
		 var probP = (1 / PRF[i][2]) * 100;             //c  //if ePRN-c = e+/e+
		 win.document.write(probP + "% (1/" + PRF[i][2] + ") " + PRN[i][2]); 	// output probability % and fraction
		}
		if (PRF[i][3] == probF[3][0]){ //extended to 4/4/4/4
		 var probP = (1 / PRF[i][3]) * 100;            
		 win.document.write(probP + "% (1/" + PRF[i][3] + ") " + PRN[i][3]); 	// output probability % and fraction
		} //end ALL if PRN = PN
   } //end for PRN loop 
	//} //end if countLoci = 1 
	*/
	//end of edited version - not finished - multiple loci
	/*-------------- END ONE locus- Calculate percentage probabilities, then output results ------------- */	
	    ////////////////////////////////////// TWO LOCI SELECTED ///////////////////////////////////
/*-------------- For TWO locus- Calculate percentage probabilities, then output results ------------- */	
}else if (countLoci == 2){ // if count loci = 2 only 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	  //next output 100% & 100% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0]){
		 //win.alert("countLoci equals 2-a 100% and 100%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0]);//1/1 x 1/1
		} //next output 50% & 100% 
  	    if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0]){
		 //win.alert("countLoci equals 2-b 50%,50% and 100%"); 
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][0] + ", " + PRN[s][0] + "<br />");//1/2 x 1/1
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + ", " + PRN[s][0]);//1/2 x 1/1
	   } //next output 25,50,25% & 100% 
		if (PRF[i][0] == probF[2][0] && PRF[i][1] == probF[2][1] && PRF[s][0] == probF[0][0] ){ 
		 //win.alert("countLoci equals 2-c 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/4 x 1/1
	     win.document.write(probPb + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + PRN[s][0] + "<br />");//1/2 x 1/1
	     win.document.write(probPa + "% (1/" + PRF[i][2] + ") " + PRN[i][2] + PRN[s][0]);//1/4 x 1/1
	 	} //end  if PRN = PN   
		 if (PRF[i][1] == probF[3][0] && PRF[s][0] == probF[0][0] ){ // extended to 4/4/4/4
		 //win.alert("countLoci equals 2-d 25,25,25,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/4 x 1/1
	     win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][1] + PRN[s][0] + "<br />");//1/4 x 1/1
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][2] + PRN[s][0] + "<br />");//1/4 x 1/1
	     win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][3] + PRN[s][0]);//1/4 x 1/1
	 	} //end  if PRN = PN
   }  //end for s PRN2 loop 
 } 	 //end for i PRN1 loop 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 //next output 100% & 50%  
  	  if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 2--a 100% and 50%,50% "); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + "<br />");//1/1 x 1/2
	     win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][1]);//1/1 x 1/2
	  }//next output 100% & 25,50,25% 
	  if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[s][1] == probF[2][1]){ 
		 //win.alert("countLoci equals 2--b 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][2])) * 100;  //calculate probability percentage  1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1])) * 100;  //calculate probability percentage 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/1 x 1/4
	     win.document.write(probPb + "% (1/" + PRF[s][1] + ") " + PRN[i][0] + PRN[s][1] + "<br />");//1/1 x 1/2
	     win.document.write(probPa + "% (1/" + PRF[s][2] + ") " + PRN[i][0] + PRN[s][2]);//1/1 x 1/4
	  } //next output 100% & 25,25,25,25%
	  if (PRF[i][0] == probF[0][0] && PRF[s][1] == probF[3][0]){  //extended to 4/4/4/4 if s1 = 4
		 //win.alert("countLoci equals 2--c 100% and 25,25,25,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/1 x 1/4
	     win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][1] + "<br />");//1/1 x 1/4
		 win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][2] + "<br />");//1/1 x 1/4
	     win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][3]);//1/1 x 1/4		
	  } //end ALL if PRF = probF    
    } //end for s PRF1 loop 
 } //end for i PRF2 loop 	 /////////////////////////////////UP TO HERE - need to extend to 4/4/4/4
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 //next output 25,50,25% & 50%  
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0]){ 
		// win.alert("countLoci equals 2---a 25,50,25% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage  1/2 x 1/4
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1])) * 100;  //calculate probability percentage 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0];  //calculate probability fraction  1/2 x 1/4
		 var probFb = PRF[i][1] * PRF[s][1];  //calculate probability fraction 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + "<br />");//1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + "<br />");//1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + "<br />");//1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + "<br />");//1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1]);//1/4 x 1/2
	  }//next output 25,50,25% & 25,50,25% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] ){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 2---b 25,50,25% and 25,50,25% ");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1])) * 100;  //calculate probability percentage 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1];  //calculate probability fraction 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0];  //calculate probability fraction  1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0];  //calculate probability fraction 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + "<br />");//1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + "<br />");//1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + "<br />");//1/4 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + "<br />");//1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + "<br />");//1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + "<br />");//1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + "<br />");//1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2]);//1/4 x 1/4
	  } //end ALL if PRF = probF    
  } //end for i PRF1 loop 
 } //end for s PRF2 loop 	 
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 //next output 50% & 50%  
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 2----a 50%,50% and 50%,50% "); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0];  //calculate probability fraction 1/2 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + "<br />");//1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + "<br />");//1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + "<br />");//1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1]);//1/2 x 1/2 	
	  }//next output 50% & 25,50,25% 
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] ){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 2----b 50%,50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0])) * 100;  //calculate probability percentage  1/2 x 1/4
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1])) * 100;  //calculate probability percentage 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0];  //calculate probability fraction  1/2 x 1/4
		 var probFb = PRF[i][1] * PRF[s][1];  //calculate probability fraction 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + "<br />");//1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + "<br />");//1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + "<br />");//1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + "<br />");//1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + "<br />");//1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2]);//1/2 x 1/4
	  } //end ALL if PRF = probF    
   } //end for i PRF1 loop 
  } //end for s PRF2 loop 	 
//} //end if countLoci = 2 	
/*-------------- END For TWO locus- Calculate percentage probabilities, then output results ------------- */
       ////////////////////////////////////// THREE LOCI SELECTED ///////////////////////////////////
/*-------------- For THREE or more locus- Calculate percentage probabilities, then output results ------------- */
}else if (countLoci == 3){ // if count loci = 3 only 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  //next output 100% & 100% & 100% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0]){
		 //win.alert("countLoci equals 3-a 100% and 100% and 100%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0]);//1/1 x 1/1 x 1/1
		} //next output 50% & 100% & 100% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0]){
		 //win.alert("countLoci equals 3-b 50%,50% and 100% and 100%"); 
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/1
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0]);//1/2 x 1/1 x 1/1 
	   } //next output 25,50,25% & 100% & 100% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0]){ //later - extend to 4/4/4/4
		// win.alert("countLoci equals 3-c 25,50,25% and 100% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + PRF[i][2] + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0]);//1/4 x 1/1 x 1/1
	 	} //end  if PRF = probF    
   } //end for t PRF3 loop  
  } //end for s PRF2 loop 	
 } //end for i PRF1 loop         
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 100% & 50% & 100%  
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 3--a 100% and 50%,50% and 100%"); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/1
	   win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0]);//1/1 x 1/2 x 1/1
	  }//next output 100% & 25,50,25% & 100%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3--b 100% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][2]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/1
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/1
		 win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/4 x 1/1
	   win.document.write(probPb + "% (1/" + PRF[s][1] + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + PRF[s][2] + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0]);//1/1 x 1/4 x 1/1
	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 25,50,25% & 50% & 100% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0]){ 
		// win.alert("countLoci equals 3---a 25,50,25% and 50%,50% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/1
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0]);//1/4 x 1/2 x 1/1
	  }//next output 25,50,25% & 25,50,25% & 100%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3---b 25,50,25% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/1
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/1
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/1
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/1
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/4 x 1/1
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/1 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/1		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/1 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/1 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/1
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/1	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0]);//1/4 x 1/4 x 1/1
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 50% & 50% & 100% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 3----a 50%,50% and 50%,50% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/1
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0]);//1/2 x 1/2 x 1/1 	
	  }//next output 50% & 25,50,25% & 100%
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0]){  //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 3----b 50%,50% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/1
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0]);//1/2 x 1/4 x 1/1	 		 
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	
///////////////////////////////////////////50% -3rd locus////////////////////////////////////////////////////////// 
  for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  //next output 100% & 100% & 50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0]){
		 //win.alert("countLoci equals 3-a 100% and 100% and 50%,50%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1]);//1/1 x 1/1 x 1/2
		} //next output 50% & 100% & 50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0]){
		 //win.alert("countLoci equals 3-b 50%,50% and 100% and 50%,50%"); 
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/2 
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1]);//1/2 x 1/1 x 1/2 
	   } //next output 25,50,25% & 100% & 50% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 3-c 25,50,25% and 100% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + PRF[i][2] + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + "<br />");//1/4 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + PRF[i][2] + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1]);//1/4 x 1/1 x 1/2
	 	} //end  if PRF = probF    
   } //end for t PRF3 loop  
  } //end for s PRF2 loop 	
 } //end for i PRF1 loop        
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 100% & 50% & 50%  
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 3--a 100% and 50%,50% and 50%,50%"); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1];  // calculate probability fraction
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1]);//1/1 x 1/2 x 1/2
 	 }//next output 100% & 25,50,25% & 50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3--b 100% and 25,50,25% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  // calculate probability fraction 1/1 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0];  // calculate probability fraction 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1]);//1/1 x 1/4 x 1/2
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 25,50,25% & 50% & 50% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 3---a 25,50,25% and 50%,50% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1]);//1/4 x 1/2 x 1/2
	  }//next output 25,50,25% & 25,50,25% & 50%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3---b 25,50,25% and 25,50,25% and 50%,50%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/2
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1]);//1/4 x 1/4 x 1/2
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	 			 		 	 						 		 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 50% & 50% & 50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 3----a 50%,50% and 50%,50% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1]);//1/2 x 1/2 x 1/2 
	  }//next output 50% & 25,50,25% & 50%
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0]){  //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 3----b 50%,50% and 25,50,25% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1]);//1/2 x 1/4 x 1/2		 
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	
///////////////////////////////////////////////END OF 50% 3rd locus ////////////////////////////////////////// 
///////////////////////////////////////////////START 25,50,25% 3rd locus ////////////////////////////////////
  for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  //next output 100% & 100% & 25,50,25% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0]){
		 //win.alert("countLoci equals 3-a 100% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2]);//1/1 x 1/1 x 1/4
		} //next output 50% & 100% & 25,50,25% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0]){
		 //win.alert("countLoci equals 3-b 50%,50% and 100% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/1 x 1/4
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/4 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/1 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2]);//1/2 x 1/1 x 1/4 
	   } //next output 25,50,25% & 100% & 25,50,25%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0]){ //later - extend to 4/4/4/4
		// win.alert("countLoci equals 3-c 25,50,25% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/4 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/4 x 1/1 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + "<br />");//1/4 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + "<br />");//1/4 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2]);//1/4 x 1/1 x 1/4
	 	} //end  if PRF = probF 
   } //end for t PRF3 loop  
  } //end for s PRF2 loop 	
 } //end for i PRF1 loop         
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 100% & 50% & 25,50,25% 
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 3--a 100% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2]);//1/1 x 1/2 x 1/4	 
	  }//next output 100% & 25,50,25% & 25,50,25% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3--b 100% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/4 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/1 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/1 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + "<br />");//1/1 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + "<br />");//1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/1 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2]);//1/1 x 1/4 x 1/4
	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 25,50,25% & 50% & 25,50,25%
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 3---a 25,50,25% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/2 x 1/4
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/2 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/4 x 1/2 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2]);//1/4 x 1/2 x 1/4
	  }//next output 25,50,25% & 25,50,25% & 25,50,25%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 3---b 25,50,25% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/4 x 1/4 x 1/4	 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/4 x 1/4 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + "<br />");//1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + "<br />");//1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2]);//1/4 x 1/4 x 1/4	 
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 //next output 50% & 50% & 25,50,25%% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 3----a 50%,50% and 50%,50% and 25,50,25%%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2]);//1/2 x 1/2 x 1/4		
	  }//next output 50% & 25,50,25% & 25,50,25%%  
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0]){  //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 3----b 50%,50% and 25,50,25% and 25,50,25%%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + "<br />");//1/2 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + "<br />");//1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2]);//1/2 x 1/4 x 1/4 		 
 	  } //end ALL if PRF = probF 
	 } //end for t PRF3 loop     
  } //end for s PRF2 loop 
 } //end for i PRF1 loop 	
///////////////////////////////////////////////END 25,50,25% 3rd locus////////////////////////////////////
/*-------------- END THREE locus- Calculate percentage probabilities, then output results ------------- */ 


      ////////////////////////////////////// FOUR LOCI SELECTED ///////////////////////////////////
/*-------------- For FOUR or more locus- Calculate percentage probabilities, then output results ------------- */
}else if (countLoci == 4){ // if count loci = 3 only 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 100% & 100% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 100% and 100%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 100%
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/1 x 1/1 x 1/1 x 1/1
		} //next output 50% & 100% & 100% & 100% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){
		// win.alert("countLoci equals 4-b 50%,50% and 100% and 100% and 100%"); 
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/1
		 win.document.write(probP + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/2 x 1/1 x 1/1  x 1/1
	   } //next output 25,50,25% & 100% & 100% & 100%  
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 100% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 
		 win.document.write(probPa + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + PRF[i][1] + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + PRF[i][2] + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0]);//1/4 x 1/1 x 1/1 x 1/1
	 	} //end  if PRF = probF  
	 } //end for f PRF4 loop 	  
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop    
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 100% & 100%  
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4--a 100% and 50%,50% and 100% and 100%"); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/1
	   win.document.write(probP + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/1 x 1/2 x 1/1 x 1/1
	  }//next output 100% & 25,50,25% & 100% & 100% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 100% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][2]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/1 x 1/1
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/1 x 1/1
		 win.document.write(probPa + "% (1/" + PRF[s][0] + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + PRF[s][1] + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + PRF[s][2] + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/1 x 1/4 x 1/1 x 1/1
	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	    
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 100% & 100%  
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 100% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/1
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/4 x 1/2 x 1/1 x 1/1
	  }//next output 25,50,25% & 25,50,25% & 100% & 100% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 100% and 100%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/1 x 1/1
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/1 x 1/1
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/1
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/1
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/1 x 1/1
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/1 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1	 x 1/1	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1  x 1/1	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1  x 1/1	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/1
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1	 x 1/1
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/4 x 1/4 x 1/1 x 1/1
 	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 100% & 100%
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 100% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/1
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/1	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/1	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/2 x 1/2 x 1/1 x 1/1 	
	  }//next output 50% & 25,50,25% & 100% & 100%
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[0][0]){  //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 100% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1 x 1/1
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/1
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/1
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/1
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/1
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0]);//1/2 x 1/4 x 1/1	 x 1/1 		 
 	  } //end ALL if PRF = probF 
   } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
 									 					
////////////////////up to 50% three loci -------------- with copying -100% 4th loci//////////////////////////////

          /////FROM HERE!!! --just need to clean up comments (eg, add x 1/1), not script
					
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 50% and 100%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 50%,50% and 100%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/1 x 1/1 x 1/2
		} //next output 50% & 100% & 50%  and 100%
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){
		 //win.alert("countLoci equals 4-b 50%,50% and 100% and 50%,50% and 100%"); 
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/1
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/2 x 1/1 x 1/2 
	   } //next output 25,50,25% & 100% & 50% and 100%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 50%,50% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/1 x 1/2 x 1/1
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0]);//1/4 x 1/1 x 1/2
	 	} //end  if PRF = probF 
	 } //end for f PRF4 loop   
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop        	
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 50% and 100% 
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4--a 100% and 50%,50% and 50%,50% and 100%"); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1];  // calculate probability fraction
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/1 x 1/2 x 1/2
 	 }//next output 100% & 25,50,25% & 50% and 100%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 50%,50% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  // calculate probability fraction 1/1 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0];  // calculate probability fraction 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/1 x 1/4 x 1/2
 	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 50% and 100% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50%and 50%,50% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/4 x 1/2 x 1/2
	  }//next output 25,50,25% & 25,50,25% & 50% and 100%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 50%,50% and 100%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/2
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/4 x 1/4 x 1/2
 	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop	
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 			 		 	 						 		 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 50% and 100%
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){ 
		// win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 50%,50% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/2 x 1/2 x 1/2 
	  }//next output 50% & 25,50,25% & 50% and 100%
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[0][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 50%,50% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/4 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0]);//1/2 x 1/4 x 1/2		 
 	  } //end ALL if PRF = probF
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
///////////////////////////////////////////////END OF 50%,50% 3rd locus ,100% 4th locus///////////////////////////////////	
																									 		
///////////////////////////////////////////////START 25,50,25% 3rd locus ,100% 4th locus////////////////////////////////////
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 25,50,25% and 100%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/1 x 1/1 x 1/4
		} //next output 50% & 100% & 25,50,25% and 100% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){
		// win.alert("countLoci equals 4-b 50%,50% and 100% and 25,50,25% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/1 x 1/4
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/2 x 1/1 x 1/4 
	   } //next output 25,50,25% & 100% & 25,50,25% and 100%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){ //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4-c 25,50,25% and 100% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/4 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/4 x 1/1 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][0]);//1/4 x 1/1 x 1/4
	 	} //end  if PRF = probF 
	 } //end for f PRF4 loop 
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop         
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 25,50,25%  and 100%
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){ 
		// win.alert("countLoci equals 4--a 100% and 50%,50% and 25,50,25% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/1 x 1/2 x 1/4	 
	  }//next output 100% & 25,50,25% & 25,50,25% and 100% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/1 x 1/4 x 1/4 x 1/1
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/1 x 1/4 x 1/2 x 1/1
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/1 x 1/2 x 1/2 x 1/1
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][0]);//1/1 x 1/4 x 1/4
	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 25,50,25% and 100%
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){ 
		// win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 25,50,25% and 100%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/2 x 1/4
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/2 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/4 x 1/2 x 1/4
	  }//next output 25,50,25% & 25,50,25% & 25,50,25% and 100%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0];  //calculate probability fraction 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4	 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/4 x 1/4 x 1/4	 
 	  } //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 25,50,25% and 100% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){ 
		 //win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 25,50,25% and 100%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage  1/2 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/2 x 1/2 x 1/4		
	  }//next output 50% & 25,50,25% & 25,50,25% and 100%  
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[0][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 25,50,25% and 100%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1];  //calculate probability fraction 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0];  //calculate probability fraction  1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0];  //calculate probability fraction 1/2 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0]);//1/2 x 1/4 x 1/4 		 
 	  } //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
///////////////////////////////////////////////END 25,50,25% 3rd locus, 100% 4th locus////////////////////////////////
																						
///////////////////////////////////////////////START 100% 3rd locus, 50%,50% 4th locus////////////////////////////////

 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 100% & 50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 100% and 50%,50%");
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 100%
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + PRF[i][0] + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/1 x 1/1 x 1/1 x 1/2
		} //next output 50%,50% & 100% & 100% & 50%,50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){
		 //win.alert("countLoci equals 4-b 50%,50% and 100% and 100% and 50%,50%"); 
		 var probP = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage // 1/2 x 1/1 x 1/1 x 1/2
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][0]  * PRF[f][1];  //calculate probability fraction 1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1  x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/2 x 1/1 x 1/1  x 1/2
	   } //next output 25,50,25% & 100% & 100% & 50%  
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 100% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction 1/4 x 1/1 x 1/1 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0]  * PRF[f][1];  //calculate probability fraction 1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1]);//1/4 x 1/1 x 1/1 x 1/2	 	
		} //end  if PRF = probF  
	 } //end for f PRF4 loop 	  
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop   
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 100% & 50%                               
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4--a 100% and 50%,50% and 100% and 50%,50%"); 
		 var probP = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
		 win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probP + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/1 x 1/2 x 1/1 x 1/2	  
		}//next output 100% & 25,50,25% & 100% & 50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 100% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/1 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/1 x 1/4 x 1/1 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/1 x 1/4 x 1/1 x 1/2
	  } //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 100% & 50% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 100% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/4 x 1/2 x 1/1 x 1/2
		}//next output 25,50,25% & 25,50,25% & 100% & 50% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){ //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 100% and 50%,50%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/1 x 1/2
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/1 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1	 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1  x 1/2	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1	 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/2
 	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1	 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1  x 1/2	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1	 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/4 x 1/4 x 1/1 x 1/2
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 100% & 50%     
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 100% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/2 x 1/2 x 1/1 x 1/2 	
	
		}//next output 50% & 25,50,25% & 100% & 50% 
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[1][0]){  //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 100% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/1 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/1 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1	 x 1/2 		 
 	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1]);//1/2 x 1/4 x 1/1	 x 1/2 	
		} //end ALL if PRF = probF 
   } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	

////////////////////up to 50% three loci -------------- with  -50% 4th loci//////////////////////////////				          
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 50% and 50%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){
		 //win.alert("countLoci equals 4-a 100% and 100% and 50%,50% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0])* (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][1];  //calculate probability fraction 1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/1 x 1/1 x 1/2 x 1/2
		} //next output 50% & 100% & 50%  and 50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){
		// win.alert("countLoci equals 4-b 50% and 100% and 50%,50% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2  x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2  x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2  x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/2 x 1/1 x 1/2  x 1/2 
		} //next output 25,50,25% & 100% & 50% and 50% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 50%,50% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2 x 1/2 
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction 1/4 x 1/1 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
	 	 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][1]);//1/4 x 1/1 x 1/2 x 1/2 
		} //end  if PRF = probF 
	 } //end for f PRF4 loop   
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop        
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 50% and 50%  
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){ 
		// win.alert("countLoci equals 4--a 100% and 50%,50% and 50%,50% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1]  * PRF[f][0];  // calculate probability fraction //1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
 	 	 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/1 x 1/2 x 1/2 x 1/2
	 }//next output 100% & 25,50,25% & 50% and 50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){  //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4--b 100% and 25,50,25% and 50%,50% and 50%,50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  // calculate probability fraction 1/1 x 1/4 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0]  * PRF[f][0];  // calculate probability fraction 1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
 	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/1 x 1/4 x 1/2 x 1/2
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 50% and 50% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 50%,50% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0]  * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/4 x 1/2 x 1/2 x 1/2
		}//next output 25,50,25% & 25,50,25% & 50% and 50% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 50%,50% and 50%,50%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/2 x 1/2
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/2 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
 	 	 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/4 x 1/4 x 1/2 x 1/2
	 } //end ALL if PRF = probF 
	 } //end for f PRF4 loop	
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 			 		 	 						 		 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 50% and 50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){ 
		// win.alert("countLoci equals 4----a 50% and 50% and 50% and 50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/2 x 1/2 x 1/2 x 1/2 
	  }//next output 50%,50% & 25,50,25% & 50%,50% and 50%,50%
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[1][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50% and 25,50,25% and 50% and 50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/4 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/4 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		 
 	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1]);//1/2 x 1/4 x 1/2 x 1/2		
		} //end ALL if PRF = probF
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
///////////////////////////////////////////////END OF 50% 3rd locus ,50% 4th locus///////////////////////////////////	
        		
///////////////////////////////////////////////START 25,50,25% 3rd locus ,50% 4th locus////////////////////////////////////
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 25,50,25% and 50%,50%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 25,50,25% and 50%");	
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/1 x 1/1 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/1 x 1/1 x 1/4 x 1/2
		} //next output 50%,50% & 100% & 25,50,25% and 50%,50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){
		// win.alert("countLoci equals 4-b 50% and 100% and 25,50,25% and 50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/1 x 1/4 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/2 x 1/1 x 1/4 x 1/2 
		 } //next output 25,50,25% & 100% & 25,50,25% and 50%	
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 25,50,25% and 50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/4 x 1/1 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/4 x 1/1 x 1/2 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	 	 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][1]);//1/4 x 1/1 x 1/4 x 1/2
		} //end  if PRF = probF 
	 } //end for f PRF4 loop 
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop         
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50%,50% & 25,50,25%  and 50%,50% 
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4--a 100% and 50% and 25,50,25% and 50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/1 x 1/2 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2	 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/1 x 1/2 x 1/4 x 1/2	
		}//next output 100% & 25,50,25% & 25,50,25% and 50%,50% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){  //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4--b 100% and 25,50,25% and 25,50,25% and 50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/1 x 1/4 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/4 x 1/2 x 1/2
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][1]);//1/1 x 1/4 x 1/4 x 1/2
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50%,50% & 25,50,25% and 50%,50%
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 25,50,25% and 50%,50%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/2 x 1/4 x 1/2
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/2 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/4 x 1/2 x 1/4 x 1/2
		}//next output 25,50,25% & 25,50,25% & 25,50,25% and 50%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 25,50,25% and 50%,50%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4 x 1/2
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/4 x 1/2
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/4 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/4 x 1/2
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/4 x 1/2
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2	 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2	 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/4 x 1/4 x 1/4 x 1/2	  	 
	  } //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 25,50,25% and 50% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){ 
		 //win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 25,50,25% and 50%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/2 x 1/4 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/2 x 1/4 x 1/2
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/2 x 1/2 x 1/4 x 1/2		
		}//next output 50%,50% & 25,50,25% & 25,50,25% and 50%  
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[1][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 25,50,25% and 50%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4 x 1/2
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/2 x 1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 		  	  
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1]);//1/2 x 1/4 x 1/4 x 1/2 	
		} //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	

/////////////////////////////////////// - next 100% 3rd locus, 25,50,25% 4th  locus	////////////////////////////////////////
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 100% & 25,50,25%  
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 25%
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 50%
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction //1/1 x 1/1 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/1 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/1 x 1/1 x 1/1 x 1/4
		} //next output 50%,50% & 100% & 100% & 25,50,25%  
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){
		// win.alert("countLoci equals 4-b 50%,50% and 100% and 100% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 12.5%
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 25%
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction //1/2 x 1/1 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1  x 1/4 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/1  x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/1 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/2 x 1/1 x 1/1  x 1/4
		 } //next output 25,50,25% & 100% & 100% & 25,50,25%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){ //later - extend to 4/4/4/4
		 //win.alert("countLoci equals 4-c 25,50,25% and 100% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/4 x 1/1 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/4 x 1/1 x 1/1 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][2]);//1/4 x 1/1 x 1/1 x 1/4
		} //end  if PRF = probF  
	 } //end for f PRF4 loop 	  
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop   
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50%,50% & 100% & 25,50,25%    
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4--a 100% and 50%,50% and 100% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction //1/1 x 1/2 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/1 x 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/1 x 1/2		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/1 x 1/2 x 1/1 x 1/4
		}//next output 100% & 25,50,25% & 100% & 25,50,25% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){  //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4--b 100% and 25,50,25% and 100% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][2]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/1 x 1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/1 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][2] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/1 x 1/4 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/1 x 1/4
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction 1/1 x 1/2 x 1/1 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/1 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/1 x 1/2		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/1 x 1/4 x 1/1 x 1/4
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50%,50% & 100% & 25,50,25%  
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 100% and 25,50,25%"); 		 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/2 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/4 x 1/2 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/4 x 1/2 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/4 x 1/2 x 1/1 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/1 x 1/2	 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2	 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/4 x 1/2 x 1/1 x 1/4
		}//next output 25,50,25% & 25,50,25% & 100% & 25,50,25% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/1 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/1 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/1 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/1 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/1 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/1 x 1/4	  
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/1 x 1/2	 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/1 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/1 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/1 x 1/4	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/1 x 1/4	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/1 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/1 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/4 x 1/4 x 1/1 x 1/4
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50%,50% & 50%,50% & 100% & 25,50,25%     
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 100% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/2 x 1/2 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][0];  // calculate probability fraction 1/2 x 1/2 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0]  * PRF[f][1];  // calculate probability fraction 1/2 x 1/2 x 1/1 x 1/2
 		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/4	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1  x 1/4	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4 	  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1  x 1/2	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2 			 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1  x 1/4	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1  x 1/4	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/2 x 1/2 x 1/1 x 1/4 	
		}//next output 50%,50% & 25,50,25% & 100% & 25,50,25%  
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[0][0] && PRF[f][0] == probF[2][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 100% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/4 x 1/1 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/4 x 1/1 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/1 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/2 x 1/4 x 1/1 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/4 x 1/1 x 1/2
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/1 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/1 x 1/4 		 	  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/1 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/1 x 1/2 		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/1 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/1 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2]);//1/2 x 1/4 x 1/1 x 1/4 	
		} //end ALL if PRF = probF 
   } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	

////////////////////up to 50% three loci -------------- with copying -25,50,25% 4th loci//////////////////////////////

					   		
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 50%,50% and 25,50,25%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){
		 //win.alert("countLoci equals 4-a 100% and 100% and 50%,50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage//1/1 x 1/1 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage//1/1 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction//1/1 x 1/1 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/1 x 1/1 x 1/2 x 1/4
		} //next output 50%,50% & 100% & 50%,50%  and 25,50,25%	
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){
		 //win.alert("countLoci equals 4-b 50%,50% and 100% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction //1/2 x 1/1 x 1/2 x 1/4
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/2 x 1/1 x 1/2 x 1/4
		} //next output 25,50,25% & 100% & 50% and 25,50,25% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){ //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4-c 25,50,25% and 100% and 50%,50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/4 x 1/1 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/4 x 1/1 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/4 x 1/1 x 1/2 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	 	 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2		 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][2]);//1/4 x 1/1 x 1/2 x 1/4
	 	} //end  if PRF = probF 
	 } //end for f PRF4 loop   
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop        
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 50% and 25,50,25% 
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4--a 100% and 50%,50% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage//1/1 x 1/2 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage//1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1]* PRF[f][0];  // calculate probability fraction//1/1 x 1/2 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1]* PRF[f][1];  // calculate probability fraction//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
 	 	 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	 	 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/1 x 1/2 x 1/2 x 1/4
	 }//next output 100% & 25,50,25% & 50% and 25,50,25% 
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 50%,50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/4 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/1 x 1/4 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/1 x 1/4 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/1 x 1/4 x 1/2 x 1/2
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/1 x 1/2 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
 	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/1 x 1/4 x 1/2 x 1/4
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop
	} //end for t PRF3 loop     
 } //end for s PRF2 loop
} //end for i PRF1 loop 
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 50% and 25,50,25% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/4 x 1/2 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/4 x 1/2 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/4 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/4 x 1/2 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/4 x 1/2 x 1/2 x 1/2
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/4 x 1/2 x 1/2 x 1/4
		}//next output 25,50,25% & 25,50,25% & 50% and 25,50,25%
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 50%,50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/2 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/2 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/2 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/4 x 1/4 x 1/2 x 1/4
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop	
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 			 		 	 						 		 	  
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 50% and 25,50,25%  
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 50%,50% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/4
 		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/2 x 1/2 x 1/2 x 1/4 
		}//next output 50% & 25,50,25% & 50% and 25,50,25% 
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[1][0] && PRF[f][0] == probF[2][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 50% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/4 x 1/2 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/4 x 1/2 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/2 x 1/4 x 1/2 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/4 x 1/2 x 1/2
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		 
 	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	 	
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2]);//1/2 x 1/4 x 1/2 x 1/4	
		} //end ALL if PRF = probF
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
///////////////////////////////////////////////END OF 50% 3rd locus ,25,50,25% 4th locus///////////////////////////////////	
         																
///////////////////////////////////////////////START 25,50,25% 3rd locus ,25,50,25 4th locus////////////////////////////////////
 for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
	for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo]
	 for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	  for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	  //next output 100% & 100% & 25,50,25% and 25,50,25%
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){
		// win.alert("countLoci equals 4-a 100% and 100% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage  1/1 x 1/1 x 1/4 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/1 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/1 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  1/1 x 1/1 x 1/4 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/1 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/1 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/1 x 1/4 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/1 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/1 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/1 x 1/1 x 1/4 x 1/4
		} //next output 50% & 100% & 25,50,25% and 25,50,25% 	
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){
		// win.alert("countLoci equals 4-b 50%,50% and 100% and 25,50,25% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/4 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/1 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/2 x 1/1 x 1/4 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction //1/2 x 1/1 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4  
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2  
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2 
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/4 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/4 x 1/4  
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4 
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4  
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/4 x 1/4 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/2 x 1/1 x 1/4 x 1/4 
		 } //next output 25,50,25% & 100% & 25,50,25% and 25,50,25% 
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[0][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){ //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4-c 25,50,25% and 100% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/1 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/1 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/1 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/1 x 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/1 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/1 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/1 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
	 	 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/1 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/1 x 1/4 x 1/2
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/1 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/1 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0]+ ", " + PRN[t][2] + ", " + PRN[f][2]);//1/4 x 1/1 x 1/4 x 1/4
	 	} //end  if PRF = probF 
	 } //end for f PRF4 loop 
  } //end for t PRF3 loop  
 } //end for s PRF2 loop 	
} //end for i PRF1 loop         
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 100% & 50% & 25,50,25%  and 25,50,25% 
  	if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4--a 100% and 50%,50% and 25,50,25% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/4 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/1 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/1 x 1/2 x 1/4 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/1 x 1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction //1/1 x 1/2 x 1/2 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4	 
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2	 
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + ", " + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/1 x 1/2 x 1/4 x 1/4	 
		}//next output 100% & 25,50,25% & 25,50,25% and 25,50,25%  
		if (PRF[i][0] == probF[0][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){  //later -when extend to 4/4/4/4
		 //win.alert("countLoci equals 4--b 100% and 25,50,25% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/1 x 1/4 x 1/4 x 1/4
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/1 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/1 x 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/1 x 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/2 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/1 x 1/4 x 1/4 x 1/2
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/2 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/1 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/1 x 1/2 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2]+ ", " + PRN[t][2] + ", " + PRN[f][2]);//1/1 x 1/4 x 1/4 x 1/4
		} //end ALL if PRF = probF 
	 } //end for f PRF4 loop 
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
	for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 25,50,25% & 50% & 25,50,25% and 25,50,25% 
  	if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){ 
		// win.alert("countLoci equals 4---a 25,50,25% and 50%,50% and 25,50,25% and 25,50,25%"); 
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/2 x 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][0] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/2 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/4 x 1/2 x 1/4 x 1/4
		}//next output 25,50,25% & 25,50,25% & 25,50,25% and 25,50,25%  
		if (PRF[i][0] == probF[2][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){ // && PRF[s][0] == probF[2][0] //later -when extend to 4/4/4/4
		// win.alert("countLoci equals 4---b 25,50,25% and 25,50,25% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][1]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][1]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4 x 1/4
		 var probPe = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/4 x 1/4 x 1/4 x 1/4
		 var probFa = PRF[i][1] * PRF[s][1] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][1] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][1] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][1] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/4 x 1/4
		 var probFe = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/4 x 1/4 x 1/4 x 1/4
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4		
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4	   
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4	
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4	 		 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 		   
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/2 x 1/4   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/2 x 1/4	 	 
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4		
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 		   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/2 x 1/4 x 1/4	   
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4	
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	   
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2	 	 
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2 	   
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/2 x 1/2	   
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/2 x 1/2	 		 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2 	   
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/2 x 1/4 x 1/2	   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/4 x 1/4 x 1/4 x 1/2	 	 	  
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4		
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4	   
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4	
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4	 		 
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4 		   
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/2 x 1/4   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/2 x 1/4	 	 
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4		
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4 		   
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4 	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][2] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/2 x 1/4 x 1/4	   
		 win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/4 x 1/4 x 1/4 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4	
	   win.document.write(probPe + "% (1/" + probFe + ") " + PRN[i][2] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/4 x 1/4 x 1/4 x 1/4
		} //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	 
for (var i = 0;i < lociNb;i++){ //loop for determining mutation selected PRN[0=E,1=Bl,2=Lav,3=C,4=Mo]
 for (var s = i+1;s <lociNb;s++){ //loop for determining loci selected s[1=Bl,2=Lav,3=C,4=Mo] 
  for (var t = s+1;t <lociNb;t++){  //loop for determining loci selected s[2=Lav,3=C,4=Mo]
	 for (var f = t+1;f <lociNb;f++){  //loop for determining loci selected s[3=C,4=Mo]
	 //next output 50% & 50% & 25,50,25% and 25,50,25% 
  	if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[1][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){ 
		 //win.alert("countLoci equals 4----a 50%,50% and 50%,50% and 25,50,25% and 25,50,25%test"); 
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/4 x 1/4
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/4 x 1/2
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage //1/2 x 1/2 x 1/2 x 1/2
		 var probFa = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction  //1/2 x 1/2 x 1/4 x 1/4
		 var probFb = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/4 x 1/2
		 var probFc = PRF[i][0] * PRF[s][0] * PRF[t][1] * PRF[f][1];  //calculate probability fraction //1/2 x 1/2 x 1/2 x 1/2
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	 	
		 win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	 	
		 win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/2 x 1/2 x 1/4 x 1/4	
		}//next output 50% & 25,50,25% & 25,50,25% and 25,50,25%  
		if (PRF[i][0] == probF[1][0] && PRF[s][0] == probF[2][0] && PRF[t][0] == probF[2][0] && PRF[f][0] == probF[2][0]){  //later - extend to 4/4/4/4
		// win.alert("countLoci equals 4----b 50%,50% and 25,50,25% and 25,50,25% and 25,50,25%");
		 var probPa = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][1])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/2
		 var probPb = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][1]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/2 x 1/4
		 var probPc = ((1 / PRF[i][0]) * (1 / PRF[s][1]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/2 x 1/4 x 1/4
		 var probPd = ((1 / PRF[i][0]) * (1 / PRF[s][0]) * (1 / PRF[t][0]) * (1 / PRF[f][0])) * 100;  //calculate probability percentage 1/2 x 1/4 x 1/4 x 1/4
		 var probFa = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][1];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/2
		 var probFb = PRF[i][0] * PRF[s][1] * PRF[t][1] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/2 x 1/4
		 var probFc = PRF[i][0] * PRF[s][1] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/2 x 1/4 x 1/4
		 var probFd = PRF[i][0] * PRF[s][0] * PRF[t][0] * PRF[f][0];  //calculate probability fraction 1/2 x 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][0] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 		  	  
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
		 win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2		
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2 	
	   win.document.write(probPa + "% (1/" + probFa + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/2 x 1/2 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/2 x 1/2
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/2 x 1/4 x 1/2	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][1] + "<br />");//1/2 x 1/4 x 1/4 x 1/2 	
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][0] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][0] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
		 win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4		
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][0] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4 	
	   win.document.write(probPb + "% (1/" + probFb + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/2 x 1/4 	
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][1] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/2 x 1/4
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][0] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/4 x 1/4 x 1/4
	   win.document.write(probPc + "% (1/" + probFc + ") " + PRN[i][1] + PRN[s][1] + ", " + PRN[t][2] + ", " + PRN[f][2] + "<br />");//1/2 x 1/2 x 1/4 x 1/4	
	   win.document.write(probPd + "% (1/" + probFd + ") " + PRN[i][1] + PRN[s][2] + ", " + PRN[t][2] + ", " + PRN[f][2]);//1/2 x 1/4 x 1/4 x 1/4 
		} //end ALL if PRF = probF
	 } //end for f PRF4 loop  
	} //end for t PRF3 loop     
 } //end for s PRF2 loop 
} //end for i PRF1 loop 	
  								 						 	 				
			   				
      ////////////////////////////////////// FIVE LOCI SELECTED ///////////////////////////////////
/*-------------- For FIVE locus- or more - output warning to select 4 or less ------------- */
//the following  5 countLoci
/////////////////////////////////////////////////100% 5th locus//////////////////////////////////////////
}else if (countLoci > 4){ // if count loci is greater than 4
win.alert("Please select mutations from 4 loci only");

} //end ALL if countLoci = (1, 2, 3, 4 or greater) 
 /*----------------END ALL locus- Calculate percentage probabilities, then output results -------------- */
//output countLoci number	
win.document.write("<br/>Number of loci selected is: " + countLoci); 	 
//new document.write additions will wipe previous document.write, starting again after "close"
win.document.write("<br />" + "<br />" + "<a href='javascript:self.close();'>Close</a>");
//reset loci count to zero
countLoci = 0;
} //end function submit
/* ---------------------------------- END function "calculate" submit button -------------------------------- */
/* -------------RESET individual radio buttons & variables - when double-click------------------ */
function hist(oRad){
var oRadM = oRad;
var oRadF = oRad;
oRad.checked = false;//reset all radio buttons to false (ie unchecked) 
for (var i = 0;i < lociNb;i++){
 if (oRadM.name == mLocus[i]){
    mG[i] = GN[i][2];
	  if (fG[i] == GN[i][2]){
	   locSel[i] = false;	
	   if (countLoci !=0){
		  countLoci--;	
		 }// if countLoci is not 0
	 }//end fG if
 } //end mG if 
}  // end oRadM for loop 
for (var i = 0;i < lociNb;i++){
 if (oRadF.name == fLocus[i]){ 
	fG[i] = GN[i][2];
	 if (mG[i] == GN[i][2]){
	  locSel[i] = false;		 
	  if (countLoci !=0){
		 countLoci--;	
		}// if countLoci is not 0
	 }//end mG if  	 
  }//end fG if
 } //end oRadF for loop 
} //end hist function
/* -------------END RESET individual radio buttons & variables - when double-click------------------ */
/* ---------------RESET all variables & radio buttons - when click RESET button --------------- */ 
function resetPage(){
//reset radio buttons to unchecked
document.getElementById("frmRad").reset(); //resets form content -ie radio buttons
//reset count of loci to zero
countLoci = 0;
//reset all locus selected to false
for (var i = 0;i < lociNb;i++){
locSel[i] = false; //E,Bl,lav,c,mo
}
//reset male and female gametes to wild type 
for (var i = 0;i < lociNb;i++){
mG[i] = GN[i][2]; //e+/e+,bl+/bl+,Lav+/Lav+,C+/C+,Mo+/Mo+
}
for (var i = 0;i < lociNb;i++){
fG[i] = GN[i][2]; //e+/e+,bl+/bl+,Lav+/Lav+,C+/C+,Mo+/Mo+
}
// all loci probabilities nomenclature, reset nomenclature to zero 
PRN = [[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]; // [0 =E, 1=Bl, 2=Lav, 3=C, 4=Mo][0 = nomenclature 1, etc]
// all loci probabilities results fractions, reset to fractions to zero
PRF = [[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]; // [0 =E, 1=Bl, 2=Lav, 3=C, 4=Mo][0 = fraction 1, etc]
} //end reset function
/* ------------END RESET all variables & radio buttons - when click RESET button --------------- */
// -->

