// JavaScript Document
// Barra inferior del navegador. 
var osd = "   "
osd +="Bienvenid@ a Auto-Matic:";
osd +=":  Lider en Cambios Automaticos y Convertidores de Par.    ";
osd +="";
osd +="";
osd +="          ";
var timer;
var msg = "";
function scrollMaster () {
msg = customDateSpring(new Date())
clearTimeout(timer)
msg += " " + showtime() + " " + osd
for (var i= 0; i < 100; i++){
msg = " " + msg;
}
scrollMe()
}
function scrollMe(){
window.status = msg;
msg = msg.substring(1, msg.length) + msg.substring(0,1);
timer = setTimeout("scrollMe()", 200);
}
function showtime (){
var now = new Date();
var hours= now.getHours();
var minutes= now.getMinutes();
var seconds= now.getSeconds();
var months= now.getMonth();
var dates= now.getDate();
var years= now.getYear();
var timeValue = ""
timeValue += ((months >9) ? "" : " ")
timeValue += ((dates >9) ? "" : " ")
timeValue = ( months +1)
timeValue +="/"+ dates
timeValue +="/"+  years
var ap="A.M."
if (hours == 12) {
ap = "P.M."
}
if (hours == 0) {
hours = 12
}
if(hours >= 13){
hours -= 12;
ap="P.M."
}
var timeValue2 = " " + hours
timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
return timeValue2;
}
function MakeArray(n) {
this.length = n
return this
}
monthNames = new MakeArray(12)
monthNames[1] = "Enero"
monthNames[2] = "Febrero"
monthNames[3] = "Marzo"
monthNames[4] = "Abril"
monthNames[5] = "Mayo"
monthNames[6] = "Junio"
monthNames[7] = "Julio"
monthNames[8] = "Agosto"
monthNames[9] = "Septiembre"
monthNames[10] = "Octubre"
monthNames[11] = "Noviembre"
monthNames[12] = "Diciembre"
daysNames = new MakeArray(7)
daysNames[1] = "Domingo"
daysNames[2] = "Lunes"
daysNames[3] = "Martes"
daysNames[4] = "Miércoles"
daysNames[5] = "Jueves"
daysNames[6] = "Viernes"
daysNames[7] = "Sábado"
function customDateSpring(oneDate) {
var theDay = daysNames[oneDate.getDay() +1]
var theDate =oneDate.getDate()
var theMonth = monthNames[oneDate.getMonth() +1]
var dayth=" "
if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {
dayth="st";
}
if ((theDate == 2) || (theDate ==22)) {
dayth="nd";
}
if ((theDate== 3) || (theDate  == 23)) {
dayth="rd";
}
return theDay + ", " + theMonth + " " + theDate + dayth + ","
}
scrollMaster();
// Fin barra inferior

// Fecha
function MakeArray(n) {
	this.length = n
	return this
}
monthNames = new MakeArray(12)
monthNames[1] = "Enero"
monthNames[2] = "Febrero"
monthNames[3] = "Marzo"
monthNames[4] = "April"
monthNames[5] = "Mayo"
monthNames[6] = "Junio"
monthNames[7] = "Julio"
monthNames[8] = "Agosto"
monthNames[9] = "Septiembre"
monthNames[10] = "Octubre"
monthNames[11] = "Noviembre"
monthNames[12] = "Diciembre"
dayNames = new MakeArray(7)
dayNames[1] = "Domingo"
dayNames[2] = "Lunes"
dayNames[3] = "Martes"
dayNames[4] = "Miércoles"
dayNames[5] = "Jueves"
dayNames[6] = "Viernes"
dayNames[7] = "Sábado"

function customDateString() {
	currentDate = new Date()
	var theDay = dayNames[currentDate.getDay() + 1]
	var theMonth = monthNames[currentDate.getMonth() + 1]
	msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	if (msie4) {
	    var theYear = currentDate.getYear()
	}
	else {
	     var theYear = currentDate.getYear() +1900
	}
	return theDay + "  " + currentDate.getDate() + " de " + theMonth + " de " + theYear
}

// Fin fecha
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")

// fin
// Boton derecho
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Copyright © Auto-Matic");
return false;
}
return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

// Fin boton derecho
