

var submitcount = 0; 
var popup_window = null; 

function checkSubmit() 
{
	if(submitcount==0) 
	{
		submitcount++;
		return true;
	} else {
		return false;
	}
}


function Popup(page) {
	window.open( page, "popup", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=650,height=450");
}

function Popquestion(page) {
	if(popup_window != null) 	popup_window.close ();	
	popup_window = window.open( page, "popup", "toolbar=no,addressbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=650,height=350");
}

function AfficheQuestion (urlbase, year, reference) {
	ChangeColor (reference); 
	page = urlbase + "archives/annales/" + year + "/" + reference + "/" + reference + ".htm"; 
//	window.alert (page); 
	Popquestion(page); 
	popup_window.focus ();
	return false;
}

function ChangeColor (reference) {
	var arr_normal = document.getElementsByTagName('td');  
	var arr_select = document.getElementsByName(reference);
	for(i=0;i<arr_normal.length;i++) {
		arr_normal[i].style.backgroundColor = '';
	}
	for(i=0;i<arr_select.length;i++) {
		arr_select[i].style.backgroundColor = 'yellow';
	}
}


