function AO_pozice (func_name, ad_name, html_head, html_foot) {
    document.write('<div id="ao_' + ad_name +'" style="visibility:hidden">' + html_head);
    if(typeof func_name == 'function') func_name();
    document.write(html_foot + '</div>');
    if (typeof adserver_emissions == 'object' && adserver_emissions[ad_name] == true) {
        document.getElementById('ao_' + ad_name).style.visibility = 'visible'; 
    } 
}

function AO_pozice_sob (func_name, ad_name, html_head, html_foot) {
    document.write('<div id="ao_' + ad_name +'" style="display:none">' + html_head);
	eval("if(typeof " + func_name + " == 'function') " + func_name + "();");
    document.write(html_foot + '</div>');
    if (typeof adserver_emissions == 'object' && adserver_emissions[ad_name] == true) {
        document.getElementById('ao_' + ad_name).style.display = 'block'; 
    } 
}
function AV_pozice (func_name, ad_name, html_head, html_foot) {
	if(typeof(html_head) == 'undefined') html_head = '';
	if(typeof(html_foot) == 'undefined') html_foot = '';
	document.write('<div id="ao_' + ad_name +'" style="display:none;">' + html_head);
	eval("if(typeof " + func_name + " == 'function') " + func_name + "();");
    document.write(html_foot + '</div>');
    if (typeof adserver_emissions == 'object' && adserver_emissions[ad_name] == true) {
        document.getElementById('ao_' + ad_name).style.display = 'block'; 
    } 
}
