// first combo box

	REPdata_1 = new Option("India", "India");
	REPdata_2 = new Option("Bangladesh", "Bangladesh");
	REPdata_3 = new Option("Bhutan", "Bhutan");
	REPdata_4 = new Option("Nepal", "Nepal");
	REPdata_5 = new Option("Pakistan", "Pakistan");
	REPdata_6 = new Option("Sri Lanka", "Sri Lanka");

// second combo box
	REPdata_1_1 = new Option("Andhra Pradesh", "Andhra Pradesh");
	REPdata_1_2 = new Option("Bihar", "Bihar");
	REPdata_1_3 = new Option("Chandigarh", "Chandigarh");
	REPdata_1_4 = new Option("Chhattisgarh", "Chhattisgarh");
	REPdata_1_5 = new Option("Delhi", "Delhi");
	REPdata_1_6 = new Option("Goa", "Goa");
	REPdata_1_7 = new Option("Gujarat", "Gujarat");
	REPdata_1_8 = new Option("Haryana", "Haryana");
	REPdata_1_9 = new Option("Himachal Pradesh", "Himachal Pradesh");
	REPdata_1_10 = new Option("Jammu and Kashmir", "Jammu & Kashmir");
	REPdata_1_11 = new Option("Jharkhand", "Jharkhand");
	REPdata_1_12 = new Option("Karnataka", "Karnataka");
	REPdata_1_13 = new Option("Kerala", "Kerala");
	REPdata_1_14 = new Option("Madhya Pradesh", "Madhya Pradesh");
	REPdata_1_15 = new Option("Maharashtra", "Maharashtra");
	REPdata_1_16 = new Option("Orissa", "Orissa");
	REPdata_1_17 = new Option("Pondicherry", "Pondicherry");
	REPdata_1_18 = new Option("Punjab", "Punjab");
	REPdata_1_19 = new Option("Rajasthan", "Rajasthan");
	REPdata_1_20 = new Option("Tamil Nadu", "Tamil Nadu");
	REPdata_1_21 = new Option("Uttar Pradesh", "Uttar Pradesh");
	REPdata_1_22 = new Option("Uttarakhand", "Uttarakhand");
	REPdata_1_23 = new Option("West Bengal", "West Bengal");
	
	REPdata_2_1 = new Option("Bangladesh", "Bangladesh");
	REPdata_3_1 = new Option("Bhutan", "Bhutan");	
	REPdata_4_1 = new Option("Nepal", "Nepal");	
	REPdata_5_1 = new Option("Pakistan", "Pakistan");	
	REPdata_6_1 = new Option("Sri Lanka", "Sri Lanka");
	
