var field=new Array();
field=c.split("~");
var cou=0;
for(i=0;i<field.length;i++)
 {
  if(document.getElementById(field[i]).value=="")
   {
	 cou++;
   }
 }
if(cou>0)
 {
   alert("پر کردن فیلدهای ستاره دار الزامی است");
   document.getElementById(field[0]).focus();
   return false;

 }
else
 {
 var url=b;
   var params ="param="+a+"&neew="+'1';
   httpxml.open("POST", url, true);
   httpxml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   httpxml.setRequestHeader("Content-length", params.length);
   httpxml.setRequestHeader("Connection", "close");
   httpxml.send(params);
 for(i=0;i<field.length;i++)
 {
  if(document.getElementById(field[i]).value!="")
   {
	 document.getElementById(field[i]).value="";
   }
 }

 }

}