//<script>
/****************************************************************** 
			Funcion  que Crea  una presentacion para las imagenes
******************************************************************/

/*  Pagina Inicial "INDEX.htm"*/
NewImg = new Array (
"img/img_01.jpg",
"img/img_02.jpg",
"img/img_03.jpg",
"img/img_04.jpg",
"img/img_05.jpg"
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;

//Tiempo de Espera para cambiar las imagenes
var delay = 3000;

var lock = false;
var run;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg[ImgNum];
   }
}
function auto() {
if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("chgImg(1)", delay);
   }
}


/****************************************************************** 
		Funcion de Visualizacionde Noticias // Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
*******************************************************************/
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()

lstart=100
loop=true
// Velocidad
speed=40
pr_step=1

function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.newsScroll=newsScroll;
	this.moveIt=b_moveIt; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}
function b_moveIt(x,y){
	this.x=x;this.y=y
	this.css.left=this.x
	this.css.top=this.y
}
function newsScroll(speed){
	if(this.y>-this.scrollHeight){
		this.moveIt(0,this.y-pr_step)
		setTimeout(this.obj+".newsScroll("+speed+")",speed)
	}else if(loop) {
		this.moveIt(0,lstart)
		eval(this.obj+".newsScroll("+speed+")")
	  }
}
function newsScrollInit(){
	oNewsCont=new makeObj('divNewsCont')
	oNewsScroll=new makeObj('divNewsText','divNewsCont')
	oNewsScroll.moveIt(0,lstart)
	oNewsCont.css.visibility='visible'
	oNewsScroll.newsScroll(speed)
}

/****************************************************************** 
		Funcion para Los mensajes en la Barra de Estado
******************************************************************/
function stopBanner() 
{
	if (bannerRunning)
	clearTimeout(timerID)
	bannerRunning = false
}

function startBanner() 
{
	stopBanner()
	showBanner()
}
function showBanner() {
	var text = ar[currentMessage]
	if (offset < text.length) 
	{
		if (text.charAt(offset) == " ")
		offset++ 
		var partialMessage = text.substring(0, offset + 1) 
		window.status = partialMessage
		offset++ // IE sometimes has trouble with "++offset"
		timerID = setTimeout("showBanner()", speed)
		bannerRunning = true
	} else
	{
		offset = 0
		currentMessage++
		if (currentMessage == ar.length)
		currentMessage = 0
		timerID = setTimeout("showBanner()", pause)
		bannerRunning = true
	}
}

/* Adicionar al Template Base  y asi heredaran todas lo siguiente

<script language="JavaScript">

var speed = 100  // velocidad del Texto
var pause = 3000 // Tiempo de Espere entre  texto  y texto
var timerID = null
var bannerRunning = false
var ar = new Array() // Arreglo donde estaran todos los textos a mostrar no importa la cantidad
ar[0] = "MDR. ESPECIALES EN SERVICIOS"
ar[1] = "MDR. MEJORAMIENTO CONTINUO"
ar[2] = "MDR. LIDERES EN SERVICIOS"
ar[3] = "MDR. Y SU INGENIERIA"
ar[4] = "MDR. EN EL CAMBIO"
ar[5] = "MDR. EN LA EVOLUCIÓN"
ar[6] = "MDR. EN SINERGIA"
ar[7] = "MDR. ATENCIÓN ESMERADA"
ar[7] = "MDR. EN TECNOLOGÍA"
var currentMessage = 0
var offset = 0

startBanner();
// -->
</script>

*/