// JavaScript Document


 
//Rollover para navegación //////////////////////////////////////////////////////////////////////////////
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
		
var cualpagina=1;

function cogerVariable(variable){
	
    var direccion = location.href; 
	
	var posicion = direccion.indexOf("=") + 1;
	
	
	var final=direccion.length;
	
cualpagina = direccion.substring(posicion,final);
	//alert(posicion + " , " + final);
}

function cualmuestra(){
	cogerVariable("number");
	
	
	if(cualpagina==1){
		modiframe('home.htm','450');
	}
	
	if(cualpagina==2){
		modiframe('empre_distribuidores.htm','554');
	}else{
		modiframe('home.htm','450');
	}
}


function tamanoUni(tamano){
	
	parent.document.getElementById("contenido").height=tamano


}




////-----------------------------------------------



////------------------- ALTURA PANTALLAS  ---------------------
////-----------------------------------------------------------


function quePaginaAbreEsp(pagina) { //v3.0
	 
		switch (pagina){
			case "home":
				modiframe('home.htm','450');
			break;
			
			case "mapa_web":
				modiframe('mapa_web.htm','1010');
			break;
			
			case "casos_reales":
				modiframe('home_casos_real.htm','1955');
			break;
			
			case "noticias":
				modiframe('noticias.htm','1000');
			break;
			
			case "tunstall":
				modiframe('empre_tunstall.htm','712');
			break;
			
			case "tunstall_mundo":
				modiframe('empre_distribuidores.htm','554');
				//modiframe('empre_tunstall.htm','450');
			break;
			
			case "organigrama":
				modiframe('empre_organigrama.htm','450');
			break;
			
			case "pop_organigrama":
				MM_openBrWindow('pop_organigrama.htm','','width=950,height=600');
			break;
			
			case "contacte":
				modiframe('contacto.htm','743');
			break;
			
			case "unidades_domiciliarias":
				modiframe('pro_teleasistencia_uni.htm','880');
			break;
			
			case "unidades_domiciliarias_01":
				modiframe('pro_teleasistencia_uni_1.htm','902');
			break;
			
			case "unidades_domiciliarias_02":
				modiframe('pro_teleasistencia_uni_2.htm','1051');
			break;
			
			case "unidades_domiciliarias_03":
				modiframe('pro_teleasistencia_uni_3.htm','1022');
			break;
			
			case "unidades_domiciliarias_histo_01":
				modiframe('pro_teleasistencia_uni_histo_1.htm','950');
			break;
			
			case "perifericos_01":
				modiframe('pro_teleasistencia_perifericos.htm','714');
			break;
			
			case "perifericos_02":
				modiframe('pro_teleasistencia_perifericos_discap.htm','714');
			break;
			
			case "centros_control":
				modiframe('pro_teleasistencia_centros.htm','605');
			break;
			
			case "centros_control_01":
				modiframe('pro_teleasistencia_cen_1.htm','450');
			break;
			
			case "centros_control_02":
				modiframe('pro_teleasistencia_cen_2.htm','960');
			break;
			
			case "centros_histo_01":
				modiframe('pro_teleasistencia_centros_histo_1.htm','923');
			break;
			
			case "centros_histo_02":
				modiframe('pro_teleasistencia_centros_histo_2.htm','715');
			break;
			
			case "teleasistencia_movil":
				modiframe('pro_teleasistencia_movil.htm','623');
			break;
			
			case "telemedicina":
				modiframe('pro_teleasistencia_medicina.htm','2320');
			break;
			
			case "desarrollo_software":
				modiframe('pro_desarrollo_software.htm','1245');
			break;
			
			case "sistemas_llamadas":
				modiframe('pro_sistemas.htm','450');
			break;
			
			case "sistemas_llamadas_01":
				modiframe('pro_sistemas_1.htm','450');
			break;
			
			case "sistemas_llamadas_02":
				modiframe('pro_sistemas_2.htm','511');
			break;
			
			case "calidad":
				modiframe('empre_calidad.htm','887');
			break;
			
			case "medio_ambiente":
				modiframe('empre_ambiente.htm','1184');
			break;
			
			case "pacto_mundial":
				modiframe('empre_pacto.htm','1343');
			break;
			
			case "ciudad_tunstall":
				window.open('ciudad_tunstall/index.html');
			break;
			
			case "porque_tunstall":
				window.open('por_que_tunstal_esp.pdf');
			break;
			
			case "descripcion_sistema_concento":
				window.open('pdfs/descripcion_del_sistema.pdf');
			break;
			
			case "componentes_instala_concento":
				modiframe('pro_sistemas_1_1.htm','587');
			break;
			
			case "descripcion_sistema_eccoline":
				//window.open('pdfs/descripcion_del_sistema.pdf');
			break;	
			
			case "componentes_instala_eccoline":
				modiframe('pro_sistemas_2_1.htm','587');
			break;
			
			case "pop_itinerarios":
				MM_openBrWindow('pop_itinerarios.htm','','width=600,height=470');
			break;
			
			case "pop_llegar":
				MM_openBrWindow('pop_llegar.htm','','width=375,height=450');
			break;
			
			case "pop_lifeline400":
				MM_openBrWindow('pop_lifeline400.htm','','width=400,height=503');
			break;
			
			case "pop_lifeline4000":
				MM_openBrWindow('pop_lifeline4000.htm','','width=400,height=503');
			break;
			
			case "pop_lifelineconnet1":
				MM_openBrWindow('pop_connect1.htm','','width=400,height=503');
			break;
			
			case "pop_lifelineconnet":
				MM_openBrWindow('pop_connect.htm','','width=400,height=503');
			break;
			
			case "pop_teleasistencia_movil":
				MM_openBrWindow('pop_gps.htm','','width=400,height=503');
			break;
			
			case "pop_concento":
				MM_openBrWindow('pop_concento.htm','','width=400,height=503');
			break;
			
			default:
				modiframe('home.htm','450');
		}
	}



