<!--

//

function reconocerNavegador()

{

	navegador = document.write(navigator.appName + " " +navigator.appVersion);

	return navegador;

}

//---

function openVent(winName, theURL, features) {

	window.open(theURL,winName,features);

}

//---

function showHiddenVna(txt) {

	obj = document.getElementById(txt);

	objLn = document.getElementById(txt+"Ln");

	if (obj.style.display == "block") {

		obj.style.display = "none";

		objLn.style.display = "block";

	} else {

		obj.style.display = "block";

		objLn.style.display = "none";

	}

}

//---

function manejaComentario (obj, objDest, indice) {

	document.getElementsByName(objDest)[indice].disabled = !obj.checked;

}

//---

function controlAgrupador (obj) {

	if (soloNumeros(obj.value)) {

		//

		document.forms[0].action = "cambiaElementoAgrupador.php";

		document.forms[0].method = "GET";

		//

		var loc = "";

		var locat = document.location;

		locat = locat.toString();

		var locArr = locat.split("&");

		//	

		for (var i=0; i<locArr.length; i++)

		{

			loc += (locArr[i].indexOf("rel=") == -1) ? locArr[i] +"&": "";

		}

		document.forms[0].locat.value = loc.substring(0,loc.length-1);

		document.forms[0].submit();

		//

		return true;

	}

	else {

		txt = obj.value;

		obj.value = txt.substring(0,txt.length-1);

	}

}

//---

function soloNumeros(txt){

	var charPermitido = "1234567890";

	for (var i=0; i < txt.length; i++) {

		if (charPermitido.indexOf(txt.charAt(i)) == -1) return false;

	}

	return true;

}

//---

function openWindowTipol(ide, idt){

	openVent("Tipologias", "copyTipologiaScr.php?id="+ide+"&idt="+idt, "status=yes, scrollbars=yes,resizable=yes,width=300,height=450");

	return true;

}

//

recorreFormulario = function (frm,urlToNext,cont) {

	//--------

	if (urlToNext == "") return false;

	var ArrField = new Array();

	var ArrValue = new Array();

	var urlActual = window.location.href;

	var pos = 0;

	for (var i=0; i<frm.elements.length; i++){

		if ((frm.elements[i].type != "button") && (frm.elements[i].type != "submit") && (frm.elements[i].type != "reset")){

			ArrField[ArrField.length] = frm.elements[i].name;

			ArrValue[ArrValue.length] = frm.elements[i].value;

		}

	}

	// ----- 

	var txtArrField = "" + ArrField;

	var txtArrValue = "" + ArrValue;

	//

	document.frmTemp.action = "scriptMiddScript.php";

	document.frmTemp.method="post";

	document.frmTemp.fieldsName.value = txtArrField;

	document.frmTemp.fieldsValue.value = txtArrValue;

	document.frmTemp.urlToBack.value = urlActual;

	document.frmTemp.urlToNext.value = urlToNext;

	document.frmTemp.cont.value = cont;

	document.frmTemp.submit();

	//

}

//-------- funsiones para el alta embebed en el reporte
altaRegAjaxInReport = function ()
{
	var obj = document.getElementById("tdAltaNewReg");
	var objLn = document.getElementById("tdAltaNewRegLn");
	if (obj.style.display == "none") {
		obj.style.display = "block";
		objLn.style.display = "block";
	} else {
		obj.style.display = "none";
		objLn.style.display = "none";
	}
}
altaRegAjaxReport = function (band)
{
	for (var i=0; i<document.frmAltaAjaxReport.elements.length; i++)
	{
		if (document.frmAltaAjaxReport.elements[i].type != "submit" && document.frmAltaAjaxReport.elements[i].type != "buttom")
		{
			//ver de continuar
		}
	}
}
//---------------------------------------------------------------------
function muestraFotoGrande(idnoticia,idfoto)
{
	var izquierda = (screen.availWidth - 700) / 2; var arriba = (screen.availHeight - 530) / 2;
	win=window.open('','Vista_Foto','top='+arriba+',left='+izquierda +',height=530,width=700,resizable=0,scrollbars=0');

	cuerpo = innerHTML = "<center><img src='fotonoticia/"+idnoticia+"/big_"+idfoto+"' width='670' height='500' style=\"border:3px solid #999999;\"></center>";
	//alert(cuerpo);
	win.document.write(cuerpo);
}
//---------------------------------------------------------------------
function control()
{
	location = 'index.php?cont=control.inc.php';
}
//---------------------------------------------------------------------
function rss()
{
	//alert("-");
}
//---------------------------------------------------------------------
function moverPagina(valor,pagactual,totalpaginas)
{
	varnropagina = pagactual;
	//
	if(valor == "-1")
	{
		if(pagactual > 1) var nropagina = parseInt(pagactual) - 1;
		else return;
	}
	//
	if(valor == "+1")
	{
		if(pagactual < totalpaginas) var nropagina = parseInt(pagactual) + 1;
		else return;			
	}
	//		
	location = 'index.php?idp='+nropagina;
}
//---------------------------------------------------------------------


//-->