// JavaScript Document

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}



function startList() {
	var m, nav, no, i;
	if (m = document.getElementById("menu")) {
		nav = null;
		for (i = 0; m.childNodes.length > i; i++) {
			if (m.childNodes[i].nodeName == 'UL') {
				nav = m.childNodes[i];
				break;
			}
		}
		if (nav)
			for (i = 0; nav.childNodes.length > i; i++) {
				no = nav.childNodes[i];
				if (no.nodeName == 'LI') {
					no.onmouseover = function() {
					   this.className = "over"; /* NO += " over", per follie IE/Mac */
					}
					no.onmouseout = function() {
					   this.className = "" /* NO this.className.replace(" over", "") */
					}
				}
			}
	}
}

//ventana flotante
ModalWin = null;
function openWin(  _URL, _scrollbars,  _ancho, _alto) {
if (ModalWin && !ModalWin.closed) {
	ModalWin.close();
}
ModalWin = window.open(_URL, "ModalWin","resizeable=no,scrollbars=" + _scrollbars + ",width=" + _ancho + ",height=" + _alto );	
}


//inicio ocultar email
dominio="chacabucoport.cl" 
conector="@"
contactar="mailto:"

function dame_correo(){ 
   return conector + dominio 
}

<!--
function fecha() {
	
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000)
year+=1900;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;

return (daym+"/"+month+"/"+year);
}

function fechaingles() {
	
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000)
year+=1900;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;

return (month+"/"+daym+"/"+year);
}

function verhora() {
Stamp = new Date();
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = Stamp.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;
}
	return (Hours + ":" + Mins + Time);
}
<!--Sacado de tps.cl-->
function hora() {
  var fecha = new Date;
  var fechaGMT = new Date;
  // fecha.setTime(1000 * s_inicial + offset_now());
  fecha.setTime(t_inicial.getTime() + offset_now());
  fechaGMT.setTime(t_inicial.getTime() + offset_now() + 4 * 3600000); // Esto hay que actualizarlo 2 veces al aņo. Verano: 3, Invierno:4
  var hora = fecha.getHours();
  var min = fecha.getMinutes();
  var seg = fecha.getSeconds();
  var horaGMT = fechaGMT.getHours();
  var minGMT = fechaGMT.getMinutes();
  var segGMT = fechaGMT.getSeconds();
  // return w2(hora,2) + ':' + w2(min,2) + ':' + w2(seg,2) + ' <br>(GMT ' + w2(horaGMT,2) + ':' + w2(minGMT,2) + ':' + w2(segGMT,2) + ')';
  return w2(hora,2) + ':' + w2(min,2) + ' Hrs';
};

function w2(num,n) {
  var a = num + '';
  while (a.length < n) {
    a = '0' + a;
  };
  return a;
};