function modiframe(destino,altura)
{
document.getElementById("contenido").src=destino;
document.getElementById("contenido").height=altura;
}


function quePaginaAbreEng(pagina) { //v3.0
	 
		switch (pagina){	
			case "home":
				modiframe('home.htm','450');
			break;
			
			case "mapa_web":
				modiframe('mapa_web.htm','1007');
			break;
			
			case "casos_reales":
				modiframe('home_casos_real.htm','1795');
			break;
			
			case "noticias":
				modiframe('noticias.htm','910');
			break;
			
			case "tunstall":
				modiframe('empre_tunstall.htm','660');
			break;
			
			case "tunstall_mundo":
				modiframe('empre_distribuidores.htm','541');
				//modiframe('empre_tunstall.htm','450');
			break;
			
			case "organigrama":
				modiframe('empre_organigrama.htm','450');
			break;
			
			case "pop_organigrama":
				MM_openBrWindow('pop_organigrama.htm','','width=950,height=600');
			break;
			
			case "contacte":
				modiframe('contacto.htm','743');
			break;
			
			case "unidades_domiciliarias":
				modiframe('pro_teleasistencia_uni.htm','940');
			break;
			
			case "unidades_domiciliarias_01":
				modiframe('pro_teleasistencia_uni_1.htm','877');
			break;
			
			case "unidades_domiciliarias_02":
				modiframe('pro_teleasistencia_uni_2.htm','1026');
			break;
			
			case "unidades_domiciliarias_03":
				modiframe('pro_teleasistencia_uni_3.htm','894');
			break;
			
			case "unidades_domiciliarias_histo_01":
				modiframe('pro_teleasistencia_uni_histo_1.htm','900');
			break;
			
			case "perifericos_01":
				modiframe('pro_teleasistencia_perifericos.htm','709');
			break;
			
			case "perifericos_02":
				modiframe('pro_teleasistencia_perifericos_discap.htm','709');
			break;
			
			case "centros_control":
				modiframe('pro_teleasistencia_centros.htm','600');
			break;
			
			case "centros_control_01":
				modiframe('pro_teleasistencia_cen_1.htm','450');
			break;
			
			case "centros_control_02":
				modiframe('pro_teleasistencia_cen_2.htm','610');
			break;
			
			case "centros_histo_01":
				modiframe('pro_teleasistencia_centros_histo_1.htm','923');
			break;
			
			case "centros_histo_02":
				modiframe('pro_teleasistencia_centros_histo_2.htm','675');
			break;
			
			case "teleasistencia_movil":
				modiframe('pro_teleasistencia_movil.htm','626');
			break;
			
			case "telemedicina":
				modiframe('pro_teleasistencia_medicina.htm','2230');
			break;
			
			case "desarrollo_software":
				modiframe('pro_desarrollo_software.htm','1174');
			break;
			
			case "sistemas_llamadas":
				modiframe('pro_sistemas.htm','450');
			break;
			
			case "sistemas_llamadas_01":
				modiframe('pro_sistemas_1.htm','450');
			break;
			
			case "sistemas_llamadas_02":
				modiframe('pro_sistemas_2.htm','517');
			break;
			
			case "calidad":
				modiframe('empre_calidad.htm','837');
			break;
			
			case "medio_ambiente":
				modiframe('empre_ambiente.htm','1121');
			break;
			
			case "pacto_mundial":
				modiframe('empre_pacto.htm','1391');
			break;
			
			case "ciudad_tunstall":
				window.open('ciudad_tunstall/index.html');
			break;
			
			case "porque_tunstall":
				window.open('por_que_tunstal_eng.pdf');
			break;
			
			case "descripcion_sistema_concento":
				window.open('pdfs/descripcion_del_sistema.pdf');
			break;
			
			case "componentes_intala_concento":
				modiframe('pro_sistemas_1_1.htm','587');
			break;
			
			case "descripcion_sistema_eccoline":
				//window.open('pdfs/descripcion_del_sistema.pdf');
			break;	
			
			case "componentes_instala_eccoline":
				modiframe('pro_sistemas_2_1.htm','587');
			break;
			
			case "pop_itinerarios":
				MM_openBrWindow('pop_itinerarios.htm','','width=600,height=470');
			break;
			
			case "pop_llegar":
				MM_openBrWindow('pop_llegar.htm','','width=375,height=450');
			break;
			
			case "pop_lifeline400":
				MM_openBrWindow('pop_lifeline400.htm','','width=400,height=503');
			break;
			
			case "pop_lifeline4000":
				MM_openBrWindow('pop_lifeline4000.htm','','width=400,height=503');
			break;
			
			case "pop_lifelineconnet1":
				MM_openBrWindow('pop_connect1.htm','','width=400,height=503');
			break;
			
			case "pop_lifelineconnet":
				MM_openBrWindow('pop_connect.htm','','width=400,height=503');
			break;
			
			case "pop_teleasistencia_movil":
				MM_openBrWindow('pop_gps.htm','','width=400,height=503');
			break;
			
			case "pop_concento":
				MM_openBrWindow('pop_concento.htm','','width=400,height=503');
			break;
			
			default:
				modiframe('home.htm','450');
		}
	}


