
//var pcscript = "graph.Categories(Group 1, , ) graph.Series(Item 1,54,75,85; Item 2,92,60,70; Item 3,69,87,37; Item 4,11,22,33; Item 5,44,33,77)"
function LoadPopChart(img_width,img_height,pcscript,server,appearance_file){
	document.write("<IMG WIDTH="+img_width+" HEIGHT="+img_height+" SRC=http://" + server + "/?@_GIF@_WIDTH"+img_width+"@_HEIGHT"+img_height+"@_FILE/apfiles/" + appearance_file + "@_PCSCRIPT"+URLEncode(pcscript)+">")
}

function URLEncode(str)
{
	var ms = "%25#23 20?3F<3C>3E{7B}7D[5B]5D|7C^5E~7E`60"
	var msi = 0
	var i,c,rs,ts
	while (msi < ms.length)
	{
		c = ms.charAt(msi)
		rs = ms.substring(++msi, msi +2)
		msi += 2
		i = 0
		while (true)
		{
			i = str.indexOf(c, i)
			if (i == -1) break
			ts = str.substring(0, i)
			str = ts + "%" + rs + str.substring(++i, str.length)
		}
	}
	return str
}

