
// --------------------
// ajax get und do 
// --------------------		

var base_url = '';

function ajax_back() {
	div_history_div.innerHTML = div_history_innerHTML;
}
function ajax_do (url) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;

        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}


function ajax_get (action, el) {
        // Has element been passed as object or id-string?
        if (typeof(el) == 'string') {
                el = document.getElementById(el);
        }

        // Valid el?
        if (el == null) { return false; }

        // Create getfile URL
        getfile_url = base_url + 'ajax.php?action=' + action + '&el=' + escape(el.id);
        // Do Ajax
        ajax_do (getfile_url);

        //return true;
}


	
//  get artikel search "fubar" in artikel_search_div
//	ajax_get ('article&article_search=fubar','artikel_search_div');	
