error_count = 0; 
self.onerror = report_error; 
urlName = "nothing"; 
bIsIE = false; 
function Populate() {
   if (parseInt(navigator.appVersion[0]) < 4) {
      //alert(notice);
      //location.href="../female/FemaleListLastName.htm";
      //return false;
      goodversion = false; 
      }
   if (String(navigator.appName).indexOf("Microsoft", 0) >= 0) {
      bIsIE = true; 
      }
   setTimeout("update()", 300); 
   return true; 
   }
function update() {
   x = self.document.searchform; 
   x.models.options.length = 0; 
   var hairtype = new Array(); 
   var eyecolor = new Array(); 
   var ent = new Array(); 
   hlow = x.heightlow.options[x.heightlow.selectedIndex].value; 
   hhi = x.heighthi.options[x.heighthi.selectedIndex].value; 
   if (hlow > hhi) {
      x.heighthi.selectedIndex = x.heightlow.selectedIndex; 
      hlow = hhi; 
      }
   agelow = x.agelow.options[x.agelow.selectedIndex].value; 
   agehi = x.agehi.options[x.agehi.selectedIndex].value; 
   if (!checkpic(agelow, agehi, x.agelow, x.agehi)) {
      agelow = agehi; 
      }
   for (i = 0; i < x.elements.length; i++) {
      if (x.elements[i].type == "checkbox") {
         if (x.elements[i].checked) {
            if(x.elements[i].name == "hair") {
               hairtype[hairtype.length] = new String(x.elements[i].value); 
               }
            else if(x.elements[i].name == "eyes") {
               eyecolor[eyecolor.length] = new String(x.elements[i].value); 
               }
            else if(x.elements[i].name == "ethnicity") {
               ent[ent.length] = new String(x.elements[i].value); 
               }
            }
         }
      }
   idx = 0; 
   union_check = false; 
   union = false; 
   for (i = 0; i < Fem.length; i++) {
      if (!Fem[i][5] &!Fem[i][6])union = false; 
      else union = true; 
      if (x.nonunion.checked && (!union)) {
         union_check = true; 
         }
      else if (union) {
         if (Fem[i][5] && x.sag.checked)union_check = true; 
         else if (Fem[i][6] && x.aftra.checked)union_check = true; 
         else union_check = false; 
         }
      else {
         union_check = false; 
         }
      if (isMatch(hairtype, Fem[i][3]) && isMatch(eyecolor, Fem[i][4]) && // height
      Fem[i][2] >= hlow && Fem[i][2] <= hhi && // union
      union_check && //age
      (Fem[i][8] >= agelow) && (Fem[i][8] <= agehi) && //etnicity
      isMatch(ent, Fem[i][9]) && ((x.Bilingual.checked == true && (Fem[i][10] == 1)) || x.Bilingual.checked == false)) {
         x.models.options[idx] = new Option(Fem[i][1] + ', ' + Fem[i][0], i); 
         idx++; 
         }
      //else
      //alert(idx);
      }
   if (idx > 0) {
      if (GetCookie("FemaleActorSearchID") != null) x.models.options[GetCookie("FemaleActorSearchID")].selected = true; 
      else x.models.options[0].selected = true; 
      go(x.models)}
   else {
      x.models.options[0] = new Option("No matches found"); 
      x.models.options[1] = new Option("Please modify Search"); 
      if (bIsIE) {
         self.document.images[0].alt = "Click to reset search"; 
         self.document.images[0].title = "Click to reset search"; 
         }
      self.document.links[0].href = ""; 
      with (document) {
         if (self.document.images.length) {
            self.document.images[self.document.images.length - 1].src = "../images/notfound.jpg"; 
            }
         else {
            self.document.images.src = "../images/notfound.jpg"; 
            }
         }
      }
   x.nummat.value = idx + " Matches Found"; 
   if (bIsIE)x.style.cursor = "default"; 
   return true; 
   }
function go() {
   if (idx == 0) {
      return false; 
      }
   var n = self.document.searchform.models.selectedIndex; 
   document.cookie = "MaleActorSearchID=" + n; 
   var urlName = ""; 
   var urlLink = ""; 
   var lastName = ""; 
   var firstName = ""; 
   urlName = "../actors/female/images/"; 
   urlLink = "../actors/female/"; 
   offset = parseInt(self.document.searchform.models.options[n].value); 
   firstName = Fem[offset][0]; 
   lastName = Fem[offset][1]; 
   union_str = "Non"; 
   if (Fem[offset][5]) //sag
   {
      union_str = "SAG"; 
      if (Fem[offset][6]) {
         union_str += "/AFTRA"; 
         if (Fem[offset][7])union_str += "/AEA"; 
         }
      else if (Fem[offset][7]) {
         union_str += "/AEA"; 
         }
      }
   else if (Fem[offset][6]) // aftra
   {
      union_str = "AFTRA"; 
      if (Fem[offset][7])union_str += "/AEA"; 
      }
   else if (Fem[offset][7])union_str = "AEA"; 
   var hvr = new String(); 
   hvr = "Name: " + Fem[offset][0] + " " + lastName + "\nHair: " + Fem[offset][3] + "\nEyes: " + Fem[offset][4] + "\nHeight: " + getHeight(Fem[offset][2]) + "\nUnion: " + union_str + "\nEthnicity: " + Fem[offset][9]; 
   if (firstName.indexOf(" ") > 0) {
      firstNameTHB = firstName.substring(0, firstName.indexOf(" ")) + "_" + firstName.substring(firstName.indexOf(" ") + 1, firstName.length); 
      firstNameLNK = firstName.substring(0, firstName.indexOf(" ")) + "%20" + firstName.substring(firstName.indexOf(" ") + 1, firstName.length); 
      }
   else {
      firstNameTHB = firstName; 
      firstNameLNK = firstName; 
      }
   if (lastName.indexOf(" ") > 0) {
      lastNameTHB = lastName.substring(0, lastName.indexOf(" ")) + "_" + lastName.substring(lastName.indexOf(" ") + 1, lastName.length); 
      lastNameLNK = lastName.substring(0, lastName.indexOf(" ")) + "%20" + lastName.substring(lastName.indexOf(" ") + 1, lastName.length); 
      }
   else {
      lastNameTHB = lastName; 
      lastNameLNK = lastName; 
      }
lastNameTHB = lastName; 
   lastNameLNK = lastName; 
   if (lastName.indexOf(" ") > 0) {
      lastNameTHB = lastName.substring(0, lastName.indexOf(" ")) + "_" + lastName.substring(lastName.indexOf(" ") + 1, lastName.length); 
      lastNameLNK = lastName.substring(0, lastName.indexOf(" ")) + "%20" + lastName.substring(lastName.indexOf(" ") + 1, lastName.length); 
      }
   if (firstNameTHB.indexOf("*") >= 0) firstNameTHB = ""; 
   urlLink += "femaleactor.asp?FirstName=" + firstNameLNK + "&LastName=" + lastNameLNK; 
   urlName += firstNameTHB + lastNameTHB + "_THB.jpg"; 
   ImageTemp = document.getElementById("TalentImage"); 
   ImageLinkTemp = document.getElementById("ImageLink"); 
   if(ImageTemp != null) {
      ImageLinkTemp.href = urlLink; 
      ImageTemp.alt = "Name: " + Fem[offset][0] + " " + lastName; 
      ImageTemp.title = hvr; 
      ImageTemp.src = urlName; 
      }
   return true; 
   }

