// ------------------------
// Funciones LSIS Argentina
// ------------------------

function Derechos() {
 var now = new Date();
 var year = now.getFullYear();

 document.write ("<font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#000000'>LSIS Argentina (San Rafael - Mendoza) | Derechos Reservados 2000/" + year + " | Resolución optima 800 x 600</font>");
}

function DiasPromocion() {
	Hoy = new Date();
   	Fin = new Date(2006,04,15,23,59,59);
	MSxDia = 24 * 60 * 60 * 1000;
	DiasFaltan=0;
	if (Hoy.getTime() < Fin.getTime() ) {
     	DiasFaltan = (Fin.getTime() - Hoy.getTime()) / MSxDia;
     	DiasFaltan = Math.floor(DiasFaltan);
		sTexto = "¡ FALTAN " + DiasFaltan + " DIAS PARA FIN DE PROMOCION !";
		document.write ("<b><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#CC3300'>" + sTexto + "</font></b>");
	}
}

function FechaActual() {
 var now = new Date();
 var textout;
 var day = now.getDay();
 var month = now.getMonth();
 var date = now.getDate();
 var year = now.getFullYear();

 if (day==0) textout1="Domingo";
 if (day==1) textout1="Lunes";
 if (day==2) textout1="Martes";
 if (day==3) textout1="Miércoles";
 if (day==4) textout1="Jueves";
 if (day==5) textout1="Viernes";
 if (day==6) textout1="Sábado";

 if (month==0) textout="enero";
 if (month==1) textout="febrero";
 if (month==2) textout="marzo";
 if (month==3) textout="abril";
 if (month==4) textout="mayo";
 if (month==5) textout="junio";
 if (month==6) textout="julio";
 if (month==7) textout="agosto";
 if (month==8) textout="septiembre";
 if (month==9) textout="octubre";
 if (month==10) textout="noviembre";
 if (month==11) textout="diciembre";

 if ( ( month==11 && date==31 ) || ( month==0 && date<=5 ) ) {
  ny = year;
  if ( month==11 ) ny++;
  document.write ("<b><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#666666'>¡ FELIZ AÑO NUEVO " + ny + " !...</font></b>");
 } else { 	
  document.write ("<b><font face='Verdana, Arial, Helvetica, sans-serif' size='1' color='#666666'>" + textout1 +" " + date + " de " + textout +" de " + year + "</font></b>");
 }
 
}

function cw () {
  // Función que cierra la ventana activa
  close();
}

function horizontal (def, foto,ancho, alto) {
 // Nombre nueva ventana
 windowname = 'def' + def;
 // Código HTML
 shtm = "<HTML><HEAD><SCRIPT language=javascript src='lsis.js'></SCRIPT></HEAD>";
 shtm = shtm + "<title>LSIS Control PC</title>";
 shtm = shtm + "<body bgcolor='#FFFFFF' leftmargin='5' topmargin='5' marginwidth='0'"; 
 shtm = shtm + "marginheight='0'>" + "<img src='" + foto + "'>";
 shtm = shtm + "<div>&nbsp;</div>";
 shtm = shtm + "<div align='center'><a href='javascript:cw()'>";
 shtm = shtm + "<img src='img/bo_close.gif' width='75' height='19' border='0'></a></div>";
 shtm = shtm + "</body></HTML>";
 // Abrir nueva ventana
 popupwin=window.open( "", windowname, "toolbar=no, location=no, directories=no, status=no, menubar=no, width=" + ancho + ",height=" + alto);
 
 // Escribir código HTML
 popupwin.document.write( shtm );
 // Cerrar documento
 // popupwin.document.close();
 // popupwin.active();
}

// Función de Menú Principal
function sobre(src,Color) {
    	if (!src.contains(event.fromElement)) {
	  	src.style.cursor = 'hand';
	  	src.bgColor = Color;
	}
}

function fuera(src,Color2) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = Color2;
	}
}

function pulsar(src) {
    	if(event.srcElement.tagName=='TD'){
	  	src.children.tags('A')[0].click();
	}
}

function BeginMenu(ancho) {
 document.write('<table width="'+ancho+'" border="0" cellspacing="0" cellpadding="3" bgcolor="#cccccc">');
}

