

function load(){var count=0; for (i=1; i <=MobileListing.length; i++)
                           
                          {if (MobileListing[i][0] != MobileListing[i-1][0])
                                      
                           {  count++;

	                       document.Mobile.Mobiletype1.options[count]=new Option();	

	                       document.Mobile.Mobiletype1.options[count].text = MobileListing[i][0];

		               document.Mobile.Mobiletype1.options[count].value = MobileListing[i][0];  }
                                         
                                                      } 

                }//end of load           


function selectMobile1(){ var count=0; document.Mobile.Mobiletype1.length=1; document.Mobile.Mobiletype2.length=1;

                      if (document.Mobile.Mobiletype.selectedIndex==0) { 

                       for (i=1; i <=MobileListing.length; i++){

                        if (MobileListing[i][0] != MobileListing[i-1][0])
                       {  
             	                            count++;

	                               	    document.Mobile.Mobiletype1.options[count]=new Option();	

		                            document.Mobile.Mobiletype1.options[count].text = MobileListing[i][0];

		                            document.Mobile.Mobiletype1.options[count].value = MobileListing[i][0];  }
                                         
                                                      }            

                                                                       }          

                    if (document.Mobile.Mobiletype.selectedIndex==1) { var count2=0; var count1=0;
                                                 
                        for (i=1; i <=MobileListing.length; i++)

                        {if (MobileListing[i][2]!="COSMOTE") {count1=i-count2;}

                                          if (MobileListing[i][2]=="COSMOTE")

                                          {j=i-count1-1;
                                           
                                         count2=i;
                                           
                                          if (MobileListing[i][0] != MobileListing[j][0])  { 
 
	    	                             count++;

	                               	    document.Mobile.Mobiletype1.options[count]=new Option();	

		                            document.Mobile.Mobiletype1.options[count].text = MobileListing[i][0];

		                            document.Mobile.Mobiletype1.options[count].value = MobileListing[i][0];  }
                                          
                                            count1=0;}

                                            } }

                    if (document.Mobile.Mobiletype.selectedIndex==2) {var count2=0; var count1=0;
                                                 
                        for (i=1; i <=MobileListing.length; i++)

                        {if (MobileListing[i][3]!="WIND") {count1=i-count2;}

                                          if (MobileListing[i][3]=="WIND")

                                          {j=i-count1-1;
                                           
                                         count2=i;
                                           
                                          if (MobileListing[i][0] != MobileListing[j][0])  { 
 
	    	                             count++;

	                               	    document.Mobile.Mobiletype1.options[count]=new Option();	

		                            document.Mobile.Mobiletype1.options[count].text = MobileListing[i][0];

		                            document.Mobile.Mobiletype1.options[count].value = MobileListing[i][0];  }
                                          
                                            count1=0;}

                                            } }

                    if (document.Mobile.Mobiletype.selectedIndex==3) {document.Mobile.Mobiletype1.length=1; var count2=0; var count1=0;
                                                 
                        for (i=1; i <=MobileListing.length; i++)

                        {if (MobileListing[i][4]!="VODAFONE") {count1=i-count2;}

                                          if (MobileListing[i][4]=="VODAFONE")

                                          {j=i-count1-1;
                                           
                                         count2=i;
                                           
                                          if (MobileListing[i][0] != MobileListing[j][0])  { 
 
	    	                             count++;

	                               	    document.Mobile.Mobiletype1.options[count]=new Option();	

		                            document.Mobile.Mobiletype1.options[count].text = MobileListing[i][0];

		                            document.Mobile.Mobiletype1.options[count].value = MobileListing[i][0];  }
                                          
                                            count1=0;}

                                            } }

                  }   //END OF FUCTION selectMobile1     


function selectMobile2(){

		document.Mobile.Mobiletype2.length=1

		var MobileName = document.Mobile.Mobiletype1.options[document.Mobile.Mobiletype1.selectedIndex].text;	
               
		var c=1;

		while (MobileListing[c][0] != MobileName){c++;}

		var e=c;

		while (MobileListing[e][0] == MobileName){e++;if(e==MobileListing.length-1){MobileName="";}}

		var count = 0;

		if (MobileName ==""){e++}

                
                if (document.Mobile.Mobiletype.selectedIndex==0) { 

	  	for (i=c; i < e; i++){

	    	count++;

		    document.Mobile.Mobiletype2.options[count]=new Option();	

		    document.Mobile.Mobiletype2.options[count].text = MobileListing[i][1];

		    document.Mobile.Mobiletype2.options[count].value = MobileListing[i][1];

	                              }
                                                            }

                if (document.Mobile.Mobiletype.selectedIndex==1) {  

	  	for (i=c; i < e; i++){

                  if (MobileListing[i][2]=="COSMOTE")

                                          { count++;

	                               	    document.Mobile.Mobiletype2.options[count]=new Option();	

		                            document.Mobile.Mobiletype2.options[count].text = MobileListing[i][1];

		                            document.Mobile.Mobiletype2.options[count].value = MobileListing[i][1]; }

	    	
	                              }
                                                            }

                 if (document.Mobile.Mobiletype.selectedIndex==2) {  

	  	for (i=c; i < e; i++){

                  if (MobileListing[i][3]=="WIND")

                                          { count++;

	                               	    document.Mobile.Mobiletype2.options[count]=new Option();	

		                            document.Mobile.Mobiletype2.options[count].text = MobileListing[i][1];

		                            document.Mobile.Mobiletype2.options[count].value = MobileListing[i][1]; }
	    	
	                              }
                                                            }

                 if (document.Mobile.Mobiletype.selectedIndex==3) {  

	  	for (i=c; i < e; i++){

                  if (MobileListing[i][4]=="VODAFONE")

                                          { count++;

	                               	    document.Mobile.Mobiletype2.options[count]=new Option();	

		                            document.Mobile.Mobiletype2.options[count].text = MobileListing[i][1];

		                            document.Mobile.Mobiletype2.options[count].value = MobileListing[i][1]; }
	    	
	                              }
                                                            }


	
  
         }  //END OF FUCTION selectMobile2     


