
//var root = "/edelman/";
var root = "/";

/***** open sitemap *****/
function openSitemap(){
    sitemap = window.open(root + "sitemap/", "sitemap",'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500');
    sitemap.focus();
    return;
}

/***** open bio *****/
function openBio(bio){
    biow = window.open(bio, "Biografía",'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=500');
    biow.focus();
    return;
}

/***** open boletin *****/
function showb(id){
    boletin = window.open(root + "prensa/showb.php?id=" + id, "Botetin",'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500');
    boletin.focus();
    return;
}


/***** fix size *****/

function fixsize_start(){
    var html = "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
    html += "<tr><td><table id=\"fixsize\"></table></td></tr><tr><td>";
    document.write(html);
}
function fixsize_end(){
    document.write("</td></tr></table>");
}

/***** hmenu functions *****/

function decreaseLevel(){
    return "</ul></li>";
}
function openItem(i,s,l,t){
    var html = "<ul class=\"item" + i + "\">";
    html+= "<li><a href=\"" + l + "\" class=\"item" + i + "\"";
    if(t) html+=" target=\"" + t + "\" "; 
    html+= ">&nbsp;</a><ul>"
    return html;
	alert (html);
}
function closeItem(){
    return "</ul></li></ul>";
}
function printSubItem(s,l, isparent) {

    var show = (isparent)? "&gt;&nbsp;"+s : s;
    var html = "<li><a href=\"" + l + "\" title=\"" + s + "\">" + show + "</a>";
	if(isparent){
        html+="<ul>";
    }else{
        html+="</li>";
    }
    return html;
}


function getHMenuHTML(){
    var html = "<div id=\"hmenu\">";

    html += openItem(1, "COMPAÑIAA", "#");
    html += printSubItem("Historia", root + "compania/historia/");
    html += printSubItem("Visión, misión y valores", root + "compania/mvv/");
    html += printSubItem("Equipo", root + "compania/equipo/");
    html += printSubItem("Integrate", root + "compania/integrate/");
    html += closeItem();

    html += openItem(4, "SERVICIOS","#");
    html += printSubItem("Industrias", root + "servicios/industrias/");
    html += printSubItem("Pr&aacute;cticas", root + "servicios/practicas/");
    html += printSubItem("Servicios", root + "servicios/servicios/");
    html += closeItem();

    html += openItem(3, "PRENSA", "#");
    html += printSubItem("Últimos comunicados", root + "prensa/");
    html += printSubItem("Servicio de noticias", root + "prensa/servicio/");
    html += printSubItem("Archivo de comunicados", root + "prensa/index.php?archives=true");
    html += closeItem();

    html += openItem(2, "CLIENTES", root + "clientes/");
    html += closeItem();

    html += openItem(5, "CONTACTO", root + "contacto/");
    html += closeItem();

    html += openItem(6, "INSIGHTS", "http://www.edelman.com/insights/", "_blank");
    html += closeItem();

    html += openItem(7, "BLOG", "http://www.edelman.com/landingblog/Default.aspx", "_blank");
    html += closeItem();

    html += openItem(8, "EDELMANNEXT", "http://www.edelmannext.com.ar", "_blank");
    html += closeItem();
	
	html += openItem(9, "TRUST 2009", "http://www.edelman.com/trust/2009", "_blank");
    html += closeItem();
	
	html += openItem(10, "INTRANET", "http://www.edelman-argentina.com.ar/download/", "_blank");
    html += closeItem();

    html += "</div><!-- hmenu -->";
    document.write(html);
}

function getNavHTML(){
    var html = "<div id=\"gnav\"><ul>";
    html +=	"<li><a id=\"gnav-sitemap\" href=\"javascript:openSitemap();\"><span>Site Map</span></a></li>";
    html += "<li><a id=\"gnav-edelmandotcom\" target=\"_blank\" href=\"http://www.edelman.com\"><span>Edelman.com</span></a></li>";
    html += "<li><a id=\"gnav-home\" href=\"" + root + "\"><span>Home</span></a></li>";
    html += "</ul></div><!-- gnav -->";
    document.write(html);
}
