function encode(str) { if (encodeURIComponent) { str=encodeURIComponent(str) } else { str=escape(str).replace(/\+/gim,"%2B") } return str } str="fred="+encode(fred)+ "&barney="+encode(barney) postURL('bambam.1',str,callback, "application/x-www-urlencoded")