function createDiv(p) {
	var D = document.createElement('div');
	p = p || document.body;
	D.style.position = 'relative';

	if (p && p.appendChild) {
		p.appendChild(D);
	}
	return D;
}




function rfLoadingStatus(message, stopFunction) {
	var d,s, L;
	L=this;
	L.stopFunction = stopFunction;
	d = this.div = createDiv();
	s=d.style;
	s.zIndex= 32000;
	s.top = '40%';
	s.left = '50%';
	s.border = '2px inset black';
	s.marginLeft = '-112px';
//	s.height = '50px';
	s.width = '224px';
	s.position='absolute';
	s.textAlign = 'center';
	s.backgroundColor = 'white';
	d.innerHTML = message;
	

	this.bar = createDiv(this.div);	
	s=this.bar.style;
	s.width = '224px';
	s.height = '16px';

	for (x=0; x<8; x++) {
		s=createDiv(this.bar).style;
		s.width = '16px';
		s.height = '16px';
		s.cssFloat = 'left';
		s.styleFloat= 'left';
		s.backgroundColor = 'rgb(0,0,' + (255-x*20) +')';
	}
	for (x=6; x>0; x--) {
		s=createDiv(this.bar).style;
		s.width = '16px';
		s.height = '16px';
		s.cssFloat = 'left';
		s.styleFloat= 'left';
		s.backgroundColor = 'rgb(0,0,' + (255-x*20) +')';
	}

	L.unload = function() {
		var p;
		L.div && (p=L.div.parentNode) ? p.removeChild(L.div) : 0;
		L.div = null;
		L.bar = null;
	}
	L.run = function() {
		var stp;
		if (L.div && (!L.stopFunction || !(stp=L.stopFunction()))) {
			var c = L.bar.childNodes;
			L.bar.insertBefore(L.bar.childNodes[c.length-1],c[0]);
			setTimeout(L.run,50);
		}
		if (stp) { L.unload(); }
	}
	L.run();
}
var LOADING_OBJECTS = 1;
//new rfLoadingStatus('Loading Page...',function() { return LOADING_OBJECTS==0; });



