function isNumberKey(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode < 96 || charCode > 105) && charCode != 46 && (charCode < 37 || charCode > 40))
			return false;

	return true;
}
function imgPop(imgin, nme)
{
	img = document.createElement('img');
	img.setAttribute('src',imgin);
	popimg = window.open(img.src, nme, 'toolbar=0,scrollbars=auto,location=0,statusbar=0,menubar=0,width=0,height=0,resizable=0');
	setTimeout('popSize(popimg, img)', 1);
	return false;
}
function popSize(popimg, img)
{
	var winwidth = img.width + 50;
	var winheight = img.height + 110;
	popimg.resizeTo(winwidth, winheight);
}

function insFlash(args, tar)
{
	//<![CDATA[
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion)
	{
		flaCode=args;
		if(tar == 'tabArea')
			flaCode = '&nbsp;&nbsp;&nbsp;' + flaCode;
		if(tar == 'write')
			document.write(flaCode);
		else if (tar == 'return')
			return flaCode;
		else
		{
			document.getElementById(tar).innerHTML = flaCode;
		}
	}
	else
	{
		var alternateContent = '<span>National Marker Company<br/>'
 				+ 'This content requires Adobe Flash Player.<br/>'
  			+ '<a href=http://www.macromedia.com/go/getflash/ target=\"_blank\">Click Here to Get Flash<\/span><\/a>';
		document.write(alternateContent);
	}
	//]]>
}

function insText(tar,val)
{
	var htmlCode=document.getElementById(val).innerHTML;
	document.getElementById(tar).innerHTML = htmlCode;
}

function lside(uid)
{
	outStr = '<div class=\"NMCsearch\"><form style=\"margin-left: 10px; padding-top: 35px;\" action=\"searchResults.php\" method=\"get\" name=\"search\"><input type=\"hidden\" value=\"' + uid + '\" name=\"uid\"/><input name=\"searchstring\" type=\"text\" id=\"searchstring\" maxlength=\"20\" style=\"font-size: 12px; width: 145px; height: 20px;\"/><br/><input type=\"submit\" value=\"    Search    \"/></form></div>' + insFlash('<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\' WIDTH=\'175\' HEIGHT=\'425\'><PARAM NAME=\'movie\' VALUE=\'navbar.swf\'><PARAM NAME=\'quality\' VALUE=\'high\'><PARAM NAME=\'wmode\' value=\'opaque\'><PARAM NAME=\'bgcolor\' VALUE=\'#FFFFFF\'><PARAM NAME=\'FlashVars\' value=\'uid=' + uid + '\'><EMBED src=\'navbar.swf\' quality=\'high\' PLUGINSPAGE=\'http://www.macromedia.com/go/getflashplayer\' TYPE=\'application/x-shockwave-flash\' WIDTH=\'175\' HEIGHT=\'425\' wmode=\'opaque\' FlashVars=\'uid=' + uid + '\'><\/EMBED><\/OBJECT>', 'return') + '<br/><br/><a href=\"http://customs.nationalmarker.com/index.php?uid=NMCPRT-' + uid + '\"><img alt=\"Search NMC Identification\" src=\"images/customsignbutton.gif\" style=\"border-width: 0px;\"/></a>';
	//document.getElementById('lside').innerHTML=outStr;
	document.write(outStr);
}

function contentLoad(args) //for Flash
{
	location.href='index.php?' + args;
}

function noenter()
{
	return !(window.event && window.event.keyCode == 13);
}



//#####3.1.10 - Filter Add
function showcat(cat)
{
	prefix="L3";

	if (document.getElementById(prefix+cat).style.visibility == 'hidden' || document.getElementById(prefix+cat).style.display == 'none')
	{
		document.getElementById(prefix+cat).style.visibility='visible';
		document.getElementById(prefix+cat).style.display='block';
		document.getElementById(prefix+cat+"exp").innerHTML='&#45;&nbsp;&nbsp;';
	}
	else
	{
		document.getElementById(prefix+cat).style.visibility='hidden';
		document.getElementById(prefix+cat).style.display='none';
		document.getElementById(prefix+cat+"exp").innerHTML='&#43;&nbsp;';
	}
}

