var g_tim = null;
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(prm_beginRequest);
prm.add_endRequest(prm_endRequest);
function prm_beginRequest(sender, args) {
	g_tim = window.setTimeout("ActivateAlertDiv('', 'pgsPartSearch')", 300);
}
function prm_endRequest(sender, args) {
	var err = args.get_error();
	ActivateAlertDiv('none', 'pgsPartSearch');
}
function ActivateAlertDiv(visstring, elem) {
	var myWidth = 0, myHeight = 0;
	if (typeof (window.innerWidth) == 'number') {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	var adiv = $get(elem);
	adiv.style.top = (myHeight / 2 - 37) + 'px';
	adiv.style.left = (myWidth / 2 - 112) + 'px';
	adiv.innerHTML = 'Searching for ' + $get('criteria1').value
		+ '...<br />Please wait';
	adiv.style.display = visstring;
	if (g_tim) window.clearTimeout(g_tim);
}
var msg = document.getElementById('lblMessage');
var btn = document.getElementById('cmdSearch');
var sch = new String(document.location.search);
sch = sch.toLowerCase();
if (sch.indexOf('partno') > -1) {
	if (msg.innerHTML == 'Searching for your document...') {
		btn.click();
	}
}