var req1;
            
            function retrieveUniversityOptions(id){

                secondBox = document.getElementById('state1'); 
                //alert(secondBox.options[secondBox.selectedIndex].value);
                selectedOption1 = secondBox.options[secondBox.selectedIndex].value;
                                
                  
               if(selectedOption1==0)
                    {
                        document.getElementById('university').options[0]= new Option('--Select University---','--Select University---');
                       
                    }
               
                url="./gttGMUniversityDisplay.do?selectedOption1="+selectedOption1;
                
                //Do the Ajax call
                try
                {
                    // Firefox, Opera 8.0+, Safari
                    req1=new XMLHttpRequest();
                    
                }
                catch (e)
                {
                    // Internet Explorer
                    try
                    {
                        req1=new ActiveXObject("Msxml2.XMLHTTP");
                    }
                    catch (e)
                    {
                        try
                        {
                            req1=new ActiveXObject("Microsoft.XMLHTTP");
                        }
                        catch (e)
                        {
                            alert("Your browser does not support AJAX!");
                            return false;
                        }
                    }
                }
                
                req1.open("POST", url, true);
                req1.send(null);
                req1.onreadystatechange = populateThirdBox;
                
               
              }

            function populateThirdBox(){
                
                document.getElementById('university').options.length = 0;

                if (req1.readyState == 4) {
                    
                    // Complete
                    //var returnElements;
                    textToSplit = req1.responseText;
                    var returnElements=textToSplit.split("|");
                    //alert("returnElements-->"+returnElements);
                    if (req1.status == "200") {                                        // OK response
                        for ( var i=0; i<(returnElements .length)-1; i++ ){
                            valueLabelPair = returnElements[i].split(",");
                            document.getElementById('university').options[i] = new Option(valueLabelPair[1], valueLabelPair[1]);
                            
                            
                            
                      }
                    }
                  } 
                }
