
cgiPath = 'http://www.reely.com/cgi-bin/';
topPath = 'http://www.reely.com/';
cgiSites = new Array ('www.reely.com','copies.reely.ca/new','www.reely.ca');
cgiPaths = new Array ('http://www.reely.com/cgi-bin/','http://copies.reely.ca/new/cgi-bin/','http://www.reely.ca/cgi-bin/');
topPaths = new Array ('http://www.reely.com/','http://copies.reely.ca/new/','http://www.reely.ca/');

re = /\/\S+\//;
topRoot = window.location.pathname.match(re);
if (topRoot == null) {topRoot = "/";}

cgiLength = cgiSites.length;
sitePath = window.location.href;
for (i=0;i<cgiLength;i++) {
	if (sitePath.indexOf(cgiSites[i]) >= 0) {
		cgiPath = cgiPaths[i];
		topPath = topPaths[i];
		}
	}


