
function show_hide_report_error_events() {
	document.getElementById("utrop_link").style.display = "none";
	document.getElementById("id_matrix").style.display = "block";
}
function printPage() 
{

	
	var da = (document.all) ? 1 : 0;
	var pr = (window.print) ? 1 : 0;
	
	if(!pr)
		return;
	
	var printArea = document.getElementById("voicearea");
	
	if(printArea == null && da) 
		printArea = document.all.voicearea;
	
	if(printArea) 
	{		
		var sStart = "<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"" + rootdir + pathstructure + "\"><link rel=\"stylesheet\" type=\"text/css\" href=\"" + rootdir + patheditor + "\"><link rel=\"stylesheet\" type=\"text/css\" href=\"" + rootdir + pathunits + "\"></head><body>";
		sStop = "</body></html>";

		var w = window.open('about:blank','printWin','width=650,height=440,scrollbars=yes,toolbar=no,status=yes,resizable=yes,menubar=yes');
		wdoc = w.document;
		wdoc.open();
		wdoc.write( sStart + printArea.innerHTML ) ;
		wdoc.writeln( sStop );
		wdoc.close();
	}
} 


function openEmailDialogue(height, width)
{
	var left = (window.screen.width - width) / 2;
	var top = (window.screen.height - height) / 2;
	var features = 'height=' + height + ',width=' + width + ",left=" + left + ",top=" + top;
	window.open(rootdir + 'DanderydTemplates/emailpage.aspx?id=' + pagelink,null,features);
}

window.onload = function (){
	if((document.getElementById) && (typeof strGoogleTextField != "undefined") && (typeof strGoogleButton != "undefined")){
		var oGoogleTextField = document.getElementById(strGoogleTextField);
		if(oGoogleTextField){
			oGoogleTextField.onfocus = function (oEvent){
				this.select();
			};
			var oGoogleSearchButton = document.getElementById(strGoogleButton);
			if(oGoogleSearchButton){
				oGoogleTextField.onkeypress = function (oEvent){
					var oEvent = (typeof oEvent != "undefined")? oEvent : event;
					if(oEvent.keyCode == 13){
						oEvent.returnValue = false;
						if(oEvent.preventDefault){
							oEvent.preventDefault();
						}
						if(oGoogleSearchButton.click){
							oGoogleSearchButton.click();
						}
					}
				};
			}
		}	
	}
};
