function DeleteItem() {
    return confirm("Delete this item?");
}

function clearField(field, text) {
    if (field.value == text) {
        field.value = '';
    }
}

function GE(id) {
    return document.getElementById(id);
}

// used to open dhtml popup, must include "~/js/common.js" and "~/js/subModal.js" to work
function showDHTMLPopup(url, width, height) {
    initPopUp();    //call to fix ie7 bug
    showPopWin(url, width, height, null, false);
    
}

// used to close dhtml popup, must include "~/js/common.js" and "~/js/subModal.js" to work
function hideDHTMLPopup() {
    hidePopWin();
}

//opens a normal window but without toolbar, status bar, etc (looks like a modal window)
function openMinimalWindow(url, width, height, resizable, centerWindow) {
    var left = 0;
    var top = 0;
    var posAttr = "";
   
    if(centerWindow == true) {
        if(/msie/i.test(navigator.userAgent)) {    //if IE being used
            left = window.screenLeft + (document.body.clientWidth-width)/2;
            top = window.screenTop + (document.body.clientHeight-height)/2;
        }else {
            left = window.screenX + (window.outerWidth-width)/2;
            top = window.screenY + (window.outerHeight-height)/2;
        }
        
        if (left<0) {
            left = 0;
        }
        if (top<0) {
            top = 0;
        }
        
        posAttr = ",left=" + left + ",top=" + top;
    }
    
    var rs = "";
    
    if(resizable == true) {
        rs = "yes";
    }else {
        rs = "no";
    }
        
	var attr = "width=" + width + ",height=" + height + posAttr + ",menubar=no,status=no,scrollbars=yes,resizable=" + rs;
	
	var nw = window.open(url, "cdppopup", attr);
	
	if(nw) {
	    nw.focus();
	}
}

//use for all calls to the exit page
function goExitPage(url) {
    window.open("ExitPage.aspx?navto=" + escape(url));
    return false;
}