// third combo box

	REPdata_1_1_1 = new Option("Andhra Pradesh", "Andhra Pradesh");
	REPdata_1_1_2 = new Option("Secunderabad", "Secunderabad");
	
	REPdata_1_2_1 = new Option("Bihar", "Bihar");
	
	REPdata_1_3_1 = new Option("Chandigarh", "Chandigarh");
	
	REPdata_1_4_1 = new Option("Chhattisgarh", "Chhattisgarh");
	
	REPdata_1_5_1 = new Option("Delhi", "Delhi");
	
	REPdata_1_6_1 = new Option("Goa", "Goa");
	
	REPdata_1_7_1 = new Option("Ahmedabad", "Ahmedabad");
	REPdata_1_7_2 = new Option("Gujarat", "Gujarat");
	
	REPdata_1_8_1 = new Option("Haryana", "Haryana");
	
	REPdata_1_9_1 = new Option("Himachal Pradesh", "Himachal Pradesh");
	
	REPdata_1_10_1 = new Option("Jammu & Kashmir", "Jammu & Kashmir");
	
	REPdata_1_11_1 = new Option("Jharkhand", "Jharkhand");
	
	REPdata_1_12_1 = new Option("Bangalore", "Bangalore");
	REPdata_1_12_2 = new Option("Karnataka", "Karnataka");
	
	REPdata_1_13_1 = new Option("Kerala", "Kerala");
	
	REPdata_1_14_1 = new Option("Madhya Pradesh", "Madhya Pradesh");
	
	REPdata_1_15_1 = new Option("Mumbai", "Mumbai");
	REPdata_1_15_2 = new Option("Nagpur", "Nagpur");
	REPdata_1_15_3 = new Option("Pune", "Pune");
	
	REPdata_1_16_1 = new Option("Bhubaneswar", "Bhubaneswar");
	REPdata_1_16_2 = new Option("Orissa", "Orissa");
	
	REPdata_1_17_1 = new Option("Pondicherry", "Pondicherry");
	
	REPdata_1_18_1 = new Option("Punjab", "Punjab");
	
	REPdata_1_19_1 = new Option("Rajasthan", "Rajasthan");
	
	REPdata_1_20_1 = new Option("Chennai", "Chennai");
	REPdata_1_20_2 = new Option("Coimbatore", "Coimbatore");
	REPdata_1_20_3 = new Option("Tamil Nadu", "Tamil Nadu");
	
	REPdata_1_21_1 = new Option("Lucknow", "Lucknow");
	REPdata_1_21_2 = new Option("Noida", "Noida");
	
	REPdata_1_22_1 = new Option("Uttarakhand", "Uttarakhand");
	
	REPdata_1_23_1 = new Option("Kolkata", "Kolkata");
	
	REPdata_2_1_1 = new Option("Bangladesh", "Bangladesh");
	
	REPdata_3_1_1 = new Option("Bhutan", "Bhutan");
	
	REPdata_4_1_1 = new Option("Nepal", "Nepal");
	
	REPdata_5_1_1 = new Option("Pakistan", "Pakistan");
	
	REPdata_6_1_1 = new Option("Sri Lanka", "Sri Lanka");

// other parameters

    displaywhenempty1=""
    valuewhenempty1=""

    displaywhennotempty1="--Select--"
    valuewhennotempty1=""


function change_1(currentbox) {
	numb = currentbox.id.split("_");
	currentbox = numb[1];

    i=parseInt(currentbox)+1

// I empty all combo boxes following the current one

    while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
           (document.getElementById("combo_"+i)!=null)) {
         son = document.getElementById("combo_"+i);
	     // I empty all options except the first one (it isn't allowed)
	     for (m=son.options.length-1;m>0;m--) son.options[m]=null;
	     // I reset the first option
	     son.options[0]=new Option(displaywhenempty1,valuewhenempty1)
	     i=i+1
    }


// now I create the string with the "base" name ("stringa"), ie. "REPdata_1_0"
// to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box to fill

    stringa='REPdata'
    i=0
    while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
           (document.getElementById("combo_"+i)!=null)) {
           eval("stringa=stringa+'_'+document.getElementById(\"combo_"+i+"\").selectedIndex")
           if (i==currentbox) break;
           i=i+1
    }


// filling the "son" combo (if exists)

    following=parseInt(currentbox)+1

    if ((eval("typeof(document.getElementById(\"combo_"+following+"\"))!='undefined'")) &&
       (document.getElementById("combo_"+following)!=null)) {
       son = document.getElementById("combo_"+following);
       stringa=stringa+"_"
       i=0
       while ((eval("typeof("+stringa+i+")!='undefined'")) || (i==0)) {

       // if there are no options, I empty the first option of the "son" combo
	   // otherwise I put "-select-" in it

	   	  if ((i==0) && eval("typeof("+stringa+"0)=='undefined'"))
	   	      if (eval("typeof("+stringa+"1)=='undefined'"))
	   	         eval("son.options[0]=new Option(displaywhenempty1,valuewhenempty1)")
	   	      else
	             eval("son.options[0]=new Option(displaywhennotempty1,valuewhennotempty1)")
	      else
              eval("son.options["+i+"]=new Option("+stringa+i+".text,"+stringa+i+".value)")
	      i=i+1
	   }
       //son.focus()
       i=1
       combostatus=''
       cstatus=stringa.split("_")
       while (cstatus[i]!=null) {
          combostatus=combostatus+cstatus[i]
          i=i+1
          }
       return combostatus;
    }
}

