var waitMsgWnd = null;function doRefreshDocs() {	var retVal = ShowModalPopup("/"+dbFullName+"/RunRefreshDocs?OpenPage","",240,130);	if (retVal) {		doRefreshDocsStep2(retVal);	}}function doRefreshDocsStep2(option) {	if (option == 'selected') {  		// returns a java.util.Vector containing doc id's		if (!activeDocuments) {			activeDocuments = getSelectedDocuments().split(' ');			currentDocument = 0;		} else {			currentDocument = currentDocument + 1		}	} else if (option == 'all') {		if (!activeDocuments) {			activeDocuments = getAllDocuments().split(' ');			currentDocument = 0;		} else {			currentDocument = currentDocument + 1		}	}	if (currentDocument >= 0 ) {		if (activeDocuments[currentDocument]) {			showRefreshMessage('refresh.gif');			top.runAgents.location = "/"+dbFullName+"/(RefreshDocuments)?OpenAgent&ID=" + activeDocuments[currentDocument] + "&vn=" + refreshView_G + "&";		} else {			activeDocuments = null;				top.ViewNavFrame.location.reload();		}	}}