split value from units
if element.style.top => '15px'
splitUnit( element.style.top ) => [15,'px']
function splitUnit(e) /* * takes a string and seperates 'px or 'em' from it * * could be streamlined to simply seperate the last two characters, but that could cause errors if used sloppily */ { if( e && ( length = e.search( /px/ ) ) ) {var eUnit = 'px'; var eValue = e.substr( 0, length );} else if( e && ( length = e.search( /em/ ) ) ) {var eUnit = 'em'; var eValue = e.substr( 0, length );} else return false; return new Array( eValue, eUnit ); }