// JavaScript Document
isIE = (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent));
function urlencode(str) {
    return escape(str);
}
function setOpacity(obj, value) {
	if (obj) {
		if (isIE) obj.style.filter = 'alpha(opacity=' + value * 10 + ')'; else obj.style.opacity = value/10;
	}
}
// Retrouver l'offset d'un objet  quelque soit la config d'un objet
function findPos(obj) { 
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}

function getElementTextNS(prefix, local, parentElem, index) {
    var result = "";
    result = parentElem.getElementsByTagName(local)[index];
    if (result) {
        if (result.childNodes.length > 1) {
            return result.childNodes[1].nodeValue;
        } else {
            return result.firstChild.nodeValue;    		
        }
    } else {
        return "n/a";
    }
}
function printMail(user,domaine,texte, classCSS) {
	if ((user != '' ) &&  (domaine != '' )) {
		email = user + "@" + domaine;
		if (texte + '' == '') texte = email;
		var stClass = "";
		if (classCSS + '' != '') stClass = "class='" + classCSS +"'"; 
		html= '<a href="mailto:' + email +'" ' + stClass + '>' + texte + '</a>';
		document.write(html);
	}
}

function showDebug(msg){
	document.getElementById('divdebug').innerHTML=debug;
	document.getElementById('divdebug').syle.display="block";
//  style="display:block;"	
}
function setOpacity(obj, value) {
	if (obj) {
		if (isIE) obj.style.filter = 'alpha(opacity=' + value*10 + ')';	 else obj.style.opacity = value/10;
	}
}

