browser_name = navigator.appName; 

browser_version = parseFloat(navigator.appVersion); 



if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; } 

else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; } 

else { roll = 'false'; } 



function over(img,ref) {

	if (roll == 'true') { document.images[img].src = ref; }

} 

function out(img,ref)  { 

	if (roll == 'true') { document.images[img].src = ref; }

}    



//var msg = "ALCOHOL COUNTERMEASURE SYSTEMS Web Site Has Your Right-Click Button Disabled";

//if(document.layers) window.captureEvents(Event.MOUSEDOWN);



//function no_click(e){

//if (navigator.appName == 'Netscape' && ( e.which == 2 || e.which == 3))

// {

//  alert(msg);return false;

// }

// if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))

// {

//   alert(msg);return false;

// }

//}

//window.onmousedown=no_click;

//document.onmousedown=no_click;



function OpenWindow_FullGif(gif_path)

{

window.open(gif_path,"HappyWin","top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=590");

}



function update()	{

// if (document.location=="file:///M:/TOTALDUI/sitestage/breathalyzer.htm')") {

		with (document.forms[0])

			{

			drinks=numDrinks.selectedIndex+1;

			ozbase=base.options[base.selectedIndex].value;

			drinkTime=time.options[time.selectedIndex].value;

			weightList=weight.options[weight.selectedIndex].value;

			}

		oz=(ozbase*drinks-.5*drinkTime);

		if (oz<.75) i=0;

		else if (oz<1.25) i=2;

		else if (oz<1.75) i=4;

		else if (oz<2.25) i=6;

		else if (oz<2.75) i=8;

		else if (oz<3.25) i=10;

		else if (oz<3.75) i=12;

		else if (oz<4.25) i=14;

		else if (oz<4.75) i=16;

		else i=18;

		j=i+2;

		bac=weightList.substring(i,j);

		document.forms[0].result.value="." +bac;

		if(bac<5) imp="Possible impairment";

		else if (bac<8) imp="Some impairment";

		else if (bac<10) imp="Definite impairment, illegal in some states";

		else imp="Obvious Impairment, illegal in all states";

		document.forms[0].impair.value=imp;

//		}

	}
