
 function resizeIframe() {
  var iframe = document.getElementById('relatorio');
  if(iframe != null){
	if(document.all != null){ //IE
		
		iframe.height = iframe.contentWindow.document.body.offsetHeight;
		iframe.width = iframe.contentWindow.document.body.offsetWidth;		
	}
	else
	{ //netscape, mozilla
	
/*		var iframe2 = iframe.contentWindow.document.getElementById('ReportFrameReportViewerControl');
	
		iframe.height = iframe2.document.height + 20;
		iframe.width = iframe2.document.width;
		*/
		
		/*iframe.height = iframe.contentWindow.document.Height;
		iframe.width = iframe.contentWindow.document.Width;*/
		
		iframe.height = iframe.contentWindow.document.body.offsetHeight;
		iframe.width = iframe.contentWindow.document.body.offsetWidth;
		
	}
	/*iframe.scrolling = "no";*/
  }
 }
 
 
function searchSubmit(url)
{
	var element = document.getElementById('keyword');
	var searchKeyWord = encodeURI(element.value);
	if(searchKeyWord.length > 0){
		searchKeyWord = searchKeyWord.replace(/&/, '%26');
		var redirectUrl = url + searchKeyWord;
		document.location = redirectUrl;	
	}
}

function onEnterGoTo(url)
{
	if((event.which && event.which == 13) || 
    (event.keyCode && event.keyCode == 13))
	{
		searchSubmit(url);
		return false;
	}
	return true;
}