
//used to switch the class of elements on the fly.
function change(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}

// used to hide and show elements. 
function show(idLayer) { document.getElementById(idLayer).style.display='block'; }
function showInline(idLayer) { document.getElementById(idLayer).style.display='inline'; }
function hide(idLayer) { document.getElementById(idLayer).style.display='none'; }

//Children selector.
function displayages(childobj)
{
if (childobj.options[0].selected){hide('children_box'); hide('minorsAge1'); hide('minorsAge2'); hide('minorsAge3'); hide('minorsAge4');}
if (childobj.options[1].selected){show('children_box'); showInline('minorsAge1'); hide('minorsAge2'); hide('minorsAge3'); hide('minorsAge4');}
if (childobj.options[2].selected){show('children_box'); showInline('minorsAge1'); showInline('minorsAge2'); hide('minorsAge3'); hide('minorsAge4');}
if (childobj.options[3].selected){show('children_box'); showInline('minorsAge1'); showInline('minorsAge2'); showInline('minorsAge3'); hide('minorsAge4');}
if (childobj.options[4].selected){ show('children_box'); showInline('minorsAge1'); showInline('minorsAge2'); showInline('minorsAge3'); showInline('minorsAge4');}
}









