var IdElementoSeleccionado="";
var DirImagenes = "../../Imagenes";
var UsuarioActivo;
var Caso;
var TipoUsuario;
var EstiloLinks = false;

function DefinirDirImagenes(Directorio) {
	DirImagenes = Directorio;
}

function ConstruirTema(Tema, IdSeleccion) {
	IdElementoSeleccionado = IdSeleccion;

	if (Tema=="General") {
		
AddTema("SERVICIOS", "Servicios", "#", "Seccion", "Tema1.gif");			
AddTema("QUIENES_SOMOS", "Quienes Somos", "../General/Default.asp", "Boton", "SubTema1_1.gif");
			AddTema("ESTADISTICAS", "Estadísticas", "../Estadisticas/Estadisticas.asp", "Boton", "SubTema1_2.gif");
			AddTema("DOWNLOADS", "Normas", "../Downloads/Downloads.asp", "Boton", "SubTema1_3.gif");
			AddTema("TARIFAS", "Tarifas", "http://www.camaramed.org.co/cac/Temas/general/Tarifas.asp", "Boton", "SubTema1_4.gif");
			AddTema("REQUISITOS", "Requisitos para ingresar a las listas de Arbitros y conciliadores", "http://www.camaramed.org.co/cac/Temas/general/requisitos.asp", "Boton", "requisitos.gif");
			AddTema("ARBITROS", "Lista de Arbitros", "../General/Arbitros.asp", "Boton", "SubTema1_6.gif");
			AddTema("CONCILIADORES", "Lista de Conciliadores", "../General/Conciliadores.asp", "Boton", "SubTema1_7.gif");
			AddTema("SECRETARIOS", "Lista de Secretarios", "../General/Secretarios.asp", "Boton", "SubTema1_8.gif");
			AddTema("PERITOS", "Lista de Peritos", "../General/Peritos.asp", "Boton", "SubTema1_9.gif");
			AddTema("SOLICITUD_CONCILIACION", "Solicitud de Conciliación", "../General/ConciliacionEnLinea.asp", "Boton", "solicitudconc.gif");
			AddTema("LAUDOS ARBITRALES", "Laudos Arbitrales", "../General/laudos.asp", "Boton", "laudos.gif");
			AddTema("CONTACTENOS", "Contáctenos", "../General/Contactenos.asp", "Boton", "SubTema1_10.gif");

		AddTema("SERVICIOS", "Servicios", "../Servicios/Arbitraje.asp", "Seccion", "Tema2.gif");
			AddTema("ARBITRAJE", "Arbitraje", "../Servicios/Arbitraje.asp", "Boton", "SubTema2_1.gif");
			AddTema("CONCILIACION", "Conciliación", "../Servicios/Conciliacion.asp", "Boton", "SubTema2_2.gif");
			AddTema("AMIGABLE_COMPOSICION", "Amigable Composición", "../Servicios/AmigableComposicion.asp", "Boton", "SubTema2_3.gif");

		AddTema("CENTRO_VIRTUAL", "Centro Virtual", "../Sicac/Busqueda.asp", "Seccion", "Tema3.gif");
			AddTema("LOGIN", "Inicio de Sesión", "../Sicac/Login.asp", "Boton", "SubTema3_1.gif");
			AddTema("BUSQUEDA", "Consulta de Casos", "../Sicac/Busqueda.asp", "Boton", "SubTema3_2.gif");
			if (UsuarioActivo != null && UsuarioActivo != "") {
				AddTema("LOGOUT", "Cerrar Sesión", "../Sicac/Login.asp?close=77", "Boton", "SubTema3_3.gif");			}
	}
	
		if (Caso != null && Caso != "") {
		AddTema("CASO", "Información del Caso", "../Sicac/Caso.asp", "Seccion", "Tema4.gif");
			AddTema("FICHA_TECNICA", "Datos Básicos", "../Sicac/Caso.asp", "Boton", "SubTema4_1.gif");
			AddTema("EXPEDIENTE", "Expediente", "../Sicac/Expediente.asp", "Boton", "SubTema4_2.gif");
			if (TipoUsuario=="U") {
				AddTema("PLANTILLAS", "Plantillas", "../Sicac/Plantillas.asp", "Boton", "SubTema4_3.gif");
				AddTema("DOCUMENTOS", "Documentos", "../Sicac/Documentos.asp", "Boton", "SubTema4_4.gif");
			}
		}
}

function ConstruirHeaderPagina(Tema) {
	var HTML;
	if (Tema=="General") {
		HTML = "<P>";
		HTML += "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH='100%'>";
		HTML += "<TR>";
		HTML += "<TD rowSpan=6></TD>";
		HTML += "<TD VALIGN='top' rowSpan=6></TD>";
		HTML += "</TR>";
		HTML += "</TABLE></P>";
		document.write(HTML);
	}
}

function AddTema(Id, Titulo, URL, Estilo, Boton) {
	var HTML;
	var Ancho = "17";

	if (Estilo=="Boton") {
		if (EstiloLinks==true) {Estilo="Link"}
		Ancho = "17";
	} else if (Estilo=="Seccion") {
		Ancho = "20";
	}

	if (Estilo=="Link") {
		HTML = "<TR>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "<TD STYLE='BACKGROUND-COLOR: #f1f1f1' VALIGN='TOP'><A CLASS='LinkMenu' HREF='" + URL + "'>&nbsp;&nbsp;" + Titulo + "</A></TD>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "</TR>";
	} else {
		HTML = "<TR>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "<TD VALIGN='TOP'><A HREF='" + URL + "'><IMG ALT='" + Titulo + "' SRC='" + DirImagenes + "/Botones/" + Boton + "' BORDER=0></A></TD>";
		HTML += "<TD>&nbsp;</TD>";
		HTML += "</TR>";
	}
	document.write(HTML);
}

function LineaDeTerminacion() {
	var HTML;
	
	HTML = "<TR>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "<TD CLASS=\"MenuBordeSuperior\">&nbsp;</TD>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "</TR>";	
	document.write(HTML);
}

function FilaEnBlanco() {
	var HTML;
	
	HTML = "<TR>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "<TD>&nbsp;</TD>";
	HTML += "</TR>";
	document.write(HTML);
}

function AbrirVentana(theURL,winName,features) {
	if (features=="")
		features = "height=400,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,location=no,titlebar=yes";

	window.open(theURL,winName,features);
}

function ConstruirEncabezado() {
	var URL = "../General/Default.htm";
	var HTML;

	HTML = "<TABLE cellSpacing=0 cellPadding=0 width=760 height=116 border=0>";
	HTML +=	"<TR>";
	HTML += "<TD></TD>";
	HTML +=	"<TD valign=top colSpan=3>";
	HTML += "<map name='Mapa'>";
	HTML += "<area alt='Cámara de Comercio de Medellín para Antioquia' href='http://www.camaramed.org.co/' shape='rect' coords='46, 100, 148, 143'>";
	HTML += "</map>";	
	HTML += "<IMG SRC='" + DirImagenes + "/LogoEncabezado1.jpg' border=0 usemap='#Mapa'><br></TD>";
	HTML +=	"<TD><IMG height=144 SRC='" + DirImagenes + "/spacer.gif' width=1 border=0></TD>";
	HTML +=	"</TR>";
	HTML +=	"</TABLE>";
	document.write(HTML);
}
