Again this function seems unnecessary. You should learn to use jQuery.