 //call need help popup window
 function callHelp(url) {
	callPopup(url, null, "needHelp", 450, 430);
 }

 //call supportingDocument popup window
 function callSupportingDocument(url) {
	callPopup(url, null, "supportingDocument", 430, 500);
 }
 
 //call info accord card
function callInfoAccordCard(url) {
	callPopup(url, null, "infoAccordCard", 540, 500);
}

 //call info Oney Flexpay
function callInfoOneyFlexpay(url) {
	callPopup(url, null, "infoOneyFlexpay", 540, 500);
}

 //call info bank card
function callInfoBankCard(url) {
	callPopup(url, null, "infoBankCard", 470, 500);
}

//call info insurance popup window
function callInfoInsurance(url){
	callPopup(url, null, "infoInsurance", 450, 500);
} 

//call info password popup window
function callInfoPassword(url){
	callPopup(url, null, "infoPassword", 350, 500);
} 

 //call Newsletter popup window
 function callNL(emailElmt){
 	if(emailElmt != null){
 		var url= 'http://www.oney.fr/oney/redirect';
 		var params = 'o=3&r=Newsletter/Inscription&adresseEmail=' + emailElmt.value;
 		callPopup(url, params, 'Newsletter', 700, 650 );
	}
 }
 
  //call popup window
 function callPopup(url, params, windowName, height, width){
 	if(url != null){
 		var windowUrl = url;
 		var windowParams = ''; 		
 		if(params != null){
 			windowUrl += '?';
 			windowUrl += params;
 		}
 		if(height != null){
 			windowParams += 'height='+ height + ',';
 		}
 		if(width != null){
 			windowParams += 'width='+ width + ',';
 		} 		
 		windowParams += 'status=yes,toolbar=no,menubar=no,location=no';

		var aWindow = window.open(windowUrl,windowName,windowParams);
		aWindow.focus();
	}
 }

//hide a DOM element 
 function hideElement(elmt){
 	if(elmt != null){
		elmt.style.display='none';
 	}
 }
 
//show a DOM element 
 function showElement(elmt){
 	if(elmt != null){
		elmt.style.display='block';
 	}
 }
 
 //change the className property of the element
 function changeClass(elmt, className){
 	if(elmt != null){
 		if(elmt.oldClassName == null){
 			elmt.oldClassName=elmt.className;
 		}
 		elmt.className=className;
 	}
 } 
 
 //add a class to current className property of the element
 function addClass(elmt, className){
 	if(elmt != undefined){
 		elmt.oldClassName = elmt.className;
		elmt.className = elmt.className + ' ' + className;
 	}
 }  
 
 //restore the inital className property of the element
 function restoreClass(elmt){
 	if(elmt != undefined && elmt.oldClassName != undefined){
		elmt.className = elmt.oldClassName;
 	}
 }  

 // retourne un objet xmlHttpRequest.
 // méthode compatible entre tous les navigateurs (IE/Firefox/Opera)
 function getXmlHttpRequest(){
	var xhr = null;

	if(window.XMLHttpRequest) // Firefox et autres
		xhr = new XMLHttpRequest();
	else if(window.ActiveXObject) { // Internet Explorer
		try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e1) {
				xhr = null;
			}
		}
	} else { // XMLHttpRequest non supporté par le navigateur
		throw "Votre navigateur ne supporte pas les objets XMLHTTPRequest...";
	}
	
	return xhr;
}

function flashNavigation(action) {
alert(action);
}