function atf(url, title)
{
    if (!url) url = location.href;
    if (!title) title = document.title;
    
    //Gecko
    if((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
	window.sidebar.addPanel (title, url, "");
    //IE4+
    else if(typeof window.external == "object")
	window.external.AddFavorite(url, title);
    //Opera7+
    else if(window.opera && document.createElement)
    {
	var a = document.createElement('A');
	if (!a) return false; //IF Opera 6
	a.setAttribute('rel','sidebar');
	a.setAttribute('href',url);
	a.setAttribute('title',title);
	a.click();
    }
    else return false;
    return true;
}

function ToggleRegion(id)
{
    var d = document.getElementById(id).style.display;
    document.getElementById(id).style.display = d=='none'?'block':'none';
}

function PrintVersion(url)
{
//    alert('asdfasdf');
    var win = window.open('/'+url, '1','resizable=no,menubar=no,scrollbars=yes,width=800,height=600,top=1');
    var a = '';
//    var obj = win.document;
//    for(var i in obj)
//    {
//	a += i + '\n';
//    }
//    alert(a);
//    a = document.getElementById('content').innerHTML;
//    win.document.write(a);
    //onLoad = function () { alert('dfgdfg');}
    
    
//    ('content')
}
/*
var obj = window;
var a = '';
for(var i in obj)
{
    a += "obj[" + i + "] = " + obj[i] + "\n";
}
document.write("<pre>" + a + "</pre>");

*/
