-->
Make your own free website on Tripod.com
Enabling cookies

Step 1: Include the javascript file:
<script src="moving2.js"></script>
Step 2: Call the moving function:
<script>
MoveContainer(document.body, true);
</script>
Restoring the page

Step 1.Include the javascript file:
<script src="moving2.js"> </script>
Step 2. Call the moving function:
<script>
function restore(c) {
if(c.__wrapperContainer)
 c.__wrapperContainer().restore();
}
</script>

* 'c' is a reference to a node that was previously transformed using MoveContainer

The cookie is used to save information about the elements inside the 'transformed' container so that the next time a certain user visits the same page, the position of the moved elements will be updated from the cookie, instead of using the original ones.

If the content of the page is changed, there is an algorithm trying to match the new elements with the positions saved in the cookie. This means that unless the page is completely modified, it'll manage to use the correct positions for the previously existing elements.

When a transformed node is restored, all its children nodes will go back to their original state. If the transformed node is updated dynamically (adding/removing child nodes), the MovingContainer has methods for registering new children, or removing those who were deleted.