/* ####################### start of code ####################### */

//new Option("text","value")
//this code changes menus



function nullOptions(aMenu){
var tot=aMenu.options.length
for (i=0;i<tot;i++)
{
aMenu.options[i]=null
}
aMenu.options.length=0;
}

/* ####################### Belts (wide) / dom / operatiile pe domenii ####################### */

function ABRsupBL(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Calibrating","1");
options[2]=new Option("Grinding","2");
options[3]=new Option("Finishing","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupBI(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Calibrating","1");
options[2]=new Option("Grinding","2");
options[3]=new Option("Finishing","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupRU(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Calibrating","1");
options[2]=new Option("Grinding","2");
options[3]=new Option("Finishing","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupSheets(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Grinding","2");
options[2]=new Option("Finishing","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupDIS(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Calibrating","1");
options[2]=new Option("Grinding","2");
options[3]=new Option("Finishing","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupDISL(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Grinding-Finishing","15");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



function COabrCER(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Sharpening","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}




/* ####################### SUPORTURILE  pentru abrazivi pe suport / Belts (wide) / opearatii  ####################### */
function ABRsupBLcalib(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupBLslef(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupBLfinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



/* ####################### SUPORTURILE  pentru abrazivi pe suport / Belts (narrow) / opearatii  ####################### */
function ABRsupBIcalib(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupBIslef(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupBIfinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



/* ####################### SUPORTURILE  pentru abrazivi pe suport / Rolls / opearatii  ####################### */
function ABRsupRUcalib(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2,3");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[3]=new Option("Combination Paper-Cotton","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupRUslef(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2,3");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[3]=new Option("Combination Paper-Cotton","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupRUfinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



/* ####################### SUPORTURILE  pentru abrazivi pe suport / Sheets / opearatii  ####################### */

function ABRsupSheetsslef(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2,3");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[3]=new Option("Combination Paper-Cotton","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupSheetsfinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2,5");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[3]=new Option("Abratex","5");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}




/* ####################### SUPORTURILE  pentru abrazivi pe suport / Discs / opearatii  ####################### */

function ABRsupDIScalib(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupDISslef(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("All","1,2,3");
options[1]=new Option("Paper","1");
options[2]=new Option("Cotton","2");
options[3]=new Option("Combination Paper-Cotton","3");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ABRsupDISfinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}




/* ####################### SUPORTURILE  pentru abrazivi pe suport / Flap wheels / opearatii  ####################### */

function ABRsupDISLsleffinis(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Cotton","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}












/* ####################### formele produselor ####################### */
function ABRsup(aMenu){
nullOptions(aMenu);
with (aMenu){
//Belts (wide)
options[0]=new Option("Selectati o forma","none");
options[1]=new Option("Belts (wide)","1");
options[2]=new Option("Belts (narrow)","2");
options[3]=new Option("Rolls","3");
options[4]=new Option("Sheets","4");
options[5]=new Option("Discs","5");
options[6]=new Option("Flap wheels","7");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}




function CORabr(aMenu){
//Rolls
nullOptions(aMenu);
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the bonding","none");
options[1]=new Option("Ceramic bonding","1");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}





/* ####################### go() ####################### */

function go(aMenu){
if (aMenu.options.value!="none")
{
location=aMenu.options[aMenu.selectedIndex].value
}
else
aMenu.options[0].selected=true;

}

/* ####################### setUp ####################### */

function setUp(){
if (navigator.appName.indexOf("Microsoft")>-1)
{
document.formMenu.produs.options[0].selected=true;
document.formMenu.forma.options[0].selected=true;
document.formMenu.operatia.options[0].selected=true;
document.formMenu.suport.options[0].selected=true;
}
}

/* ####################### end of setup ####################### */



/* ####################### change produs ####################### */
function changeProdus(){
aMenu=document.formMenu.produs
aMenu2=document.formMenu.forma
aMenu3=document.formMenu.operatia
aMenu4=document.formMenu.suport
with  (aMenu){

switch (selectedIndex) {
case 0:
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
history.go(0)
break
case 1:
//abrazivi pe suport
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
ABRsup(aMenu2)
break

case 2:
//corpuri abrazive
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
CORabr(aMenu2)
break;
}
}

}

/* ####################### end of change produse ####################### */



/* ####################### changeForma ####################### */

function changeForma(){
aMenu=document.formMenu.produs;
aMenu2=document.formMenu.forma;
aMenu3=document.formMenu.operatia;
aMenu4=document.formMenu.suport;
/* ####################### operatiile pentru abrazivi pe suport / pentru fiecare forma ####################### */

if (aMenu.selectedIndex==1)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu3.options.length=0;
aMenu3.options[0]=
new Option("---","none")
aMenu3.options[0].selected=true;
history.go(0)
break
case 1:
nullOptions(aMenu4)
ABRsupBL(aMenu3)
//abrazivi pe suport / Belts (wide) / operatiile
break
case 2:
nullOptions(aMenu4)
ABRsupBI(aMenu3)
//abrazivi pe suport / Belts (narrow) / operatiile
break
case 3:
nullOptions(aMenu4)
ABRsupRU(aMenu3)
//abrazivi pe suport / Rolls / operatiile
break;
case 4:
nullOptions(aMenu4)
ABRsupSheets(aMenu3)
//abrazivi pe suport / Sheets / operatiile
break;
case 5:
nullOptions(aMenu4)
ABRsupDIS(aMenu3)
//abrazivi pe suport / Discs / operatiile
break;
case 6:
nullOptions(aMenu4)
ABRsupDISL(aMenu3)
//abrazivi pe suport / Flap wheels / operatiile
break;
}
}

}

if (aMenu.selectedIndex==2)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu3.options.length=0;
aMenu3.options[0]=
new Option("---","none")
aMenu3.options[0].selected=true;
history.go(0)
break
case 1:
nullOptions(aMenu4)
COabrCER(aMenu3)
break

}
}

}




}


/* ####################### end of code ####################### */



/* ####################### changeOperatia ####################### */

function changeOperatia(){
aMenu=document.formMenu.produs
aMenu2=document.formMenu.forma
aMenu3=document.formMenu.operatia
aMenu4=document.formMenu.suport;




/* ####################### suporturile pentru abrazivi pe suport / Belts (wide) / fiecare operatie ####################### */

if (aMenu.selectedIndex==1)
{

/* Belts (wide) */
if (aMenu2.selectedIndex==1)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupBLcalib(aMenu4)
	break
	case 2:
	ABRsupBLslef(aMenu4)
	break
	case 3:
	ABRsupBLfinis(aMenu4)
	break
	}
	}

}

/* Belts (narrow) */
if (aMenu2.selectedIndex==2)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupBIcalib(aMenu4)
	break
	case 2:
	ABRsupBIslef(aMenu4)
	break
	case 3:
	ABRsupBIfinis(aMenu4)
	break
	}
	}

}

/* Rolls */
if (aMenu2.selectedIndex==3)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupRUcalib(aMenu4)
	break
	case 2:
	ABRsupRUslef(aMenu4)
	break
	case 3:
	ABRsupRUfinis(aMenu4)
	break
	}
	}

}


/* Sheets */
if (aMenu2.selectedIndex==4)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupSheetsslef(aMenu4)
	break
	case 2:
	ABRsupSheetsfinis(aMenu4)
	break

	}
	}

}


 /* Discs */
if (aMenu2.selectedIndex==5)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupDIScalib(aMenu4)
	break
	case 2:
	ABRsupDISslef(aMenu4)
	break
	case 3:
	ABRsupDISfinis(aMenu4)
	break
	}
	}

}


/* Discs */
if (aMenu2.selectedIndex==6)
{

	with  (aMenu3){
	switch (selectedIndex) {
	case 0:
	aMenu4.options.length=0;
	aMenu4.options[0]=
	new Option("---","none")
	aMenu4.options[0].selected=true;
	history.go(0)
	break
	case 1:
	ABRsupDISLsleffinis(aMenu4)
	break

	}
	}

}


}






}
