﻿
// Navigate back one page
function GoBack() {        
    history.go(-1); 
}

function nw(){
    document.blank;
    }

// Brady - 7.17.2006 - Fire click event for buttons associated with textboxes
/* NOTE: The following attribute must be added for each txtbox so enter key triggers button.click event:         
         * SearchDrawings.aspx as an example
         Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Me.txtNSN.Attributes.Add("onkeypress", "return clickButton(event,'" & cmdSearchNSN.ClientID & "')")
            Me.txtDrawing.Attributes.Add("onkeypress", "return clickButton(event,'" & cmdSearchDocNo.ClientID & "')")
         End Sub
*/
function clickButton(e, buttonid) { 
  var bt = document.getElementById(buttonid); 
  if (typeof bt == 'object'){
        if(navigator.appName.indexOf("Netscape")>(-1)) { 
              if (e.keyCode == 13) { 
                    bt.click(); 
                    return false; 
              } 
        } 
        if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)) { 
              if (event.keyCode == 13) {
                    bt.click();
                    return false;
              } 
        } 
  } 
}

// Brady - 11.21.2006 - generic function to call printer friendly pages
function btnPrint_onclick(url) {
    window.open(url,"_blank");
}

//EyePinch 01/2007
	
function show_searching(p_show)// p_show = true will show, p_show = false will hide
{
	if (document.getElementById('searching')) 
	{
		document.getElementById('searching').style.display = (p_show) ? 'block' : 'none';
		if (p_show)
		{ 
			// fixes ie images in hidden div bug
			setTimeout('document.getElementById("inner-search").style.background="url(Images/searching.gif)";', 100);
			setTimeout('document.getElementById("animation").src="Images/anim.gif";', 100); 
		}

	}
}	

// Brady - 3.28.2007 - dused by body onload to control prog bar div
function init(id)
	{
		if (document.getElementById(id))	document.getElementById(id).style.display = 'none';
	}
	



