For the railing, you could make up 'L' shapes from cold rolled square stock, insert the short end of the 'L' between the floor boards at the outside edge, hold those in place with brackets screwed to the underside of the boards. That would give you the long side of the 'L' sticking up above the bed to attach horizontal railing to.
That's a great idea
Thanks
Took a few weeks to complete but it's almost done. <img src="http://www.tractorbynet.com/forums/attachment.php?attachmentid=369730"/><img src="http://www.tractorbynet.com/forums/attachment.php?attachmentid=369731"/>