////------------------- FIN ALTURA PANTALLAS ------------------
////-----------------------------------------------------------


////------------------- ESTADO BOTONES NOTICIAS ------------------
////--------------------------------------------------------------

var cual_noticia = 1;

function noticias_n() {
	if (cual_noticia != 1){ 
    document.getElementById("n_01").className="font13 ve_tahoma_azul_oscuro noticias_fondo_n"; 
	}
} 

function noticias_o() {
	if (cual_noticia != 1){ 
    document.getElementById("n_01").className="font13 ve_tahoma_blanco noticias_fondo_o"; 
	}
} 

function informacion_n() {
	if (cual_noticia != 2){ 
    document.getElementById("n_02").className="font13 ve_tahoma_azul_oscuro noticias_fondo_n";   
	}

} 

function informacion_o() {
	if (cual_noticia != 2){  
    document.getElementById("n_02").className="font13 ve_tahoma_blanco  noticias_fondo_o";
	}
} 



function goto_not_info(opcion) {
	
	if(opcion == "noticias"){
    	document.getElementById("n_01").className="font13 ve_tahoma_blanco noticias_fondo_o"; 
    	document.getElementById("n_02").className="font13 ve_tahoma_azul_oscuro noticias_fondo_n"; 
		document.getElementById("noticias").style.display = 'block';
		document.getElementById("informacion").style.display = 'none';
		cual_noticia = 1; 
	}
	
	if(opcion == "informacion"){
    	document.getElementById("n_01").className="font13 ve_tahoma_azul_oscuro noticias_fondo_n"; 
    	document.getElementById("n_02").className="font13 ve_tahoma_blanco noticias_fondo_o"; 
		document.getElementById("noticias").style.display = 'none';
		document.getElementById("informacion").style.display = 'block';
		cual_noticia = 2; 
	}
	
	
	
} 

