<html>
    <head>
        <!--
Copyright 2015, 2016 Sam Kauffman

This file is part of the Inbreeding Calculator.

The Inbreeding Calculator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
        -->
    
        <title>Inbreeding Calculator</title>
        <meta charset="UTF-8"> 
        <meta name="keywords" content="inbreeding coefficient calculator">
        <meta name="description" content="Inbreeding coefficient calculator and pedigree tool">
        <meta name="author" content="Sam Kauffman">

        <link rel="stylesheet" type="text/css" href="style.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
        <script src="inbreeding.js"></script>
    </head>
    <body>
        <h2>Inbreeding Calculator <sup style="color: red">Beta</sup></h2>
        <p>by Sam Kauffman of <a href="http://zikahamstery.weebly.com">Zika Hamstery</a>
        <p><a href="about.html">Information and instructions</a></p>
        <div id="controls">
            <h3 class="result">Inbreeding: <span id="result"></span></h3>
            <ul id="breakdown"></ul>
            <button id="calculate">Calculate</button>
            <p>&nbsp;</p>
            <p>
                Show
                <select id="generations">
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                    <option value="11">11</option>
                    <option value="12">12</option>
                </select>
                generations back
            </p>
            <p>
                <button id="clear">Clear pedigree</button>
                <button id="clear-selected" class="require-selection">
                    Clear selected individual and ancestors</button>
            </p>
            <p>
                <button id="show-data">Show offspring's data</button>
                <button id="show-selected-data" class="require-selection">
                    Show selected individual's data</button>
            </p>
            <p>
                <button id="populate">Populate pedigree</button>
                <button id="populate-selected" class="require-selection">
                    Populate selected individual and ancestors</button>
            </p>
            
            <p>Copy/paste pedigree data here:</p>
            <textarea id="textarea" wrap="off"></textarea>
            
            <p>
                <input type="checkbox" id="wide_fields">
                <label for="wide_fields">Wide fields</label>
            </p>
        </div>
        <div id="pedigree">
            <table data-level="0">
                <tr class="offspring">
                    <td>
                        Offspring:
                        <input type="text" class="ind" id="offspring">
                        <br>&nbsp;
                    </td>
                    <td class="anc">
                        <table data-level="1">
                            <tr class="s">
                                <td>
                                    Sire:
                                    <input type="text" class="ind" id="s">
                                    <br>&nbsp;
                                </td>
                                <td class="anc">
                                    <table data-level="2">
                                        <tr class="s">
                                            <td>
                                                <input type="text" class="ind" id="ss">
                                            </td>
                                            <td class="anc">
                                                <table data-level="3">
                                                    <tr class="s">
                                                        <td>
                                                            <input type="text" class="ind" id="sss">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ssss">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="sssd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr class="d">
                                                        <td>
                                                            <input type="text" class="ind" id="ssd">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ssds">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ssdd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr class="d">
                                            <td>
                                                <input type="text" class="ind" id="sd">
                                            </td>
                                            <td class="anc">
                                                <table data-level="3">
                                                    <tr class="s">
                                                        <td>
                                                            <input type="text" class="ind" id="sds">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="sdss">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="sdsd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr class="d">
                                                        <td>
                                                            <input type="text" class="ind" id="sdd">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="sdds">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="sddd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr class="d">
                                <td>
                                    Dam:<br>
                                    <input type="text" class="ind" id="d">
                                    <br>&nbsp;
                                </td>
                                <td class="anc">
                                    <table data-level="2">
                                        <tr class="s">
                                            <td>
                                                <input type="text" class="ind" id="ds">
                                            </td>
                                            <td class="anc">
                                                <table data-level="3">
                                                    <tr class="s">
                                                        <td>
                                                            <input type="text" class="ind" id="dss">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="dsss">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="dssd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr class="d">
                                                        <td>
                                                            <input type="text" class="ind" id="dsd">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="dsds">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="dsdd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr class="d">
                                            <td>
                                                <input type="text" class="ind" id="dd">
                                            </td>
                                            <td class="anc">
                                                <table data-level="3">
                                                    <tr class="s">
                                                        <td>
                                                            <input type="text" class="ind" id="dds">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ddss">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ddsd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr class="d">
                                                        <td>
                                                            <input type="text" class="ind" id="ddd">
                                                        </td>
                                                        <td class="anc">
                                                            <table data-level="4">
                                                                <tr class="s">
                                                                    <td>
                                                                        <input type="text" class="ind" id="ddds">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                                <tr class="d">
                                                                    <td>
                                                                        <input type="text" class="ind" id="dddd">
                                                                    </td>
                                                                    <td class="anc"></td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </div>
        </div>
    </body>
</html>
