/* POPUPS */

var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
		newWin.close();
	}
}

function popUp(strURL,strType,strHeight,strWidth) {
	closeWin();
	var strOptions="";
	if (strType=="console") strOptions="resizable,scrollbars,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}

/* DISLAY INFOS */

function displayInfos(optionValue) {
	
	if (optionValue != "null") {
		nullSelect();
		//var showControl = document.getElementById('showControl');
		var mySpan = document.getElementById('infosText'+optionValue);
		//showControl.style.visibility = "visible";
		mySpan.style.display = "block";
	}
	else {
		nullSelect();
	}
}

function nullSelect() {
	var showControl = document.getElementById('showControl');
	var hideDivs = document.getElementsByTagName('div');
	for(var i = 0 ; i < hideDivs.length ; ++i){
		if (hideDivs[i].className == 'displayNone') {
			hideDivs[i].style.display = "none";
		}
	}
	//showControl.style.visibility = "hidden";
}

function resetInfos(target) {

	var divReset = document.getElementById('' + target + 'Result');
	divReset.innerHTML = "";
}

/* RAS */

function ras(n, form) {
	document.forms[form].elements[n].value="";
}



