
function setPosition() {
    
    var menu_td = xGetElementById("menu_td");   
    var menu_fl = xGetElementById("menu_fl");   
    var fotocs_td = xGetElementById("fotocs_td");   
    var fotocs_fl = xGetElementById("fotocs_fl");   
    var content_td = xGetElementById("content_td"); 
    var content_div = xGetElementById("content_div");
  var activity_td = xGetElementById("activity_td");
  
    // MENU
    if(menu_fl != null) menu_fl.style.display = "none"; 
    if(fotocs_fl != null) fotocs_fl.style.display = "none"; 
    if(content_div != null) content_div.style.display = "none";
    if(activity_td != null) activity_td.style.display = "none";
    
    if(menu_fl != null) {
        var width = xWidth(menu_td);
        var height = xHeight(menu_td);
        
        var menu_fl_embed = getEmbed(menu_fl);
        if(menu_fl_embed != null) {
            menu_fl_embed.width = width;
            menu_fl_embed.height = height; 
        }
        menu_fl.width = width;
        menu_fl.height = height;
    }
    
    if(activity_td != null && menu_fl != null) {
        activity_td.height = xClientHeight() - 60 - menu_fl.height  
    }
    
    if(fotocs_fl != null) {
        // Foto carousel
        width = xWidth(fotocs_td);
        height = xHeight(fotocs_td);
    
        var fotocs_fl_embed = getEmbed(fotocs_fl);
        if(fotocs_fl_embed != null) {
            fotocs_fl_embed.width = width;
            fotocs_fl_embed.height = height; 
        }
        fotocs_fl.width = width;
        fotocs_fl.height = height;
    }
    
    if(content_div != null) {
        if(xGecko) {
            //Content
            //content_div.style.width = xWidth(content_td) - 20 + "px";
            content_div.style.height = xHeight(content_td) - 40 + "px";
        } else {
            //Content
            //content_div.style.width = xWidth(content_td) + "px";
            content_div.style.height = xHeight(content_td)+ "px";       
        }
    }
    
    if(menu_fl != null) menu_fl.style.display = ""; 
    if(fotocs_fl != null) fotocs_fl.style.display = ""; 
    if(content_div != null) content_div.style.display = "";
    if(activity_td != null) activity_td.style.display = "";
    
    
}


function getEmbed(obj) {
    for(var i = 0; i < obj.childNodes.length ; i++) {
        if(obj.childNodes[i].nodeName == "EMBED")
            return obj.childNodes[i];   
    }   
    return null;
}



