function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
 function changeContactDropbox(form) {
    //alert(form);
		var val=form.regionid.options[form.regionid.options.selectedIndex].value;
		var strURL='/ajaxinc/contactcategories.php?regionID='+val;
		if(form.contactcategoryid) { 
		  var val3=form.contactcategoryid.options[form.contactcategoryid.options.selectedIndex].value;
		  if(val3) strURL +='&concatID='+val3;
		}
		//this.displayForm(val);
		//alert(strUrl);
	  var req = getXMLHTTP(); // fuction to get xmlhttp object
    if (req) {
      req.onreadystatechange = function() {
        if (req.readyState == 4) { //data is retrieved from server
          if (req.status == 200) { // which reprents ok status       
            var prodResponse ='<h3 style=\"color:#006890;\">Please select a product type from above</h3>If you are not sure of the correct product type, or require any further assistance please contact us by telephone at 1800 352 228 (Australia) or +61 2 8853 3000 (International), or by email via <a href=\"mailto:imatech@imatech.com.au\">imatech@imatech.com.au</a>.';
            document.getElementById('listCats').innerHTML=req.responseText;   
            document.getElementById('displayContactDetails').innerHTML=prodResponse;  
          } else { 
            alert("There was a problem while using XMLHTTP:\n");
          }
        }            
      }        
      req.open("GET", strURL, true); //open url using get method
      req.send(null);
    }
    if(form.contactcategoryid) { 
    	this.changeContactDropbox1(form);
    	
    }
    
  }
  
  
  function changeContactDropbox1(form) {
		var val=form.regionid.options[form.regionid.options.selectedIndex].value;
		var val1=form.contactcategoryid.options[form.contactcategoryid.options.selectedIndex].value;
		var strURL='/ajaxinc/contacts.php?regionID='+val;
		if(val1) strURL +='&concatID='+val1;
		//alert(strUrl);
	  var req1 = getXMLHTTP(); // fuction to get xmlhttp object
    if (req1) {
      req1.onreadystatechange = function() {
        if (req1.readyState == 4) { //data is retrieved from server
          if (req1.status == 200) { // which reprents ok status                    
          document.getElementById('displayContactDetails').innerHTML=req1.responseText;
          } else { 
            alert("There was a problem while using XMLHTTP:\n");
          }
        }            
      }        
      req1.open("GET", strURL, true); //open url using get method
      req1.send(null);
    }
   
  }