var tags = new Array( 'td','tr','p','b','strong','emphasis','a','h1','h2','pre','sub','sup','i','th','cp','ul','ol','li','dt','dd','label');
var pixelArray = new Array('11','11','11');
var pixelArray2 = new Array('17','20','22');	// usado para los tags h3
var pixelArray3 = new Array('10','12','14');	// usado para los tags h6
var emArray =  new Array('1','1.1','1.2');
var initSize = 2;

function fontSizer(inc,unit) {
	if (!document.getElementById) 
		return;
	var size = initSize;
		size += inc;
	if (size < 0 ) {
		size = 0;
	}
	if (size > 2 ) {
		size = 2;
	}
	initSize = size;
	getBody = document.getElementsByTagName('body')[0];

	for (i = 0 ; i < tags.length ; i++ ) {
		getallTags = getBody.getElementsByTagName(tags[i]);
		for (k = 0 ; k < getallTags.length ; k++) 
			getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
	}
	
	unit = 'px';
	getallTags = getBody.getElementsByTagName('h3');
	for (k = 0 ; k < getallTags.length ; k++) 
		getallTags[k].style.fontSize = (unit=='px') ? pixelArray2[size]+unit: emArray[size]+unit;
		
	getallTags = getBody.getElementsByTagName('h6');
	for (k = 0 ; k < getallTags.length ; k++) 
		getallTags[k].style.fontSize = (unit=='px') ? pixelArray3[size]+unit: emArray[size]+unit;
		
	getallTags = getBody.getElementsByTagName('table');
	for (k = 0 ; k < getallTags.length ; k++)
		getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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);
}

function ventanaSecundaria (URL) { 	
	window.open (URL, 'ventana', "width=300, height=250, scrollbars=no, menubar=no, location=no, resizable=no") 
}

function ventanaSecundaria2 (URL) { 	
	window.open (URL, 'ventana', "width=700, height=600, scrollbars=no, menubar=no, location=no, resizable=no") 
}

function irOPC(){
	//alert("entra");
	
	myform=document.frmSearch;
	valorSelect= myform.OPC.options[myform.OPC.selectedIndex].value;
	
	//alert("valoerSelect="+valorSelect);
	
	if(valorSelect!=0 && valorSelect!=-1){
		window.location= valorSelect;
	}else if(valorSelect!=0){alert("Deberás selecionar una opción");
	}else alert("Lo sentimos pero esta opción no disponible en estos momentos.");
}
function abribFoto(myfile){
	var win = window.open(myfile, "win", "toolbar=0, menubar=0, status=0, location=0");	
	win.focus();
}
function verImagen(){
	//alert("- Entra -");
	var miElemt = document.getElementsByName("nameHiddeImg");
	for(nImg=0; nImg < miElemt.length; nImg++){
		//alert(miElemt[nImg].width);
		miElemt[nImg].width='210px';
		miElemt[nImg].height='125px';
		miElemt[nImg].style.width='210px';
		miElemt[nImg].style.height='125px';
	}
}
function verImagenPeq(){
	var miElemt = document.getElementsByName("nameHiddeImg");
	for(nImg=0; nImg < miElemt.length; nImg++){
		miElemt[nImg].width='120px';
		miElemt[nImg].height='70px';
		miElemt[nImg].style.width='120px';
		miElemt[nImg].style.height='70px';
	}
}
function goTo (url) {
	document.miFormulario.action = url;
	document.miFormulario.submit();
}
function viewServices(view){
//alert(view);
	serv= document.getElementById("cont-services");	
	if(view == 1){
		serv.style.visibility='visible';
		//alert("=1");
	}else{
		serv.style.visibility='hidden';
		//alert("!=1");
	}
}
