// JavaScript Document<script language="JavaScript" type="text/JavaScript">
/*****************************************************************************
Scroll de noticias con foto. Script creado por Tunait! (27/3/2004)
Si quieres usar este script en tu sitio eres libre de hacerlo con la condición de que permanezcan intactas estas líneas, osea, los créditos.
No autorizo a publicar y ofrecer el código en sitios de script sin previa autorización
Si quieres publicarlo, por favor, contacta conmigo.
http://javascript.tunait.com/
tunait@yahoo.com 
******************************************************************************/
var ancho = 550 //anchura del cuadro
var alto = 300 //altura del cuadro
var marco = 0 //0 para que notenga marco (borde)
var fondo = '#FFFFFF' //color de fondo del cuadro
var pausilla = 2000 //tiempo de la pausa en milisegundos (2000 = 2 segundos)
var destino = "MarcoPrincipal" //target en donde se quiera que se carguen los enlaces, en caso de usarlos.
var cursor = "default;"  //cursor que se quiera sobre el cuadro
var colTitular = '#ff6600' //color del texto del titular
var colTexto = '#333333' // color del texto de la noticia
var colFecha = '#ff3300' //color del texto de la fecha
var colEnlace = '#000099' //color del texto del enlace
var fuente = "arial" //fuente para los textos 
var tamTitular = '14' //tamaño de la fuente del titular
var tamTexto = '12' //tamaño de la fuente del texto de la noticia
var tamFecha = '10' // tamaño de la fuente de la fecha
var tamEnlace = '11' // tamaño de la fuente del enlace 
var alinImagen = 'left'//alineaci&oacute;n de la imagen
var margImagen = '3'//margen alrededor de la imagen
var masInfo = true //Determina si se usa o no el enlace. true para usarlo. false para omitirlo
var poneFecha = false //true para poner fecha. false para omitirla. Si no se quiere fecha, dejar las comillas vacías ""
function noticia(titular,texto,fecha,enlace,destino,imagen)
	{
	this.titular = titular
	this.texto = texto
	this.imagen = imagen
	this.fecha= fecha
	this.enlace = enlace
	this.destino = destino
	}
