// JavaScript Document

// Browser Detection

    var agt=navigator.userAgent.toLowerCase();

    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1);

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

// end Browser Detection


/*
/////////////////////////////////////////////////

  controls the mouse-over and mouse-off behaviors
  of the application menu on the home page

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

function rollOver (thisItem, thisPath) {
	document.getElementById("img" + thisItem).src = thisPath;
}
function rollOff (thisItem, thisPath) {
	document.getElementById("img" + thisItem).src = thisPath;
}

/*
/////////////////////////////////////////////////

  checks to ensure that the required fields are
  filled out on the home page form

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

function validateContactForm() {
	var allOk = true;
	var errorString = 'Please enter the following before submitting:\n';

	if (!allOk) { alert(errorString); }

	return allOk;
}

/*
/////////////////////////////////////////////////

  extracts the content fron the current page and formats it for printing
  requires /includes/print.css

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

function printThisPage() {
	var contents = document.getElementById('copy');

	top.printView = window.open('','printView','left=20,top=20,width=700,height=700,toolbar=1,scrollbars=1,resizable=0');
	top.printView.document.writeln(
		"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
		"<html lang=\"en\">\n\n<head>\n  <title>BRG Precision Products</title>\n <style type=\"text/css\">	div	{	margin: 0;	padding: 0;	}body	{	background: #fff;	font-family: arial, sans-serif;	}p	{	font-family: arial, san-serif;	font-size: .75em;	color: #333;	padding: 5px 24px;	text-align: left;	}h1	{		}h2	{	font-family: arial, sans-serif;	font-size: 1em;	font-weight: 700;	background: #fff;	color: #a9162b;	margin: 0 10px 10px 20px;	padding: 2px 4px;	}h3	{	font-family: arial, sans-serif;	font-size: .9em;	color: #366f94;	padding: 0 24px;	}h4	{	font-family: arial, sans-serif;	font-weight: 700;	font-size: 75%;	padding: 0 24px;	color: #333;	margin-left: 21px;	margin-bottom: -23px;	}html>body h4	{	margin-bottom: -14px;	}h5	{		}h6	{	font-size: .7em;	font-weight: 700;	color: #222;	margin: 0;	padding: 0;	}a	{	font-size: .7em;	font-weight: 700;	color: #a9162b;	text-decoration: none;	}a:hover	{	text-decoration: underline;	}a.skip-to	{	margin-left: -3000px;	}a.more	{	position: relative;	top: 4px;	padding-left: 24px;	}a.more:hover	{	text-decoration: none;	}a.more img	{	margin-left: 0;	}html>body a.more img	{	margin-left: 3px;	}img	{	border: 0;	}img.product-image	{	float: right;	clear: right;	padding-left: 24px;	}img.picture	{	margin-top: 24px;	margin-right: 10px;	float: right;	padding: 5px;	}img#gray-bar	{	float: left;	padding-left: 8px;	margin-top: -19px; 	}html>body img#gray-bar	{	margin-top: -15px;	}abbr	{	cursor: help;	border: 0;	}ul	{	margin: 0;	padding: 0;	}ul	{	margin-top: 30px;	margin-left: 60px; 	list-style-image: url(../images/g_breadcrumb-squares.gif);	}ul li	{	color: #333;	font-size: .8em;	}div#products h4	{	padding-left: 2px;	}div#products p	{	font-size: .75em;	padding-left: 24px;	margin-bottom: -10px;	}div#products img.separator	{	margin-left: 24px;	}span.actions	{	display: none;	}	#copy p strong	{	color: #a9162b;	font-weight: 700;	}	table	{	background: #ccc;	font-size: 80%;	margin: 0 25px 0 46px;	letter-spacing: 0px;	}td	{	background: #fff;	padding: 10px 10px;	color: #666;	}th	{	text-align: left;	background: #fff;	padding: 10px 10px;	color: #666;	font-size: 130%;	}tr.alt td, tr.alt th	{	background: #ebf2f8;	}.th-cell	{	font-weight: 700;	color: #666;	font-size: 130%;	}#copy	{	float: left;	width: 575px;	}#copy p	{	font-size: .75em;	padding-left: 45px;	margin-bottom: -10px;	}#copy p a	{	font-size: 100%;	}#copy p strong	{	color: #a9162b;	font-weight: 700;	}#footer	{	font-size: .7em;	}label	{	font-size: .7em;	float: left;	padding-left: 10px; 	}input	{	font-size: .8em;	width: 150px;	height: .9em;	float: right;	display: inline;	margin-right: 7px;	border-style: solid;	border-width: 1px;	border-color: #333 #999 #999 #333;	}textarea	{	float: right;	width: 150px; 	margin-right: 7px;	border-style: solid;	border-width: 1px;	border-color: #333 #999 #999 #333;	}html,body	{	margin: 0;	padding: 0;	}div#print-header	{	margin: 0;	padding: 0;	float: left;		}div#action-buttons	{	position: relative;	top: -110px;	left: 450px;	}</style>\n</head>\n\n<body>\n\n" +		"<div id=\"print-header\">\n  <img src=\"http://www.brgwirless-dev.com/images/g_popup-header.jpg\" alt=\"BRG Precision Products\" />\n</div>\n\n" +		"<div id=\"action-buttons\" style=\"cursor: hand; \">\n" +
		"  <a onclick=\"javascript:window.print()\" title=\"Print This Window\"><img src=\"http://www.brgwirless-dev.com/images/g_print-window.gif\" alt=\"Print Window\" /></a>\n" +
		"&nbsp;<img src=\"http://www.brgwirless-dev.com/images/g_small-pipe-alpha.gif\" alt=\"or\" />&nbsp;" +
		"<a onclick=\"javascript:window.close()\" title=\"Close This Window\"><img src=\"http://www.brgwirless-dev.com/images/g_close-window.gif\" alt=\"Close Window\" /></a>\n"	+
		"</div>\n\n" +
		"<br /><br />" + contents.innerHTML + "\n\n</body>\n</html>");
	top.printView.document.close();
	// <link rel=\"stylesheet\" href=\"http://www.brgwirless-dev.com/includes/print.css\" type=\"text/css\" />
}