function deleteDependancy(sDiv){}
function addDependancy(){iDependancy++
oDependancyDiv=document.getElementById('depandancies')
today=new Date()
currentYear=today.getYear()+1900
oCounter=document.getElementById('depandancies_no');oCounter.value=parseInt(oCounter.value)+1;table=document.createElement('table');table.setAttribute("width","600");table.setAttribute("border","0");table.setAttribute("cellpadding","5");table.setAttribute("cellspacing","0");table.setAttribute("class","neatTable");table.setAttribute("align","center");tr=document.createElement('tr');table.appendChild(tr);th=document.createElement('th');th.setAttribute("width","200");tr.appendChild(th);label=document.createElement('label');label.setAttribute("for","dependant_name"+iDependancy);labelText=document.createTextNode('Name');label.appendChild(labelText);th.appendChild(label);td=document.createElement('td');tr.appendChild(td);input=document.createElement('input');input.setAttribute("type","text");input.setAttribute("name","dependant_name"+iDependancy);input.setAttribute("id","dependant_name"+iDependancy);input.setAttribute("class","fixedWidth");td.appendChild(input);tr=document.createElement('tr');table.appendChild(tr);th=document.createElement('th');tr.appendChild(th);label=document.createElement('label');label.setAttribute("for","dependant_dob"+iDependancy);labelText=document.createTextNode('Date of Birth');label.appendChild(labelText);th.appendChild(label);td=document.createElement('td');tr.appendChild(td);select=document.createElement('select');select.setAttribute("name","dependant_dob_day"+iDependancy);select.setAttribute("id","dependant_dob_day"+iDependancy);td.appendChild(select);for(var d=1;d<=31;d++){option=document.createElement('option');option.setAttribute("value",d);dayText=document.createTextNode(d);option.appendChild(dayText);select.appendChild(option);}
spaceText=document.createTextNode(' ');tr.appendChild(spaceText);select=document.createElement('select');select.setAttribute("name","dependant_dob_month"+iDependancy);select.setAttribute("id","dependant_dob_month"+iDependancy);td.appendChild(select);option=document.createElement('option');option.setAttribute("value","January");monthText=document.createTextNode("January");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","February");monthText=document.createTextNode("February");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","March");monthText=document.createTextNode("March");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","April");monthText=document.createTextNode("April");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","May");monthText=document.createTextNode("May");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","June");monthText=document.createTextNode("June");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","July");monthText=document.createTextNode("July");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","August");monthText=document.createTextNode("August");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","September");monthText=document.createTextNode("September");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","October");monthText=document.createTextNode("October");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","November");monthText=document.createTextNode("November");option.appendChild(monthText);select.appendChild(option);option=document.createElement('option');option.setAttribute("value","December");monthText=document.createTextNode("December");option.appendChild(monthText);select.appendChild(option);spaceText=document.createTextNode(' ');tr.appendChild(spaceText);select=document.createElement('select');select.setAttribute("name","dependant_dob_year"+iDependancy);select.setAttribute("id","dependant_dob_year"+iDependancy);td.appendChild(select);for(var y=currentYear;y>=1900;y=y-1){option=document.createElement('option');option.setAttribute("value",y);yearText=document.createTextNode(y);option.appendChild(yearText);select.appendChild(option);}
oDependancyDiv.appendChild(table)}
