var cp;
var ajaxReady;

ajaxInit();

function ajaxInit(){
	if( typeof( cpaint_loaded ) == 'undefined' ) {
		setTimeout('ajaxInit()', 1000 );
		return;
	}
	cp = new cpaint();
	cp.set_debug( -1 );
	cp.set_response_type( 'TEXT' );
	if( cp.capable )
		ajaxReady = true;
}

