/* ####################### 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;
}

/* ####################### DEBITARE ####################### */

function ceramic(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Grinding","1");
options[2]=new Option("Sharpening","2");
options[3]=new Option("Honing","3");
options[4]=new Option("Manual finishing","4");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


/* ####################### Deburring ####################### */
 

function bachelitic(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Polishing","5");
options[2]=new Option("Deburring","6");
options[3]=new Option("Grinding","1");
options[4]=new Option("Sharpening","2");
options[5]=new Option("Processing of floor made by mosaic/concrete","7");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
 
 
function elastic(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Centerless external rectify","8");
options[2]=new Option("Stainless knife sharpening","9");
options[3]=new Option("Tap sphere processing","10");
options[4]=new Option("Stainless pie","11");
options[5]=new Option("Glass and wood edge processing","12");
options[6]=new Option("Plastics metallic and non-metallic surface preparation","13");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
  


function magnezitic(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation","none");
options[1]=new Option("Marble, granite,  mosaic concrete processing","14");
options[2]=new Option("Stainless stell piece processing","15");
options[3]=new Option("Spring processing, roughing and smothing file processing","16");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}

/* ####################### CERAMIC OPERATII ####################### */

function ceramicRECT(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation type","none");
options[1]=new Option("Surface grinding","1");
options[2]=new Option("External cylindrical grinding","2");
options[3]=new Option("Internal grinding","3");
options[4]=new Option("Toothed wheels gears grinding","4");
options[5]=new Option("Threads grinding","5");
options[6]=new Option("Glass grinding","6");

options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ceramicASC(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the machine type","none");
options[1]=new Option("Manual advance grinding machine","7");
options[2]=new Option("Mechanical advance grinding machine","8");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ceramicHON(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}

function ceramicFINIS(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



/* ####################### BACHELITIC OPERATII ####################### */


function bacheliticPOLIZ(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticDEBAV(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticRECT(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the operation type","none");
options[1]=new Option("Surface grinding","1");
options[2]=new Option("Both sides grinding","9");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticASC(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticPREL(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticRECTplana(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function bacheliticRECTfete(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}

/* ####################### ELASTIC OPERATII ####################### */

function elasticRECT(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function elasticASC(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}

	
function elasticPRELS(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
	

function elasticPRELC(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
	
	
function elasticPRELCANT(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
	
	
function elasticPREG(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
	
 

/* ####################### MAGNEZITIC OPERATII ####################### */

function magneziticPRELM(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function magneziticPRELO(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function magneziticPRELA(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Click on Display button","100");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}








function ceramicRECTplana(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the form","none");
options[1]=new Option("Strainght grinding wheels","1");
options[2]=new Option("Cylinder wheels","2");
options[3]=new Option("Strainght cup wheels","3");
options[4]=new Option("Abrasive segment","4");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ceramicRECTclind(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("selectati tip operatie...","none");
options[1]=new Option("External cylindrical grinding between centers","5");
options[2]=new Option("Penetrating external cylindrical grinding","6");
options[3]=new Option("Axle grinding","7");
options[4]=new Option("Cranshaft grinding","8");
options[5]=new Option("Centerless cylindrical grinding","9");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}
 

function ceramicRECTinter(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the form","none");
options[1]=new Option("Strainght grinding wheels","1");
options[2]=new Option("Whells recessed on the side","10");
options[3]=new Option("Mounted points","11");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}



function ceramicASCman(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the form","none");
options[1]=new Option("Strainght grinding wheels","1");
options[2]=new Option("Strainght cup wheels","3");
options[3]=new Option("Cylinder wheels","2");
options[0].selected=true
}
//Netscape likes a refresh, but Microsoft doesn't
if (navigator.appName.indexOf("Netscape")>-1)
history.go(0)
}


function ceramicASCmec(aMenu){
nullOptions(aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select the form","none");
options[1]=new Option("Strainght grinding wheels","1");
options[2]=new Option("Strainght cup wheels","3");
options[3]=new Option("Disc wheels for grinding and shapening of tools such as milling cutters, reamers, counterbores","12");
options[4]=new Option("One side tapered strainght whells - C profile - saw sharpening","13");
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.liant.options[0].selected=true;
document.formMenu.operatia.options[0].selected=true;
document.formMenu.tipoperatie.options[0].selected=true;
document.formMenu.tipcorp.options[0].selected=true;

}
}

/* ####################### end of setup ####################### */



/* ####################### change liant ####################### */
function changeLiant(){
aMenu=document.formMenu.liant
aMenu2=document.formMenu.operatia
aMenu3=document.formMenu.tipoperatie
aMenu4=document.formMenu.tipcorp;

with  (aMenu){

switch (selectedIndex) {
 
case 1:  
//ceramic
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
ceramic(aMenu2)  
break       

case 2:  
//bachelitic
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
bachelitic(aMenu2)  
break          

case 3:  
//elastic
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
elastic(aMenu2)  
break 

case 4:  
//elastic
nullOptions(aMenu2)
nullOptions(aMenu3)
nullOptions(aMenu4)
aMenu2.options[0]=
new Option("---","none")
aMenu2.options[0].selected=true;
magnezitic(aMenu2)  
break 
}
}

}

/* ####################### end of change domenii ####################### */



/* ####################### changeOperatia ####################### */

function changeOperatia(){
aMenu=document.formMenu.liant
aMenu2=document.formMenu.operatia
aMenu3=document.formMenu.tipoperatie
aMenu4=document.formMenu.tipcorp;
/* ####################### ceramic / operatii ####################### */

if (aMenu.selectedIndex==1)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu3.options.length=0;
aMenu3.options[0]=
new Option("Aici vor aparea tipurile de operatii","none")
aMenu3.options[0].selected=true;
history.go(0)
break   
case 1:  
nullOptions(aMenu4)
ceramicRECT(aMenu3)  
break       
case 2:  
nullOptions(aMenu4)
ceramicASC(aMenu3)  
break       
case 3:  
ceramicHON(aMenu3)  
ceramicHON(aMenu4)  
break  
case 4:  
ceramicFINIS(aMenu3)
ceramicFINIS(aMenu4)
break
 
}
}
}

/* ####################### bachelititc / operatii ####################### */
if (aMenu.selectedIndex==2)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu2.options.length=0;
aMenu2.options[0]=
new Option("Aici vor aparea tipurile de operatii","none")
aMenu2.options[0].selected=true;
history.go(0)
break    
case 1:  
bacheliticPOLIZ(aMenu4) 
bacheliticPOLIZ(aMenu3)  
break       
case 2:  
bacheliticDEBAV(aMenu4) 
bacheliticDEBAV(aMenu3)  
break       
case 3:  
nullOptions(aMenu4)
bacheliticRECT(aMenu3)  
break;       
case 4:  
bacheliticASC(aMenu4) 
bacheliticASC(aMenu3)  
break;   
case 5:  
bacheliticPREL(aMenu4) 
bacheliticPREL(aMenu3)  
break;     
}
}
}

/* ####################### elastic / operatii ####################### */

if (aMenu.selectedIndex==3)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu2.options.length=0;
aMenu2.options[0]=
new Option("Aici vor aparea tipurile de operatii","none")
aMenu2.options[0].selected=true;
history.go(0)
break    
case 1:  
elasticRECT(aMenu4)  
elasticRECT(aMenu3)  
break       
case 2:  
elasticASC(aMenu4) 
elasticASC(aMenu3)  
break       
case 3:  
elasticPRELS(aMenu4)  
elasticPRELS(aMenu3)  
break;       
case 4:  
elasticPRELC(aMenu4)  
elasticPRELC(aMenu3)  
break;  
case 5:  
elasticPRELCANT(aMenu4)  
elasticPRELCANT(aMenu3)  
break; 
case 6:  
elasticPREG(aMenu4)
elasticPREG(aMenu3)  
break;   
    
	
}
}
}
 

/* ####################### magnezitic / operatii ####################### */
if (aMenu.selectedIndex==4)
{
with  (aMenu2){

switch (selectedIndex) {
case 0:
nullOptions(aMenu4)
aMenu2.options.length=0;
aMenu2.options[0]=
new Option("Aici vor aparea tipurile de operatii","none")
aMenu2.options[0].selected=true;
history.go(0)
break    
case 1:  
magneziticPRELM(aMenu4)  
magneziticPRELM(aMenu3)  
break       
case 2:  
magneziticPRELO(aMenu4)  
magneziticPRELO(aMenu3)  
break       
case 3:  
magneziticPRELA(aMenu4) 
magneziticPRELA(aMenu3)  
break;       
   
    
	
}
}
}

}


/* ####################### end of code ####################### */



/* ####################### changeTip ####################### */

function changeTip(){
aMenu=document.formMenu.liant
aMenu2=document.formMenu.operatia
aMenu3=document.formMenu.tipoperatie
aMenu4=document.formMenu.tipcorp;
/* ####################### ceramic ####################### */

if (aMenu.selectedIndex==1)
{

if (aMenu2.selectedIndex==1)
{

	with  (aMenu3){

	switch (selectedIndex) {
	case 0:
	nullOptions(aMenu4)
	aMenu3.options.length=0;
	aMenu3.options[0]=
	new Option("Aici vor aparea tipurile de operatii","none")
	aMenu3.options[0].selected=true;
	history.go(0)
	break   
	case 1:  
	ceramicRECTplana(aMenu4)  
	break       
	case 2:  
	ceramicRECTclind(aMenu4)  
	break       
	case 3:  
	ceramicRECTinter(aMenu4)  
	break  
	case 4:  
	ceramicFINIS(aMenu4)
	break
 	case 5:  
	ceramicFINIS(aMenu4)
	break
	case 6:  
	ceramicFINIS(aMenu4)
	break
	}
	}
}
 



if (aMenu2.selectedIndex==2)
{

	with  (aMenu3){

	switch (selectedIndex) {
	case 0:
	nullOptions(aMenu4)
	aMenu3.options.length=0;
	aMenu3.options[0]=
	new Option("Aici vor aparea tipurile de operatii","none")
	aMenu3.options[0].selected=true;
	history.go(0)
	break   
	case 1:  
	ceramicASCman(aMenu4)  
	break       
	case 2:  
	ceramicASCmec(aMenu4)  
	break       
 
 
	}
	}
}
 
 
}
 
 
 
 
/* ####################### bachelitic ####################### */

if (aMenu.selectedIndex==2)
{

if (aMenu2.selectedIndex==3)
{

	with  (aMenu3){

	switch (selectedIndex) {
	case 0:
	nullOptions(aMenu4)
	aMenu3.options.length=0;
	aMenu3.options[0]=
	new Option("Aici vor aparea tipurile de operatii","none")
	aMenu3.options[0].selected=true;
	history.go(0)
	break   
	case 1:  
	bacheliticRECTplana(aMenu4)  
	break       
	case 2:  
	bacheliticRECTfete(aMenu4)  
	break       
 
	}
	}
}
 

  
 
 
 
 
 


} 


}
