Fix script to function in firefox 3.5.5