var scmain = {
	coid : null,		//company id
	refid: 0,			//referral id (company id)
	invoiceid: 0,
	selarr : '', 		//base64/json encoded treelist array
	listtype : 0,		//list type (tree = 1, dropdown = 2)
	tl_maindiv:null,
	sendreq : function (strin, procfile){
		if (!(procfile)||procfile=="undefined"){
			alert("Warning: no procfile sent to scmain.sendreq");
			return;
		}
		if (this.coid) strin="&coid="+this.coid+strin;
		if (this.refid) strin="&refid="+this.refid+strin;
		if (this.invoiceid) strin="&invoiceid="+this.invoiceid+strin;
		if (this.selarr) strin="&selarr="+this.selarr+strin;
		if (this.listtype) strin="&listtype="+this.listtype+strin;
		if (this.tl_maindiv) strin="&tl_maindiv="+this.tl_maindiv+strin;
		//alert(strin);  //for debugging
		//greq.sendreq(strin, this.procfile);
		//IE gets stuck on readyState=2 sometimes with the above, this below fixes that.
		setTimeout("greq.sendreq('"+strin.replace(/'/g,"\\'")+"', '"+procfile+"');",0);
	}
};
