var _height = null;

function showScheda(){
	if( Scheda.style.visibility=="hidden" )
		showDiv( "Scheda", true );
	else
		showDiv( "Scheda", false );
}

function showDiv(_d,bShow){
	var _x = document.getElementById(_d);
				
	if(_height==null)
		_height=_x.style.height;      
	if (bShow){
		if (_x.style.visibility == "visible")
			return;
		_x.style.visibility = "visible";  
		_x.style.overflow="visible";
	}
	else{
		if (_x.style.visibility == "hidden")
			return;
		_x.style.visibility = "hidden";  
		_x.style.overflow="hidden";
	} 
	_x.style.height=_x.style.height=="1px"?"1em":"1px";
}

function mostraScheda(var4) {
  if (var4 != 0) {
		window.open("visualizzascheda.asp?scheda=" + var4,"","width=640,height=420,scrollbars=yes");
	}
}
function mostraSchedaCrash(var1) {
  if (var1 != 0) {
		window.open("visualizzacrash.asp?scheda=" + var1,"","width=640,height=420,scrollbars=yes");
	}
}
function mostraNoteLegali() {
	window.open("NoteLegali.htm","","width=560,height=400,scrollbars=yes");
}
function mostraSchedaNHTSATest(var1) {
  if (var1 != 0) {
		window.open("nhtsatest.asp?TSTNO=" + var1,"","width=600,height=500,scrollbars=yes");
	}
}
function mostraSchedaNHTSACurva(var1,var2) {
  if (var1 != 0) {
		window.open("NHTSACurva.asp?TSTNO=" + var1 + "&CURNO=" + var2,"","width=600,height=500,scrollbars=yes");
	}
}
function mostraSchedaNHTSAVeh(var1,var2) {
  if (var1 != 0) {
		window.open("nhtsavehicle.asp?TSTNO=" + var1 + "&VEHNO=" + var2,"","width=600,height=500,scrollbars=yes");
	}
}
function mostraSchedaNHTSAOcc(var1,var2,var3) {
  if (var1 != 0) {
		window.open("NHTSAOccupant.asp?TSTNO=" + var1 + "&VEHNO=" + var2 + "&OCCLOC=" + var3,"","width=600,height=500,scrollbars=yes");
	}
}
function Stampa() {
	if (window.print) {
		window.print();
	} else {
		alert('Impossibile stampare la pagina.');
	}
}
function mostrarecensionemm() {
	window.open("recensionemm.htm","","width=560,height=400,scrollbars=yes");
}

/* Version Date: 5/12/2004 */
/* Previous Version Dates: 1/15/2003, 5/6/2003 */
/* Original Author: JPS */
/* 5/12/2004 The comments at the top of this page were changed. */
/* 5/6/2003 Mostly only comments and tab spacing were changed. */
/* No warranties are either expressed or implied. */
/* Not responsible for any problems. */

function jpsjsRefreshPg(pstrFldName) {
	// Purpose: Refresh pg. to update other fld(s) based on selection.
	// Author:  JPS, 9/2000.
	// Remarks: Used by combo's onchange.
	//					Assumes existence of document.frmMain.FocusedFldName hidden fld.

	// Set focused fld for when come back.
	document.frmMain.FocusedFldName.value = pstrFldName;

	// Msg.
	alert("Refreshing page to update other field(s) based on your selection.");

	// Submit pg to itself to refresh other combo based on this combo.
	document.frmMain.submit();
}

function Ricarica( tipo )
{
	fParam.marca.value = cmbMarche.value;
	fParam.modello.value = cmbModelli.value;
	fParam.tipo.value = cmbTipi.value;
	fParam.scheda.value = cmbSchede.value;
}
function Ricarica2( tipo )
{
	fParam2.impact_role.value = cmbImpact.value;
	fParam2.marca.value = cmbMarche.value;
	fParam2.modello.value = cmbModelli.value;
	fParam2.scheda.value = cmbSchede.value;
}
function RicaricaNHTSA( tipo )
{
	fParam.marca.value = cmbMarche.value;
	fParam.modello.value = cmbModelli.value;
	fParam.anno.value = cmbAnni.value;
}
