
/*  Design Tool Javascript functions */


// Implements pop-up
function PopUp_URL(URL) 
{
	window.open(URL);
}

// This method will take and move the page element passed into it using the supplied offsetX and offsetY.  The offsets
// should be in the form of px.  No need to add the px but just be aware it is moving in pixels.
// This function is dependent on scriptaculous
function dtc_moveElement(elem, offsetX, offsetY, e)
{
    var posx = 0;
    var posy = 0;
    var offsetx = 0;
    var offsety = 0;
    
    // Check to see if we have a value sent in for the offsets
    if (offsetX != null)
        offsetx = offsetX;
    if (offsetY != null)
        offsety = offsetY;

    if (!e) var e = window.event;
    
    if (e.pageX || e.pageY)
    {
        posx = e.pageX;
        posy = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
        posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
        posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
    }
    
    // Now that we have the position of where an item was clicked lets move it.
    new Effect.Move(elem, {x:posx + offsetx, y:posy + offsety, mode:'absolute', duration:0});
}


   


        
        