var choices = null;

var cChoices = 32;

function initChoices()
{
choices = new Array(32);

choices[ 0]='XXX_X______XX_X__XX___ onyx1220';
choices[ 1]='XXX_XX_____XX_X__XXX__ onyx1620';
choices[ 2]='XXX_XXX____XX_X__XXXX_ onyx1640';
choices[ 3]='X_X_XXX____X__X__XXXX_ onyx244';
choices[ 4]='X_X_XXXX___X__X__XXXX_ onyx324';
choices[ 5]='X_X_XXXX___X__X__XXXXX onyx2480';
choices[ 6]='X_X_XXXXX__X__X__XXXXX onyx3280';
choices[ 7]='X_X_XXXXX__X__X__XXXXX onyx4080';
choices[ 8]='X_X_XXXXX__X__X__XXXXX onyx4880';
choices[ 9]='XXX_X____X__X____X____ d2';
choices[10]='XXX_X_____X____X_X____ 402vlz3';
choices[11]='XXX_X_____X____X_X____ 802vlz3';
choices[12]='XXX_X_____X____X_XX___ 1202vlz3';
choices[13]='XXX_X_____X____X_XX___ 1402vlz3';
choices[14]='XXX_XX____X___X__XXX__ 1642vlz3';
choices[15]='XXX_XXX___X___X__XXXX_ 1604vlz3';
choices[16]='X_X_XX___X_____XX_XX__ cfx12mkii';
choices[17]='X_X_XX___X_____XX_XX__ cfx16mkii';
choices[18]='X_X_XXX__X_____XX_XX__ cfx20mkii';
choices[19]='X_X_X____X_____XX_X___ dfx6';
choices[20]='X_X_X____X_____XX_X___ dfx12';
choices[21]='X__XX____X_____XX_X___ 406m';
choices[22]='X__XXX___X_____XX_X___ 808m';
choices[23]='X__XXX___X_____XX_X___ 808s';
choices[24]='X_X_XXXX_X___X__X_XXXX tt24';
choices[25]='XX__XXXXXX__XXX_X_XXXX dxb';
choices[26]='XXX_X____X__X____X____ d4';


choices[27]='XX_______X__X____X____ u420';
choices[28]='XX__X____X__X____X____ u420d';
choices[29]='X__X_X___X______X_X___ ppm608';
choices[30]='X__X_X___X______X_X___ ppm1008';
choices[31]='X__X_X___X______X__XX_ ppm1012';


}

function DOM(n)
{
	return document.getElementById(n);
}

function showMatches()
{
	if ( choices == null )
	{
		initChoices();
	}

	for ( var i = 0 ; i < cChoices ; i++ )
	{
		var nm = "ch_" + choices[i].substring( 23, 255 );
		var o = DOM(nm);
		if ( o == null )
		{
			//alert(nm);
			continue;
		}

		var c = "";
		for ( var n = 1 ; n <= 6 ; n++ )
			c += choices[i].substr( DOM("opt"+n).value, 1 );
		//alert(c);
		o.className = (c == 'XXXXXX') ? "rotate_prod" : "rotate_off";
		
	}
}

// JavaScript Document

//<![CDATA[

function DOM(n) 
{
	if (document.all) return(document.all[n]);
	if (document.getElementById) return(document.getElementById(n));
	return(null);
}


function toggleDisplay( n ) 
{
	var o = DOM(n);

	if ( o == null )
		return;

	o.style.display = (o.style.display == '') ? "none" :  "";
}

function hide( n ) {
	var o = DOM(n);

	if ( o == null )
	{
		alert(n);
		return;
	}

	if ( o.style.display == "" )
		o.style.display = "none";
}

function show( n ) {
	var o = DOM(n);

	if ( o == null )
	{
		alert(n);
		return;
	}

	if ( o.style.display == "none" )
		o.style.display = "";
}

function showpanel( n ) {

	hide("panel_default");

	hide('panel_onyx1220');
	hide('panel_onyx1620');
	hide('panel_onyx1640');
	hide('panel_onyx244');
	hide('panel_onyx324');
	hide('panel_onyx2480');
	hide('panel_onyx3280');
	hide('panel_onyx4080');
	hide('panel_onyx4880');
	hide('panel_402vlz3');
	hide('panel_802vlz3');
	hide('panel_1202vlz3');
	hide('panel_1402vlz3');
	hide('panel_1642vlz3');
	hide('panel_1604vlz3');
	hide('panel_cfx12mkii');
	hide('panel_cfx16mkii');
	hide('panel_cfx20mkii');
	hide('panel_dfx6');
	hide('panel_dfx12');
	hide('panel_406m');
	hide('panel_808m');
	hide('panel_808s');
	hide('panel_tt24');
	hide('panel_x200');
	hide('panel_d2');
	hide('panel_d4');
	hide('panel_u420');
	hide('panel_u420d');
	hide('panel_ppm608');
	hide('panel_ppm1008');
	hide('panel_ppm1012');

	show( n );
}

function output_diag_table() {
	
	if ( choices == null )
	{
		initChoices();
	}
	
	
desc = new Array(27);


desc[1] = "Type Recording";
desc[2] = "Type Live - unpowered";
desc[3] = "Type Live - powered";
desc[4] = "Mic In 1+";
desc[5] = "Mic In 7+";
desc[6] = "Mic In 13+";
desc[7] = "Mic In 21+";
desc[8] = "Mic In 31+";
desc[9] = "Preamp Type: Mackie";
desc[10] = "Preamp Type: XDR";
desc[11] = "Preamp Type: Premium Onyx";
desc[12] = "Direct Outs: Yes, FireWire";
desc[13] = "Direct Outs: Yes, Digital";
desc[14] = "Direct Outs: Yes, Analog";
desc[15] = "Direct Outs: No Direct Outs";
desc[16] = "FX: Yes";
desc[17] = "FX: No";
desc[18] = "Aux Sends: 2+";
desc[19] = "Aux Sends: 4+";
desc[20] = "Aux Sends: 6+";
desc[21] = "Aux Sends: 8+";

	var i, d;
	
	document.write( '<table border=1><tr><td>&nbsp;</td>' );
	for ( i = 1 ; i <= 21 ; i++ )
	{
		document.write( '<td>' + i + ': ' + desc[i] + '</td>' );
	}
	document.write( '</tr><tr>\r\n' );

	
	for ( var i = 0 ; i < cChoices ; i++ )
	{
		var nm = choices[i].substring( 22, 255 );
		
		document.write ( '<tr><td>' + i + ': ' + nm + '</td>' );
		
		for ( d = 1 ; d <= 21 ; d++ )
		{
			document.write( '<td>' + choices[i].substr( d, 1 ) + '</td>\r\n' );
		}
		document.write( '</tr>\r\n' );		
	}
	document.write( '</table>\r\n' );
}

//]]>
