// skryvanie / odkryvanie obsahu contentov v indexPage

function indexpageSwitch(id, state) {
    vis = state?(state=="hide"):(document.getElementById('indexText'+id).style.display!="none");
    if (document.getElementById('indexText'+id))
      document.getElementById('indexText'+id).style.display=vis?"none":"block";
    if (document.getElementById('indexMeta'+id))
      document.getElementById('indexMeta'+id).style.display=vis?"none":"block";
    if (document.getElementById('indexImg'+id))
      document.getElementById('indexImg'+id).src=vis?"images/index_closed.gif":"images/index_opened.gif";
}

var allShowing = false;
function indexpageSwitchAll() {
    id = 1;
    while (document.getElementById('indexText'+id)) {
        indexpageSwitch(id, allShowing?"hide":"show");
        id++;
    }
    allShowing = !allShowing;
    if (document.getElementById('indexImgAll'))
      document.getElementById('indexImgAll').src = allShowing?"images/index_close_all.gif":"images/index_open_all.gif";
}

function indexpageSwitchContact(id, state) {
    vis = state?(state=="hide"):(document.getElementById('indexText'+id).style.display!="none");
    if (document.getElementById('indexText'+id))
      document.getElementById('indexText'+id).style.display=vis?"none":"block";
    if (document.getElementById('indexListRozklik'+id))
      document.getElementById('indexListRozklik'+id).innerHTML=vis?"rozbali»":"zbali»";
    if (document.getElementById('indexImg'+id))
      document.getElementById('indexImg'+id).src=vis?"images/index_closed.gif":"images/index_opened.gif";
}

var allShowing = false;
function indexpageSwitchAllContacts() {
    id = 1;
    while (document.getElementById('indexText'+id)) {
        indexpageSwitchContact(id, allShowing?"hide":"show");
        id++;
    }
    allShowing = !allShowing;
    if (document.getElementById('indexImgAll'))
      document.getElementById('indexImgAll').src = allShowing?"images/index_close_all.gif":"images/index_open_all.gif";
}

// odoslanie Allianz Index formulara

function Odoslat() 
{
  frm = document.forms['in_date'];                      
  frm.submit();              
}
