function flash(tag) {
	document.write(tag);
}
function getSelectedRadio(radioArray) {
	var i;
	for (i=0; i<radioArray.length; i++) {
		if (radioArray[i].checked)
			return radioArray[i];
	}
	return null;
}
sfHover = function() {
	var sfEls;
	
	sfEls = document.getElementsByTagName("input");
	for (var i=0; i<sfEls.length; i++) {
		if (sfEls[i].type=="submit" || sfEls[i].type=="button") {sfEls[i].className="hand";}
		if (sfEls[i].type=="image") {sfEls[i].className="inputImage";}
		if (sfEls[i].type=="radio") {sfEls[i].className="inputRadio";}
		if (sfEls[i].type=="checkbox") {sfEls[i].className="inputCheckbox";}
		if (!sfEls[i].className || sfEls[i].className=='') {sfEls[i].className="inputField"}
	}
}

//if (window.attachEvent) window.attachEvent("onload", sfHover);

function OpenWindow(URL,windowName,parameters) {
	var win = window.open(URL,windowName,parameters);
	win.focus();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  var win = window.open(theURL,winName,features);
  win.focus();
}

function FilterSelect(SelectId, FilterValue, SelectReferenceId) {
	var oSelect = document.getElementById(SelectId);
	if (!oSelect) return;
	var oSelectRef = document.getElementById(SelectReferenceId);
	if (!oSelectRef) return;

	var i, fProp, keep;
	oSelect.options.length=0;
	for (i=0; i<oSelectRef.options.length; i++) {
		fProp = oSelectRef.options[i].attributes.getNamedItem('filtervalue');
		keep = false;
		if (fProp) {
			if (fProp.value==FilterValue) { keep = true; }
		} else {
			keep = true;
		}
		if (keep) {
			oSelect.options[oSelect.options.length]=new Option(oSelectRef.options[i].text, oSelectRef.options[i].value);
		}
	}
}

function GetAbsoluteTop(oNode) {
	if (oNode.offsetParent) {
		return oNode.offsetTop + GetAbsoluteTop(oNode.offsetParent)
	} else {
		return oNode.offsetTop
	}
}

function GetAbsoluteLeft(oNode) {
	if (oNode.offsetParent) {
		return oNode.offsetLeft + GetAbsoluteLeft(oNode.offsetParent)
	} else {
		return oNode.offsetLeft
	}
}

function SearchBoxStyleFocus(inputElement) {
	inputElement.style.fontStyle='normal';
	inputElement.style.color='black';
	if (inputElement.value=='Recherche') {
		inputElement.value='';
	}
}
function SearchBoxStyleBlur(inputElement) {
	if (inputElement.value=='') {
		inputElement.style.fontStyle='italic';
		inputElement.style.color='#999999';
		inputElement.value='Recherche';
	}
}
function SearchBoxValidate(formElement) {
	if (formElement.SearchText.value=='' || formElement.SearchText.value=='Recherche') {
		formElement.SearchText.focus();
		return false;
	}
	return true;
}

function CheckOption(linkNode) {
	var radioNode = linkNode;
	while (radioNode.tagName!='INPUT' && radioNode.previousSibling)
		radioNode = radioNode.previousSibling;
	if (radioNode.tagName=='INPUT')
		radioNode.click();
}

