function ResizeMe()
{
	document.getElementById('FrameContenidos').height=document.frames('FrameContenidos').document.body.scrollHeight;
}
function ResizeMe1()
{
	document.getElementById('LeftPrivada').height=document.frames('LeftPrivada').document.body.scrollHeight;
}
/*function Enlarge()
		{
			var img=new Image();
			img.src=event.srcElement.src;
			window.showModelessDialog(event.srcElement.src,'','dialogHeight:' + img.height + 'px;dialogWidth:' + img.width + 'px;resizable:1;');
		}*/
function Enlarge()
	{
	var img=new Image();
	img.src=event.srcElement.src;
	var w = img.width + 8;
	var h = img.height + 48;
	window.showModelessDialog(event.srcElement.src,'','dialogHeight:' + h + 'px;dialogWidth:' + w + 'px;resizable:1;');
	}

//*** Buscar function ***
function InitSearch()
{
	if (status=='ready')
	{
		var bWnd=window.open('buscador_web_api.aspx',null,'width=430,height=280,status=no,toolbar=no,menubar=no,location=no,left=' + (screen.Width-430)/2 + ',top=' + (screen.Height-320)/2,true);
		bWnd.focus();
	}
}

function TestKey()
{
	var tasta=event.keyCode;
	if ((tasta<=47)||(tasta>=58))
	{
		return false;
	}
}

function TestKeyEnter()
{
	var tasta=event.keyCode;
	if ((tasta<=47)||(tasta>=58))
	{
		if (tasta!=13) return false;
	}
}
//*** Users TAAF Web ***
function CheckAll_Click(ParentName, ControlName)
{
try
	{
	var blnCheck = event.srcElement.checked;
	var intNumElm = document.Form1.elements.length;

	for (var i = 0; i < intNumElm; i++)
		{
		var Elm = document.Form1.elements[i];
		var strId = Elm.id;
		var RExp = new RegExp('^' + ParentName + '__ctl[0-9]{1,}_' + ControlName + '$',"g");
		var intPos = strId.search(RExp);
		
		if (intPos == 0)
			{
			var strTag = Elm.tagName
			
			if (strTag == 'INPUT')
				{
				if (Elm.type == 'checkbox')
					{
					Elm.checked = blnCheck;
					}
				}
			}
		}
	}
catch (ex)
	{
	alert('error check all');
	}
}
//**********************
function historyback(t)
		{
			for (i=0;i<t;i++) history.back(i);
		}