Ancestors of Costa, Carlota div#infoField {position: fixed; height: auto; top: 3%; right: 0; bottom: 5%; left: 60%; overflow: auto;} form#searchForm {position: fixed;} input.valid {background: rgb(191,255,191);} input.invalid {background: rgb(255,191,191);} pre#copyright {position: fixed; bottom: 0;} line {stroke-width: 5px;} rect {fill: black;} path {stroke: white; stroke-width: 1;} .male {fill: rgb(0,0,102);} .female {fill: rgb(102,0,0);} rect.activated {stroke: black; fill: rgb(255,255,0) ! important;} rect.searched {stroke: black; fill: rgb(255,0,0);} path.activated {stroke: black; fill: rgb(255,255,0) ! important;} path.searched {stroke: black; fill: rgb(255,0,0);} h3 {clear: left;} dt {clear: right;} li {clear: right;} div.imgTable {position: relative; float: right; max-width: 70%;} object:before {content: attr(imgref); color: black; font-size: smaller;} object { width: 100%; max-height: 5em; margin: 1px; border-style: none;} object.portret {float: left; max-width: 25%; max-height: 10em;} img:before {content: attr(imgref); color: black; font-size: smaller;} img { width: 100%; max-height: 5em; margin: 1px; border-style: none;} img.portret {float: left; max-width: 25%; max-height: 10em;} line.VeryLow {stroke: #000000;} span.VeryLow {color: #000000;} line.Low {stroke: #000000;} span.Low {color: #000000;} line.Normal {stroke: #000000;} span.Normal {color: #000000;} line.High {stroke: #000000;} span.High {color: #000000;} line.VeryHigh {stroke: #000000;} span.VeryHigh {color: #000000;} line {stroke:#000000;} span.witnesses {font-size: smaller;} span.bron {font-size: smaller;} 1) { img.setAttribute('class',arguments[1]); } a.setAttribute('href',photo.img_path); if (photo.img_ref != undefined) { img.setAttribute('imgref',photo.img_ref); } a.appendChild(img); return a } function img_sources2html(person,containerDIV) { if (person.img_sources != undefined) { var sourcesOL = document.createElement('ol'); for (var i=0; i < person.img_sources.length; i++) { var sourceLI = document.createElement('li'); sourceLI.appendChild(document.createTextNode(person.img_sources[i])); sourcesOL.appendChild(sourceLI); } var subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Image Sources:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(sourcesOL); } return; } function replaceSubstring(mainStr,subsStr,replText) { //mainStr is a multiline string //subStr is the substring that must be replaced. // replText is a string or an array of strings. var delete_start; if ((replText) && ((delete_start = mainStr.indexOf(subsStr)) >=0)) { if (typeof(replText) != 'string') { replText = replText.join(", "); } var newline_index = mainStr.substr(0,delete_start).lastIndexOf('\n'); return mainStr.substr(0,newline_index+1) + subsStr + mainStr.substring(newline_index+1,delete_start) + replText + mainStr.substring(delete_start+subsStr.length,mainStr.length) } else { //remove whole line var re = new RegExp("^.*?" + subsStr + ".*?(?:\n|$)","m") return mainStr.replace(re,"") } } function event_str2html(event_str,containerEL) { var empty_line = false; event_pieces = event_str.split(/\n/); for (j=0; j'); if (event_pieces[j] == '') { empty_line = true; continue; } if (empty_line) { containerEL.appendChild(document.createElement('br')); empty_line = false; } if (event_pieces[j].charAt(0) == '<' && end_class_index != -1) { var cls = event_pieces[j].substr(1,end_class_index-1); var span = document.createElement('span'); span.setAttribute('class',cls); span.appendChild(document.createTextNode(event_pieces[j].substr(end_class_index+1) + ' ')); containerEL.appendChild(span); } else { containerEL.appendChild(document.createTextNode(event_pieces[j] + ' ')); } } return } function witness_array2string_array(witnesses) { // The input of replaceSubstring() needs to be an array of string. // This function converts the array of witness objects to an // array of strings. if (witnesses == undefined) { return witnesses; } var ret_ar = []; for (var i=0; i r_min) { h.setAttribute('r',0.85*r); window.setTimeout(self.halo,100,cx,cy,0.85*r,r_min); } else { h.setAttribute('stroke','none') h.setAttribute('r',1); h.setAttribute('cx',1); h.setAttribute('cy',1); } } function cleanUp() { if (infoWindow != undefined && ! infoWindow.closed) { infoWindow.close(); } } function getInfoField(person) { return document.getElementById('infoField'); } function birth2html(person,containerDL) { if (person.birth != undefined) { var eventDT = document.createElement('dt'); eventDT.appendChild(document.createTextNode(person.birth.event_type + ":")); containerDL.appendChild(eventDT); var eventDD = document.createElement('dd'); if (person.birth.event_imgs != undefined) { var imgDIV = document.createElement('div'); imgDIV.setAttribute('class','imgTable'); var imgTABLE = document.createElement('table'); var imgTR = document.createElement('tr'); for (var j=0; j", person.birth.birth_date); event_str = replaceSubstring(event_str,"", person.birth.birth_place); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"", witness_array2string_array(person.birth.event_witnesses)); if ('event_source' in person.birth) { event_str = replaceSubstring(event_str,"", person.birth.event_source.source_page); if ('source_conf' in person.birth.event_source) { var src_cls = '"; event_str = event_str.replace('',src_cls); } } else { event_str = replaceSubstring(event_str,"",""); } event_str2html(event_str,eventDD); containerDL.appendChild(eventDD); } return; } function death2html(person,containerDL) { if (person.death != undefined) { var eventDT = document.createElement('dt'); eventDT.appendChild(document.createTextNode(person.death.event_type + ":")); containerDL.appendChild(eventDT); var eventDD = document.createElement('dd'); if (person.death.event_imgs != undefined) { var imgDIV = document.createElement('div'); imgDIV.setAttribute('class','imgTable'); var imgTABLE = document.createElement('table'); var imgTR = document.createElement('tr'); for (var j=0; j", person.death.death_date); event_str = replaceSubstring(event_str,"", person.death.death_place); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"",""); event_str = replaceSubstring(event_str,"", witness_array2string_array(person.death.event_witnesses)); if ('event_source' in person.death) { event_str = replaceSubstring(event_str,"", person.death.event_source.source_page); if ('source_conf' in person.death.event_source) { var src_cls = '"; event_str = event_str.replace('',src_cls); } } else { event_str = replaceSubstring(event_str,"",""); } event_str2html(event_str,eventDD); containerDL.appendChild(eventDD); } return; } function events2html(person,containerDIV) { if (person.events != undefined) { var eventsUL = document.createElement('ul'); for (i=0; i< person.events.length; i++) { var eventLI = document.createElement('li'); if (person.events[i].event_imgs != undefined) { var imgDIV = document.createElement('div'); imgDIV.setAttribute('class','imgTable'); var imgTABLE = document.createElement('table'); var imgTR = document.createElement('tr'); for (var j=0; j", person.events[i].event_date); event_str = replaceSubstring(event_str,"", person.events[i].event_role); event_str = replaceSubstring(event_str,"", person.events[i].event_type) event_str = replaceSubstring(event_str,"", person.events[i].event_desc); event_str = replaceSubstring(event_str,"", person.events[i].event_place); event_str = replaceSubstring(event_str,"", witness_array2string_array(person.events[i].event_witnesses)); if ('event_source' in person.events[i]) { event_str = replaceSubstring(event_str,"", person.events[i].event_source.source_page); if ('source_conf' in person.events[i].event_source) { var src_cls = ''; event_str = event_str.replace('',src_cls); } } else { event_str = replaceSubstring(event_str,"",""); } event_str2html(event_str,eventLI) eventsUL.appendChild(eventLI); } var subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Events:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(eventsUL); } return; } function attributes2html(person,containerDIV) { if (person.attributes != undefined) { var attributesDL = document.createElement('dl'); for (i=0; i< person.attributes.length; i++) { var attributeDT = document.createElement('dt'); if (person.attributes[i].attr_type != undefined) { attributeDT.appendChild(document.createTextNode(person.attributes[i].attr_type)); } attributesDL.appendChild(attributeDT); var attributeDD = document.createElement('dd'); var attr_str = ""; if (person.attributes[i].attr_val != undefined) { var attr_str = person.attributes[i].attr_val + attr_str; } if ('attr_source' in person.attributes[i]) { attr_str = replaceSubstring(attr_str,"", person.attributes[i].attr_source.source_page); if ('source_conf' in person.attributes[i].attr_source) { var src_cls = ''; attr_str = attr_str.replace('',src_cls); } } else { attr_str = replaceSubstring(attr_str,"",""); } event_str2html(attr_str,attributeDD); attributesDL.appendChild(attributeDD); } var subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Attributes:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(attributesDL); } return; } function addresses2html(person,containerDIV) { if (person.addresses != undefined) { var addressesDL = document.createElement('dl'); for (i=0; i< person.addresses.length; i++) { var addressDT = document.createElement('dt'); if (person.addresses[i].address_date != undefined) { addressDT.appendChild(document.createTextNode(person.addresses[i].address_date)) } addressesDL.appendChild(addressDT); var addressDD = document.createElement('dd'); var addr_str = ""; if (person.addresses[i].address_str != undefined) { addr_str = person.addresses[i].address_str + addr_str } if ('addr_source' in person.addresses[i]) { addr_str = replaceSubstring(addr_str,"", person.addresses[i].addr_source.source_page); if ('source_conf' in person.addresses[i].addr_source) { var src_cls = ''; addr_str = addr_str.replace('',src_cls); } } else { addr_str = replaceSubstring(addr_str,"",""); } event_str2html(addr_str,addressDD); addressesDL.appendChild(addressDD); } var subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Addresses:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(addressesDL); } return; } function notes2html(person,containerDIV) { if (person.notes != undefined) { if (person.notes.note_format) { var notesP = document.createElement('pre'); } else { var notesP = document.createElement('p'); } notesP.appendChild(document.createTextNode(person.notes.note_text)); subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Notes:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(notesP); } return; } function sources2html(person,containerDIV) { if (person.sources != undefined) { var sourcesOL = document.createElement('ol'); for (i=0; i< person.sources.length; i++) { var sourceLI = document.createElement('li'); var source_str = "" source_str = replaceSubstring(source_str,"<title>", person.sources[i].source_title); source_str = replaceSubstring(source_str,"<volume>", person.sources[i].source_page); source_str = replaceSubstring(source_str,"<author>", person.sources[i].source_author); source_str = replaceSubstring(source_str,"<publication_info>", person.sources[i].source_pub_info); source_str = replaceSubstring(source_str,"<abbreviation>", person.sources[i].source_abbr); event_str2html(source_str,sourceLI); sourcesOL.appendChild(sourceLI); } subtitle = document.createElement('h3'); subtitle.appendChild(document.createTextNode('Sources:')); containerDIV.appendChild(subtitle); containerDIV.appendChild(sourcesOL); } return; } ]]> </html:script> </html:head> <html:body> <html:div id="infoField"></html:div> <html:form id="searchForm" action=""> <html:label>Search: <html:input id="searchString" type="text" onkeyup="searchStrInSubj()"/> </html:label> <html:label>in: <html:select id="searchSubject" onchange="searchStrInSubj()"> </html:select> </html:label> </html:form> <html:p><html:br/></html:p> <!-- To accomodate the search form. --> <svg id="AncestorChart" width="60%" height="1000px" viewBox="0 0 1000 3000" preserveAspectRatio="xMinYMin" onclick="start_halo(evt)"> <rect x="267.00" y="-11.00" width="66.00" height="24.00" class="male" onclick="activate(this,{person_name:'Costa, Pedro',events:[{event_type:'Death Child',event_date:'',event_desc:'Costa Y Fabrega, Melchor'},{event_type:'Birth Child',event_date:'',event_place:'San Andres De Palomar, Sant Andreu, Barcelona, Barcelona Province, Catalonia, Spain',event_desc:'Costa Y Fabrega, Melchor'}],notes:{note_text:'Based on his grandson\'s year of birth, he must have been born in the vicinity of 1830.',note_format:0},sources:[{source_title:'FamilySearch.org'}]})"><title>Costa, Pedro Fabrega(??), Antonia Costa Y Fabrega, Melchor Pages, Antonio Valls(??), Teresa Pages Y Valls, Carlota Costa, Pedro Carlos Camarena, Miguel Guerrero, Maria *Cayetana* Camarena Guerrero, Francisco Dámaso González, Pedro Garcia, Juana González, Ana Camarana González, Francisco Garcia, Manuel Pichardo, Anastasia Garcia Pichardo, Carmen *Petronila* de las Mercedes Camarana Garcia, Gloria Costa, Carlota Copyright Ron Johnson, Jr. 2018 var svg_el = document.getElementById('AncestorChart'); svg_el.setAttribute('viewBox',"-33 -12 1000 250"); var search_subject_sel = document.getElementById('searchSubject'); var opt = document.createElement('option'); opt.setAttribute('value',"birth_date:'"); opt.appendChild(document.createTextNode('Birth Date')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"birth_place:'"); opt.appendChild(document.createTextNode('Birth Place')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"_date:'"); opt.appendChild(document.createTextNode('Date')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"death_date:'"); opt.appendChild(document.createTextNode('Death Date')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"death_place:'"); opt.appendChild(document.createTextNode('Death Place')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"event_date:'"); opt.appendChild(document.createTextNode('Event Date')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"event_desc:'"); opt.appendChild(document.createTextNode('Event Description')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"event_place:'"); opt.appendChild(document.createTextNode('Event Place')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"event_type:'"); opt.appendChild(document.createTextNode('Event Type')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('selected','selected'); opt.setAttribute('value',"person_name:'"); opt.appendChild(document.createTextNode('Name')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"note_text:'"); opt.appendChild(document.createTextNode('Note')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"_place:'"); opt.appendChild(document.createTextNode('Place')); search_subject_sel.appendChild(opt); var opt = document.createElement('option'); opt.setAttribute('value',"source_title:'"); opt.appendChild(document.createTextNode('Source Title')); search_subject_sel.appendChild(opt);