var noticias = new Array()
noticias[0]= new noticia("CLAUSURA DE NUESTRO CURSO Y CUARTO ENCUENTRO EMPRENDEDOR","SE LLEVO A CABO EL CUARTO ENCUENTRO EMPRENDEDOR ORGANIZADO POR LA INCUBADORA DE PROYECTOS PRO OAXACA A.C. EL DIA 7 DE NOVIEMBRE DE ESTE ANO.","","","","noticias-img/curso3.jpg")
noticias[1]= new noticia("CONOCE LOS ASPECTOS LEGALES PARA TU EMPRESA","TE INVITAMOS A NUESTRA PLATICA GRATUITA DONDE PODRAS CONOCER LOS ASPECTOS LEGALES PARA TU EMPRESA EL DIA 11 DE NOVIEMBRE DEL AÑO EN CURSO","NOVIEMBRE 2009","#","",null)
noticias[2]= new noticia("MOTIVACION PARA EMPRENDEDORES","VEN A NUESTRA PLATICA GRATUITA DE MOTIVACION EL DIA 18 DE NOVIEMBRE DEL AÑO EN CURSO","NOVIEMBRE 2009","#","",null)
noticias[3]= new noticia("TALLERES Y CONFERENCIAS FISCALES 2010","SE INVITA PARA QUE PARTICIPEN EN LOS CURSOS Y TALLERES FISCALES OFRECIDOS EN LA ADMINISTRACION LOCAL DE SERVICIOS AL CONTRIBULLENTE, A REALIZARSE EN EL MES DE OCTUBRE DEL AÑO EN CURSO","OCTUBRE 2009","http://www.incubaprooaxaca.org/incubadora-fiscal.html","","noticias-img/sat.jpg")
noticias[4]= new noticia("V PREMIO SANTANDER A LA INNOVACION EMPRESARIAL","GRUPO SANTANDER Y LA SECRETARIA DE EDUCACION PUBLICA, EN COLABORACION CON LA ASOCIACION NACIONAL DE UNIVERSIDADES E INSTITUCIONES DE EDUCACION SUPERIOR Y EL CONSEJO COORDINADOR EMPRESARIAL, CONVOCAN AL V PREMIO SANTANDER A LA INNOVACION EMPRESARIAL. EL OBJETIVO DE LA CONVOCATORIA ES ESTIMULAR EN LOS ESTUDIANTES UNA CULTURA EMPRENDEDORA QUE PERMITA DESARROLLAR SU CAPACIDAD PARA DISEÑAR Y REALIZAR PROYECTOS EMPRESARIALES INNOVADORES.","","http://www.premiosantander.com.mx/web2009/index.php","","noticias-img/santander.jpg")
noticias[5]= new noticia("GUIAS EMPRESAREALES","LA SECRETARIA DE ECONOMIA, A TRAVES DE CONTACTO PYME, OFRECE A LOS EMPRESARIOS Y EMPRENDEDORES, GUIAS PARA INSTALAR O MEJORAR SU NEGOCIO. CON ESTAS GUIAS EL EMPRENDEDOR CONOCERA LOS ASPECTOS BASICOS QUE DEBE TOMAR EN CUENTA PARA INSTALAR O MEJORAR UN NEGOCIO. ESTE MATERIAL HA SIDO DESARROLLADO POR CONSULTORES CON AMPLIA EXPERIENCIA EN EL TEMA.","","http://www.fonaes.gob.mx/ge001.html","","noticias-img/fonaes.jpg")
noticias[6]= new noticia("ADVIERTE PROFECO DE PRACTICAS ABUSIVAS EN VENTA DE PRODUCTOS Y/O SERVICIOS","NOTA ACLARATORIA: PROFECO MEDIANTE SU PROGRAMA QUIEN ES QUIEN EN LOS PRECIOS RECOPILA PRECIOS AL MAYOREO Y MENUDEO DE MAS DE 3,600 PRODUCTOS, RECOLECTANDOLOS LOS CINCO DIAS HABILES DE LA SEMANA EN MAS DE 1,200 ESTABLECIMIENTOS DE 26 CIUDADES DEL PAIS. OBTENGA E IMPRIMA EL FORMATO DE SOLICITUD DE INFORMACION DE PRECIOS HISTORICOS DEL PROGRAMA -QUIEN ES QUIEN EN LOS PRECIOS Y SER UN CONSUMIDOR INFORMADO","","#","","noticias-img/profeco.jpg")
noticias[7]= new noticia("CURSO DE HABILIDADES EMPRESARIALES","ESTE CURSO TE AYUDAR A SABER COMO MANEJAR TU NEGOCIO, A DESARROLLAR LAS HERRAMIENTAS Y ESTRATEGIAS NECESARIAS PARA APRENDER A ADMINISTRARLO,      MODULOS: 1.-DESARROLLO HUMANO, 2.-MERCADOTECNIA, 3.-PRODUCCIÓN, 4.-CONTABILIDAD Y FINANZAS, 5.-SIMULADOR DE NEGOCIOS","","http://www.incubaprooaxaca.org/incubadora-curso.html","","noticias-img/curso.jpg")
noticias[8]= new noticia("ENVIANOS TUS DUDAS O COMENTARIOS","ENVIANOS TUS DUDAS O COMENTARIOS DESDE ESTA PAGINA WEB, SOLO INGRESA A NUESTRA LIGA CONTACTANOS Y PODRAS ESCRIBIRNOS SIN NECESIDAD DE ENTRAR A TU CUENTA DE CORREO ELECTRONICO.","","http://www.incubaprooaxaca.org/incubadora-contactanos.html","",null)
noticias[9]= new noticia("CASOS DE EXITO","ML MATEOS Y EN MADERA EMPRESAS INCUBADAS EN LA INCUBADORA DE PROYECTOS PRO OAXACA A.C.","","#","","noticias-img/exito.jpg")

var det = false
var hayIma, claseIma
function escribe(){
document.write ('<div id="mami" style="width:' + ancho + '; height:' + alto + 'px; position:relative;  overflow:hidden ">')
document.write('<table border = "' + marco + '" width="' + ancho + '" height="100%"><tr><td valign="top">')
document.write ('<div id="uno" style="top:' + alto +'; width:' + ancho + 'px; height:' + alto + 'px;  ">')
document.write ('<div class="titular">')
document.write (noticias[0].titular)
document.write ('</div>')
if(noticias[0].imagen != null){
	hayIma = true
	claseIma = 'imagen'
	}
else{
	hayIma = false
	claseIma = 'noImagen'
	}
document.write ('<div class="' + claseIma + '">')
document.write ('<img width="150" height="80" src="' + noticias[0].imagen + '">')
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[0].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[0].texto)
document.write ('</div>')
if(masInfo == true){
	

/*	document.write(noticias[0].enlace)
	if(noticias[0].enlace != ""){ */
		
	document.write ('<a class="enlace" href="')
	document.write (noticias[0].enlace)
	
	
	if(noticias[0].destino == ""){
		document.write ('">Ir a Notica...</a>')
	}
	else{
		document.write ('" target = "' + noticias[0].destino + '">Ir a Notica...</a>')
		}
//	document.write ('" target = "' + noticias[0].destino + '">Ir a Notica...</a>')
	//}

	}
