	function handle()
	{
		return true;
	}

	function checkit(i)
	{
		var i = document.mainForm.term.value;
		var j = !isNaN(i.charAt(0));
		var k = !isNaN(i.charAt(1));
		var TrimI = i;
		if (j==false & k==true )
		{
			TrimI = TrimI.replace(/[A-Z]|[0-9]/i,"");
		}
		document.mainForm.term.value = TrimI;
	}

	function copyValue()
	{
		if (document.mainForm.Ntt.value == "keyword or item #" || document.mainForm.Ntt.value == "" || document.mainForm.Ntt.value == " ")
		{
			alert("Please enter keyword or item # to begin search");
			return false;
		}
		if ( document.mainForm.Ntt.value.length == 5 || document.mainForm.Ntt.value.length == 6 || document.mainForm.Ntt.value.length == 7)
		{
			var firstchar;
			var checknum;
			firstchar = document.mainForm.Ntt.value.substring(0,1);
			checknum = parseInt(document.mainForm.Ntt.value.substring(1,7));
			if(isNaN(firstchar) && !isNaN(checknum))
   			{
				checknum = checknum + "*";
				document.mainForm.Ntk.value = "p_item_no";
				document.mainForm.Ntt.value = checknum;
				mainForm.submit();
			}
			else if(!isNaN(firstchar) && !isNaN(checknum))
   			{
   				checknum = parseInt(document.mainForm.Ntt.value.substring(0,7));
				checknum = checknum + "*";
				document.mainForm.Ntk.value = "p_item_no";
				document.mainForm.Ntt.value = checknum;
				mainForm.submit();
			}
			else
			{
				document.mainForm.Ntt.value = document.mainForm.term.value;
			}
		}
		else
		{
			//document.mainForm.Ntt.value = document.mainForm.term.value;
			mainForm.submit();
		}
	}

	function checkEmail(myForm)
	{
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(NewsletterForm.email_addr.value))
		{
			return true;
		}
		alert("Please enter a valid email address");
		return false;
	}
	
	function MM_findObj(n, d)
	{
		var p,i,x;
		if(!d)
			d=document;

		if((p=n.indexOf("?"))>0&&parent.frames.length)
		{
			d=parent.frames[n.substring(p+1)].document;
			n=n.substring(0,p);
		}

		if(!(x=d[n])&&d.all)
			x=d.all[n];

		if(!(x=d[n])&&d.getElementById)
			x=d.getElementById(n);

		for (i=0;!x&&i<d.forms.length;i++)
			x=d.forms[i][n];

		for(i=0;!x&&d.layers&&i<d.layers.length;i++)
			x=MM_findObj(n,d.layers[i].document);
		return x;
	}

	function ShowHideLayers()
	{
		var i,p,v,obj,args=ShowHideLayers.arguments;
		for (i=0; i<(args.length-2); i+=3)
		{
			if ((obj=MM_findObj(args[i]))!=null)
			{
				v=args[i+2];
				if (obj.style)
				{
					obj=obj.style;
					v=(v=='show')?'visible':(v='hide')?'hidden':v;
				}
				obj.visibility=v;
			}
		}
	}

	//***this is the function to hide the dropdown sort category & view by --- added by noemi castro 3/21/07 ***
	function drpSort_Show()
	{
		var selectSort = document.getElementById('selectSort');
		if ( selectSort != null)
		{
			document.getElementById('selectSort').style.visibility='visible';
		} 
	}

	function drpSort_Hide()
	{
		var selectSort = document.getElementById('selectSort');
		if ( selectSort != null)
		{
			document.getElementById('selectSort').style.visibility='hidden';
		}
	}

	function drpView_Show()
	{
		var selectView = document.getElementById('selectView');
		if ( selectView != null)
		{
			document.getElementById('selectView').style.visibility='visible';
		} 
	}

	function drpView_Hide()
	{
		var selectView = document.getElementById('selectView');
		if ( selectView != null)
		{
			document.getElementById('selectView').style.visibility='hidden';
		}
	}

	window.onerror = handle;
