	/* Formulari de correccions i traduccions. Serveis lingüístics. Universitat de Barcelona */
        /* Popups: característiques finestra formulari */
	/* Programadora: Anna Grau */
        /* Última actualització: Febrer de 2005 */


var newWindow = null;

function openWindow(contentURL,windowName,windowWidth,windowHeight) {
	widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
	newWindow = window.open(contentURL,windowName,widthHeight);
	newWindow.focus()
}

function closeWindow() {
	if (newWindow != null)  {
	 newWindow.close();
	 newWindow = null;
	}
}

function toggleWindow(contentURL,windowName,windowWidth,windowHeight) {
	if (newWindow == null) {
		widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
		newWindow = window.open(contentURL,windowName,widthHeight);
		newWindow.focus()
	}
	else {
	 	newWindow.close();
	 	newWindow = null;
	}
}
function openAdjunt(contentURL,windowName,windowWidth,windowHeight) {
        widthHeight = 'height=' + windowHeight + ',width=' + windowWidth + ',scrollbars=yes' + ',statusbar=no';
        newWindow = window.open(contentURL,windowName,widthHeight);
        newWindow.focus()
}

