// JavaScript Document

var prefsLoaded = false;
var defaultFontSize = 75;
var currentFontSize = defaultFontSize;



function cambiaFuente(fontSize){
	var stObj = (document.getElementById) ? document.getElementById('content_area') : document.all('content_area');
	document.body.style.fontSize = fontSize + '%';
}

function ControlKeyPress()
{
if (event.keyCode == 13)
{
event.returnValue = false;
event.cancel = true;
document.getElementById('btnBuscar').click();
}
}

function modifAction2(url)
{
if (url != "")
{
url = url + "?k=" + document.forms[0].qt.value;
window.open(url,  "BUSCADOR","");
return false;
}
}

/* esta funcion no funciona ya que no funciona bien en Firefox
function ChangeIndex(direccion) {
var hiddenField = document.getElementById('clientresponse');
if (hiddenField != null) {
    var current = hiddenField.value;
    var tmpPages = document.getElementById('TotalPages');
    var totalPages = null;
    if (tmpPages != null) {totalPages = tmpPages.innerText;} 
    var currentDiv = document.getElementById('Div_' + current);
    if (currentDiv != null)  currentDiv.className = 'FAQnoclass';
    if (direccion == 2) {if (parseInt(totalPages) >= (parseInt(current) + 1)) {hiddenField.value = parseInt(current) + 1;}}
    else{ if (current > 1 ){ hiddenField.value = parseInt(current) - 1;}}
    var newDiv = document.getElementById('Div_' + hiddenField.value);
    if (newDiv != null) {newDiv.className='mostrardiv';}
    var show = document.getElementById('CurrentPos');
    if (show != null) {show.innerText = hiddenField.value;}
}
}*/

function ChangeIndex(direccion) {
var hiddenField = document.getElementById('clientresponse');
if (hiddenField != null) {
    var current = hiddenField.value;
    var tmpPages = document.getElementById('TotalPages');
    var totalPages = null;
    if (tmpPages != null) 
	{
		totalPages = tmpPages.innerHTML;
	}
    var currentDiv = document.getElementById('div_' + current);
    if (currentDiv != null)
	{  
		currentDiv.className = 'FAQnoclass';
	}
    if (direccion == 2) 
	{
		if (parseInt(totalPages) >= (parseInt(current) + 1)) 
		{
			hiddenField.value = parseInt(current) + 1;
		}
	}
    else
	{ 
		if (parseInt(current) > 1 )
		{ 
			hiddenField.value = parseInt(current) - 1;
		}
	}
    var newDiv = document.getElementById('div_' + hiddenField.value);
    if (newDiv != null) 
	{
		newDiv.className='mostrardiv';
	}
    var show = document.getElementById('CurrentPos');
    if (show != null) 
	{
		show.innerHTML = hiddenField.value;
	}
}
}


