function popUp()
{
    var div;
    if(document.getElementById)
    // Standard way to get element
    div = document.getElementById('linkpopup'); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all['linkpopup']; 
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&div.offsetHeight!=0)?'block':'none'; 
    }
    // if passed custom url and/or title then set values
    if (arguments.length > 0) {
        var overrideUrl = (arguments && arguments[0] != null) ? arguments[0] : null;
        var overrideTitle = (arguments && arguments[1] != null) ? arguments[1] : null;
        if (overrideUrl != null) {
            document.linkToPageFrm.textfield[0].value = overrideUrl;
        }
        if (overrideTitle != null) {
            var shortTitle = (overrideTitle.indexOf("/") > -1) ? overrideTitle.substring(overrideTitle.lastIndexOf("/")+1, overrideTitle.length) : overrideTitle;
            var newValue = "<a href=\"" + document.linkToPageFrm.textfield[0].value + "\" title=\"" + shortTitle + "\">Click here to view " + shortTitle + "</a>";
            document.linkToPageFrm.textfield[1].value = newValue;
        }
    }

    // If the PopUp is hidden ('none') then it will display it ('block').
    // If the PopUp is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
    // Off-sets the X position and Y position
    X = -100;
    //X = 470;
    Y = 90;
    // Sets the position of the DIV
    div.style.left = X+'px';
    div.style.top = Y+'px';
}