document.write ('</div>')
document.write ('<div id="dos" style="top:' + (alto*2) +'; width:' + ancho + 'px; height:' + alto + 'px; ">')
document.write ('<div class="titular">')
document.write (noticias[1].titular)
document.write ('</div>')
if(noticias[1].imagen != null){
	hayIma = true
	claseIma = 'imagen'
	}
else{
	hayIma = false
	claseIma = 'noImagen'
	}
document.write ('<div class="' + claseIma + '">')
document.write ('<img width="150" height="80" src="' + noticias[1].imagen + '">')
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[1].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[1].texto)
document.write ('</div>')
if(masInfo == true){
	

	
/*	document.write(noticias[1].enlace)

	if(noticias[1].enlace != ""){ */
	document.write ('<a class="enlace" href="')
	document.write (noticias[1].enlace)


	if(noticias[1].destino == ""){
		document.write ('">Ir a Notica...</a>')
	}
	else{
		document.write ('" target = "' + noticias[1].destino + '">Ir a Notica...</a>')
		}


//	document.write ('" target = "' + noticias[1].destino + '">Ir a Notica...</a>')
//	}
	
	}
document.write ('</div>')
document.write('</td></tr></table>')
document.write ('</div>')
if(navigator.appName == "Netscape")
{altoUno = document.getElementById('uno').offsetHeight}
else
{altoUno = document.getElementById('uno').clientHeight}
document.getElementById('uno').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('uno').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	escrolea()
	}
document.getElementById('dos').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('dos').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	 escrolea()
	 
	}
}
desp = 1
var cont = 1
var pos,pos2
function escrolea(){
pos = document.getElementById('uno').style.top
pos = pos.replace(/px/,"");
pos = pos.replace(/pt/,"");
pos = new Number(pos);
pos2 = document.getElementById('dos').style.top
pos2 = pos2.replace(/px/,"");
pos2 = pos2.replace(/pt/,"");
pos2 = new Number(pos2);
pos -= desp
pos2 -= desp
if (pos == desp){
	var contenidos = ""
	document.getElementById('dos').style.top = alto
	document.getElementById('dos').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
	if(noticias[cont].imagen != null){
		document.getElementById('dos').childNodes[1].firstChild.src = noticias[cont].imagen
		document.getElementById('dos').childNodes[1].className = 'imagen'
		}
	else{
		document.getElementById('dos').childNodes[1].className = 'noImagen'
		}
	if(poneFecha == true){
	document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].fecha
	}
	document.getElementById('dos').childNodes[3].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('dos').childNodes[4].href = noticias[cont].enlace 
		}
	document.getElementById('uno').style.top = 0
	if(cont == noticias.length-1)
		{cont=0}
	else{
		cont++
		}
	pausa()
	return false
	}
else{
	if (pos2 == desp){
		var contenidos = ""
		document.getElementById('uno').style.top = alto
		document.getElementById('uno').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
		if(noticias[cont].imagen != null){
		document.getElementById('uno').childNodes[1].firstChild.src = noticias[cont].imagen
		document.getElementById('uno').childNodes[1].className = 'imagen'
		}
	else{
		document.getElementById('uno').childNodes[1].className = 'noImagen'
		}
		if(poneFecha == true){
		document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].fecha
		}
		document.getElementById('uno').childNodes[3].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('uno').childNodes[4].href  = noticias[cont].enlace
		}
		document.getElementById('dos').style.top = 0
		if(cont == noticias.length-1)
		{cont=0}
	else{
		cont++
		}
		pausa()
		return false
		}
	else{
		document.getElementById('uno').style.top = pos
		document.getElementById('dos').style.top = pos2
		}
	}
tiempo = window.setTimeout('escrolea()',10)
}
var tiempo
function pausa()
{
clearTimeout(tiempo)
if (det == false){
	tiempo = setTimeout ('continuar()',2000)
	}
}
function continuar()
{
if(det == false)
	{escrolea()}
}
document.write('<style type="text/css">')
document.write ('#uno {')
document.write ('color: #006699;')
if(cursor == "pointer" || cursor == "hand"){
cursor = (navigator.appName == "Netscape")?'pointer;':'hand;';
}
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('#dos {')
document.write ('color: #006699;')
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('.titular{')
document.write ('color:' + colTitular +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamTitular + ';font-weight:bold}')
document.write ('.texto{')
document.write ('color:' + colTexto + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamTexto + ';}')
if(poneFecha == true){
document.write ('.fecha{')
document.write ('color:' + colFecha +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamFecha + ';font-weight:bold}')
}
else{
document.write ('.fecha{display: none;}')
}
document.write ('.enlace{')
document.write ('color:' + colEnlace + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamEnlace + ';}')
document.write ('.imagen{')
document.write ('text-align:' + alinImagen + ';')
document.write ('margin: ' + margImagen + 'px;}')
document.write ('.noImagen{display:none;}')
document.write ('</style>')

