var counterser=1;function explode(delimiter,string,limit){var emptyArray={0:''};if(arguments.length!=3||typeof arguments[0]=='undefined'||typeof arguments[1]=='undefined'||typeof arguments[2]=='undefined')
{return null;}
if(delimiter===''||delimiter===false||delimiter===null)
{return false;}
if(typeof delimiter=='function'||typeof delimiter=='object'||typeof string=='function'||typeof string=='object')
{return emptyArray;}
if(delimiter===true){delimiter='1';}
if(!limit){return string.toString().split(delimiter.toString());}else{var splitted=string.toString().split(delimiter.toString());var partA=splitted.splice(0,limit-1);var partB=splitted.join(delimiter.toString());partA.push(partB);return partA;}}
var xmlHttp
function showProducts(str,showloca)
{xmlHttp=GetXmlHttpObject();var setcostval='no';if(showloca.search(/cost/)!='-1'){var recv_Arr=new Array(2);recv_Arr=explode("_",str,100);var productval=recv_Arr[1];var productqty=recv_Arr[0];var str=productqty+'_'+document.getElementById(productval).value;var setcostval='yes';}
if(str==""){alert("Assign Any Member");return false;}
if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="addprod_ajax.php";url=url+"?pid="+str+"&act="+showloca;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){var respo_Arr=new Array(2);respo=xmlHttp.responseText;respo_Arr=respo.split("_");var div_id=respo_Arr[0];var div_txt=respo_Arr[1];if(setcostval=='yes'){document.getElementById(showloca).value=respo;}else{document.getElementById(showloca).innerHTML=respo;}
counterser++;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
