if( !document.head ) document.head = document.getElementsByTagName( "head" )[ 0 ] alert( document.head.parentNode );