tested IE6-8
add debug option
delete debug code