function charge_xml(table, champ, filtre, filtre_id, sel) {
var url; 
var moz = (document.implementation && document.implementation.createDocument); 
var ie = (window.ActiveXObject); 
   url = './charge_xml.asp?table=' + escape(table); 
   url += '&champ=' + escape(champ);
   url += '&filtre=' + escape(filtre);
   url += '&filtre_id=' + escape(filtre_id);
   url += '&ord=' + rnd();
   if (moz)    {var xmlHTTP = new XMLHttpRequest();}
   else if (ie)    {var xmlHTTP = new ActiveXObject('Microsoft.XMLHTTP');}
   
	xmlHTTP.open('GET',url, true,'webuser', 'web123');

 	xmlHTTP.onreadystatechange = function()
    {
	   	if(xmlHTTP.readyState == 4)
    	{
    	   if (ie)
    	   {
                var xmlDocument = new ActiveXObject("Microsoft.XMLDOM");
                xmlDocument.loadXML(xmlHTTP.responseText);
              
        	}
        else if (moz)
        	{
        	   var xmlDocument = xmlHTTP.responseXML;
        	}
        	
        	var d = xmlDocument.getElementsByTagName('PDS');

   			for (x=sel.length-1; x>=0; x--)   {sel.options[x] = null;}

		
			sel[sel.length] = new Option('Choose ...','');

   			for (x=0; x<=d.length-1; x++) 
   			{
      			sel[sel.length] = new Option(d[x].getAttribute('nom'));
      			sel[sel.length-1].value = d[x].getAttribute('nom'); 
   			}
    	}
    }

    xmlHTTP.send(null);

}

function rnd() {
   ord=Math.random();
   ord=ord*10000000000000000000;
   return ord;
}

function raz(sel)
{
for (x=sel.length-1; x>=0; x--)   {sel.options[x] = null;}
sel.options.length = 0;
}

function validateValues() {

 if ((document.f.DPOD.value=='') || (document.f.WTFT.value=='') || (document.f.Grade.value=='') || (document.f.Conn.value=='') || (document.f.ConnYieldStress.value=='') || (document.f.OD.value=='') || (document.f.ID.value==''))
 {
 	 alert ("All fields are required");
 	 return false;
 }
 else
 {
 	var w = window.open('about:blank','popup','scrollbars=yes,resizable=yes,width=600,height=700');
 	w.moveTo(80,100);
 	w.focus();
 	document.f.action='view_pds.asp';
 	document.f.method='POST';
 	document.f.target='popup';
 	document.f.submit();
 }
 
 }
 