////---------------- FIN ESTADO BOTONES NOTICIAS ------------------
////---------------------------------------------------------------

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}





/***********************************************
* Tabbed Document Viewer script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/



//Abrir POPUP ///////////////////////////////////////////////////////////////////////////////

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

<!-- boton de reset
<!--
// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this 
// notice with the code.
var resetRolls = new Object();

function resetimage(src)
{
this.src=src;
this.confirm=true;
this.alt="Reset";
this.write=resetimage_write;
}

function resetimage_write()
{
document.write('<A ');
if (this.rollover)
    {
    if (! this.name)
        {
        alert('to create a rollover you must give the image a name');
        return;
        }

    resetRolls[this.name] = new Object();
    resetRolls[this.name].over = new Image();
    resetRolls[this.name].over.src=this.rollover;
    resetRolls[this.name].out = new Image();
    resetRolls[this.name].out.src=this.src;
    document.write(
        ' onMouseOver="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].over.src"' + 
        ' onMouseOut="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].out.src"'
        );
    }
document.write(' HREF="javascript:');
if (this.confirm)
    document.write('if(confirm(\'¿ASeguro que quieres borrar?\'))');
document.write(
    'document.forms[' + 
    (document.forms.length - 1) + '].reset();void(0);">');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '"');
document.write(' BORDER=0');
if (this.name)document.write(' NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' '+ this.otheratts);
document.write('></A>');
}//-->


function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
		thefield.value = ""
}

//validador de formulario/////////////////////////////////////////////////////////////////////////
<!--
function validamelo(){
	var theForm = document.form1;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var errMsg = "";
	var setfocus = "";
	
	
	if (!emailRE.test(theForm['$email'].value)){
		errMsg = "Inserte su dirección de corrreo electrónico";
		setfocus = "['$email']";
	}
	if (theForm['$telefono'].value == ""){
		errMsg = "Inserte su teléfono";
		setfocus = "['$telefono']";
	}
	/*if (theForm['$mandar'].checked != "checked"){
		errMsg = "Seleccione como desea que contactemos con ustéd";
		setfocus = "['$mandar']";
	}*/
	if (theForm['$mensaje'].value == ""){
		errMsg = "Inserte el mensaje";
		setfocus = "['$mensaje']";
	}
	if (theForm['$nombre'].value == ""){
		errMsg = "Inserte su nombre";
		setfocus = "['$nombre']";
	}
	
	
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	//else theForm.action = "sendForm/sendForm.php";
	
	else theForm.submit();
	
	//alert("ppppppppppppppppppppfdsfpdsfpsfpsdfpdpsddpfkpsd"); 
	
	
}


function validamelo2(){
	var theForm = document.form1;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var errMsg = "";
	var setfocus = "";
	
	
	if (!emailRE.test(theForm['$email'].value)){
		errMsg = "Fill in your E-mail address";
		setfocus = "['$email']";
	}
	if (theForm['$telefono'].value == ""){
		errMsg = "Fill in your telephone number";
		setfocus = "['$telefono']";
	}
	/*if (theForm['$mandar'].checked != "checked"){
		errMsg = "Seleccione como desea que contactemos con ustéd";
		setfocus = "['$mandar']";
	}*/
	if (theForm['$mensaje'].value == ""){
		errMsg = "Write a message";
		setfocus = "['$mensaje']";
	}
	if (theForm['$nombre'].value == ""){
		errMsg = "Fill in your name";
		setfocus = "['$nombre']";
	}
	
	
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	//else theForm.action = "sendForm/sendForm.php";
	
	else theForm.submit();
	
	//alert("ppppppppppppppppppppfdsfpdsfpsfpsdfpdpsddpfkpsd"); 
	
	
}

//-->
