The problem is that the dimensions of the div box and its location will be changing dinamically via JavaScript, and the box itself must be 100% transparent. Look at the picture to figure out what I mean. As far as I know, there is nothing that can be done via pure CSS, am I right? Maybe you know some tricks that could help me out (except for that when it's done with four boxes on the perimeter nor when it's done with nested boxes)?
Picture: http://savepic.org/85113.png