// Funciones Comunes de Dreamweaver y Otras


// RollOver de Imagenes generado por dreamweaver
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];}
}

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


// Para El Menu (RollOver de links) cambia el fono y la letra del a link
function cambiaOver (e) {
	e.style.background='#748269';
	e.style.cursor='hand';
	e.children.tags('A')[0].style.color='#FFFFFF';
}
function cambiaOut (e) {
	e.style.background='';
	e.style.cursor='default';
	e.children.tags('A')[0].style.color='';
}
function cambiaClick (e) {
	e.children.tags('A')[0].click();
	e.children.tags('A')[0].style.color='';
	e.style.cursor='default';
}


// otras Aqui!!!!



 
 
/*
function popup()
	{
		var pag = arguments[0];
		var alto = arguments[1];
		var titulo = "popup";
		var top = 60;
		var ancho = 750;
		var left = 50;
		
		if (isNaN(alto)) {alto=600;}
		if (arguments.length>1) 
			if (arguments[2].length>1) 
				titulo=arguments[2]; 
		if (pag.indexOf('demandas')>=0){ancho=840; alto=640; top=20; left=5; titulo="demanda";}
		bus = window.open (pag,titulo,"width="+ancho+", height="+alto+", menubar=no, scrollbars=yes, resizable=yes, directories=no, status=yes, toolbar=no;");
		bus.moveTo(left,top);
		bus.focus();
	}


function cancelar(url)
{
	window.close();
	//window.location = url;
}

function toParent(url)
{
	//window.close();
	window.opener.location = url;
	window.opener.focus();
}


*/

/* POPUP */
function Popup(url,name,width,height,resize,scroll) {
	var dialogWin = new Object();
	dialogWin.width = width;
	dialogWin.height = height;
	if (navigator.appName == "Netscape") {
		dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
		dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
		var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	} else if (document.all) {
		dialogWin.left = (screen.width - dialogWin.width) / 2;
		dialogWin.top = (screen.height - dialogWin.height) / 2;
		var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	}
	window.open(url,name,attr);
}
	
	
	

/*  AGRANDAR ACHICAR LETRA DE UN ELEMENTO */

var factual = 13;

function aumentarFontSize(texto){

	//var lay = document.getElementById(texto);
	//alert(lay.getAttribute("class"));
	if (factual < 20 ){
		factual++; 
		setFuentes(factual,texto);
	}
}

function reducirFontSize(texto){
	if (factual > 10){
		factual--;
		setFuentes(factual,texto);
	}
}
function setFuentes(fontactual,idtexto){
	var lay = document.getElementById(idtexto);
	try{
		lay.style.fontSize = fontactual + "px";
		lay.style.lineHeight = (fontactual + 3) + "px";
	}catch(e){
		//alert(e.description  + " | " + fontactual + " | " + idtexto)
	}
}



