function getXMLHTTP() { //fuction to return the xml http object
        var xmlhttp=false;    
        try{
            xmlhttp=new XMLHttpRequest();
			//alert("hi XMLHttpRequest");
        	}
        catch(e){        
				try{            
					xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
					//alert("hi Microsoft.XMLHTTP");
					}
				catch(e){
						try{
								req = new ActiveXObject("Msxml2.XMLHTTP");
								//alert("hi Msxml2.XMLHTTP");
							}
                catch(e1){
                    xmlhttp=false;
                		}
           			 }
       			 }
             
        return xmlhttp;
    } // the above function creates the browser specific object. 
	
function check(strURL,div) // To get the Package details by using AJAX
    {    // alert("hi");
//alert(strURL+div); 
        var req = getXMLHTTP();    
        if (req) 
        {
            
            req.onreadystatechange = function() 
            {
               //alert(req.responseText); exit;
				if (req.readyState == 4) 
                {
                    // only if "OK"
                  //alert(req.responseText); exit;
                    if (req.status == 200)
                     {   //alert("hi")     
                         document.getElementById(div).innerHTML=req.responseText;    
                          if(document.getElementById("captcharesult").value=='')
						  { 
							  document.getElementById("code").value='';
							  }
						
                     } 
                    else
                     {
                        alert(req.statusText);
                    }
                }                
            }
            //alert(strURL);
            
            req.open("GET", strURL, true);
            req.send(null);
            //alert("hello");
        }
        //alert("hello");        
    }	
	
