function show(ob){
	document.getElementById(ob).style.display = "block";
};

function hide(ob){
	document.getElementById(ob).style.display = "none";
};

function sh_hi(ob){
    document.getElementById(ob).style.display = document.getElementById(ob).style.display == "block" ? "none" : "block";
};

function my_confirm(txt)
{
	if (confirm(txt)) return true;
	if (document.all && window.event) event.returnValue = false;
	return false;
};

function expandnews(id)
{
    agent.call('/ajax.php','getnewstxt','callback_getnewstxt', id);
}

function callback_getnewstxt(x)
{
    if (x[1] == 'cancel') return;
    domObj = document.getElementById('news_' + x[0]);
    if (domObj)
    {
        domObj.innerHTML = x[1];
    }
}

function shownews(start)
{
    agent.call('/ajax.php','shownews','callback_shownews', start);
}

function callback_shownews(news)
{
    if (news == 'cancel') return;
    domObj = document.getElementById('news_div');
    if (domObj)
    {
        domObj.innerHTML = news;
    }
}

function populateContactsDiv()
{
    sel = document.getElementById("citySelect");
    opt = sel.options[sel.selectedIndex];
    agent.call('/ajax.php', 'populateContactsDiv', 'callback_populateContactsDiv', opt.value);

}

function callback_populateContactsDiv(content)
{
    if (content == 'cancel') return;
    domObj = document.getElementById('contactsDiv');
    if (domObj)
    {
        domObj.innerHTML = content;
    }
}