// JavaScript Document
// Este documento contiene todas las funciones creadas por eventos en DreamWeaver y que por defecto son colocadas en el head de cada documento. Creado por A.Pedroso 16/ 09 / 2008
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
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];}
}
// FIN funciones creadas por DreamWeaver -------------------------------------------------------------------------
// Funciones que controlan la aparición de noticias en el home
function noticia1(){
var inner = "<table border='0' cellspacing='0' cellpadding='0'>";
inner += "<tr>";
inner += "<td width='50'><img src='imgindex/tips01.gif' width='70' height='70' align='left'></td>";
/*TITULO*/
inner += "<td width='220' class='tipstext'><span class='tipssubtit'><a href='personas/07_mel_seguridad.html'>IMPORTANTE<br> Se trata de su seguridad</a></span><br>";
/*CONTENIDO*/
inner += "Mercantil ha creado esta secci&oacute;n para que usted est&eacute; informado de c&oacute;mo prevenir y evitar ser v&iacute;ctima del fraude tecnol&oacute;gico.</td>";
inner += "</tr>";
inner += "</table>";

var table = document.getElementById("tips1");
table.innerHTML = inner;
}

function noticia2(){
var inner = "<table border='0' cellspacing='0' cellpadding='0'>";
inner += "<tr>";

/*TITULO*/
inner += "<td width='220' class='tipstext2'><span class='tipssubtit'><a href='noticias/2007/Febrero_14_Fondonorma.pdf' target='_blank'>FONDONORMA otorgó<br> certificación ISO 9001:2000</a></span><br>";
/*CONTENIDO*/
inner += "A 4 nuevas líneas de servicio de MERCANTIL y ratificó las certificaciones obtenidas en el año 2006.</td>";
/*IMAGEN*/
inner += "<td width='50'><img src='imgindex/tips03.gif' align='right'></td>";
inner += "</tr>";
inner += "</table>";

var table = document.getElementById("tips2");
table.innerHTML = inner;
}
//FIN funciones de noticias--------------------------------------------------------------------------------------
// Estas funciones tienen que ver con el control de los desplegables
function despliegueCapa(id){
	obj = document.getElementById(id)
	estado = obj.style.display
		if (estado == 'none'){
		obj.style.display = ""
		}
			else {
				obj.style.display = 'none' }
}

function ocultarCapa(id){
	obj = document.getElementById(id)
	estado = obj.style.display
		if (estado == ''){
		obj.style.display = "none" }
}

function cambioFlecha(img_name){
	obj = document.getElementById(img_name)
	estado = obj.style.filter
		if (estado == 'none'){
		//obj.style.filter = "Flipv"
		obj.style.filter = "Flipv" 
			estado = "none"
		}
			else {
			obj.style.filter = "none"
			}
}

function cambioFlechainv(img_name){
	obj = document.getElementById(img_name)
	estado = obj.style.filter
		if (estado == 'none'){
		//obj.style.filter = "none"
		obj.style.filter = "none" 
		}
			else {
			obj.style.filter = "Fliph"
			estado = "none"
			}
}
// funciones desplegable 2 --------------------
function muestra(id){
	obj = document.getElementById(id)
	estado = obj.style.display
		if (estado == 'none'){
		obj.style.display = ""
		}
		else {
		obj.style.display = ''
		}
}

function oculta(id){
	obj = document.getElementById(id)
	estado = obj.style.hidden
		if (estado == 'none'){
		obj.style.display = ""
		}
		else {
		obj.style.display = 'none'
		}
}
 
function ambos(id){
	obj = document.getElementById(id)
	estado = obj.style.display
		if (estado == 'none'){
		obj.style.display = ""
		}
		else {
		obj.style.display = 'none'
		}
}
//FIN funciones para controlar los desplegables
// Funciones viejas de CyberMedia / Neoris ***********************************************************************
//Libreria de funciones que utiliza el site de Banco Mercantil
//Funcion para obtener parametros

function ParseCybermedia() 
	{
	  par = new String(window.location);
	  loc = par.indexOf("?");
	  par = par.substr(loc+1);
	  arreglo=par.split("&");
	  this.nombre = new Array();
	  this.valor = new Array();
	     for (var i=0; i < arreglo.length; i++) {
			  ArreTemp = arreglo[i].split("=");
			  this.nombre[i] = ArreTemp[0];
			  this.valor[i]  = ArreTemp[1];
	     }
	}

//Funcion para buscar parametros
function Buscar(A,Campo)
	{
	for (var i=0; i < A.nombre.length ; i++)
		 {
	   		if (A.nombre[i] == Campo){
				return (A.valor[i]);
			}
		}
	return ("nulo");
	}