Added more dynamic control of x,y pos of blue box. It now has detection of portrait or landscape.