function ItemMenu(nombre, url, target, label){
 document.write('<tr><td onClick="pulsar(this)" onMouseOut="fuera(this,');
 document.write("'#ffffff'");
 document.write(');" onMouseOver="sobre(this,');
 document.write("'#f7f7f7'");
 document.write(');" bgcolor="#ffffff"><a class="menu" href="');
 document.write(url+'"');
 if (target == "_blank") { document.write('target="'+target+'"'); }
 document.write('><font size="1" face="Arial, Helvetica, sans-serif" color="#666666">');
 if (label != "") { document.write('<acronym title="'+label+'">'); }
 document.write(nombre);
 if (label != "") { document.write('</acronym>'); }
 document.write('</font></a></td></tr>');
 document.write('<td height="1"></td>');  // Línea Separatoria
}

function EndMenu(){
 document.write('</table>');
}

/* MENU CON ESTILOS CS */
function BeginMenuEx(ancho) {
 document.write('<div id="menu"><div class="barraMenu">');	 
 document.write('<table width="'+ancho+'" border="0" cellspacing="0" cellpadding="3" bgcolor="#ffffff">'); 
}

function ItemMenuEx(nombre, url, target, label){
 document.write( '<tr><td><a class="botonMenu" href="' + url + '"' );
 if (target == "_blank") { document.write(' target="' + target + '"') ; }
 document.write( '>' + nombre );
 document.write( '</a></td></tr>' );
 // document.write('<td bgcolor="#000000" height="1"></td>');  // Línea Separatoria
}

function EndMenuEx(){
 document.write('</table>');
 document.write('</div></div>');
}

function PruebaMenu() {	
	BeginMenuEx('180');
	ItemMenuEx('LSIS Argentina','http://www.lsis.com.ar', '_blank', '');
	ItemMenuEx('LSIS Argentina','http://www.lsis.com.ar', '', '');
	ItemMenuEx('LSIS Argentina','http://www.lsis.com.ar', '', '');
	ItemMenuEx('LSIS Argentina','http://www.lsis.com.ar', '', '');
	EndMenuEx()	
}

function Sistemas(){
	BeginMenuEx('180');
	ItemMenuEx('Control PC','cps.htm','','')
	ItemMenuEx('Sueldos y Jornales','sueldos.htm','','')
	// ItemMenu('Central Telefónica','central.htm','','')
	// ItemMenu('Comandas','comandas.htm','','')
	// ItemMenu('Hoteles','hotel.htm','','')
	ItemMenuEx('NOPPP p/Windows','noppp.htm','','')
	ItemMenuEx('IDE JAVA (tm)','idejava.htm','','')
	EndMenuEx()
}

function Desarrollos(){
	BeginMenuEx('180');
	// ItemMenu('Consultoría & Asesoramiento','consultoria.htm','','')	
	ItemMenuEx('Dispositivos Móviles J2ME','j2me.htm','','')
	// ItemMenu('Desarrollos Personalizados','desarrollos.htm','','')
	// ItemMenu('Servidores Linux','linux.htm','','')
	// ItemMenu('Servicio Técnico','servicio.htm','','')
	EndMenuEx()
}

function Alianzas(){
	BeginMenuEx('180');
	ItemMenuEx('Surinter Diseño & Soluciones WEB','http://www.surinter.com.ar','_blank','')
	// ItemMenu('Hosting','http://www.surinter.com.ar','_blank','')
	// ItemMenu('Near Tech Tecnology','http://www.neartech.com.ar','_blank','')
	// ItemMenu('Labriego','http://www.labriego.com.ar','_blank','')
	EndMenuEx()
}

function Enlaces(){
	BeginMenuEx('180');
	ItemMenuEx('San Rafael Investment','http://www.sanrafaelinvestment.com','_blank','')
	ItemMenuEx('Calling Dr. Marteens','http://www.marteens.com','_blank','')
	EndMenuEx()
}

function Popup(URL, ancho, alto, barra, ajuste){
	msgWindow=window.open(URL,"OpenWindow",
	"width=" + ancho + ",height=" + alto + ",scrollbars=" + barra);
	if (ajuste=='yes') {
		msgWindow2=window.resizeTo(ancho, alto);
	}
}