function checkMainSize_OLD() {
	var NomNav = navigator.appName; 
	var VersNav = navigator.appVersion; 
	var isIE7 = false;
	if (NomNav == "Microsoft Internet Explorer") {
		ms = navigator.appVersion.indexOf("MSIE");
		VersNav = navigator.appVersion.substring(ms+5, ms+6);
	}
	if (NomNav == "Microsoft Internet Explorer" && VersNav<=6) return true;

	if (NomNav == "Microsoft Internet Explorer" && VersNav==7) {
		isIE7 = true;
		document.getElementById("col-right").style.styleFloat = 'left';
	}

	rightHeight = document.getElementById("col-right").offsetHeight;
	mainHeight = document.getElementById("main").offsetHeight;
	maxHeight = 465;
	
	//document.getElementById("col-right").style.height = mainHeight;
	//alert('main: '+mainHeight+' -- right: '+rightHeight);

	if (!document.getElementById("breadcrumbs")) {
		document.getElementById("overflow").style.height = '485px';
		//maxHeight = 486;
	}
	
	//if (!document.getElementById('checkoutSteps')) {
	/*	if (rightHeight > mainHeight) {
			document.getElementById("col-right").style.height = (rightHeight-4)+'px';
			if(!document.getElementById('checkoutSteps')) document.getElementById("col-right").style.overflowY = 'hidden';
			//document.getElementById("col-right").style.overflow = 'hidden';
		} 
*/

		if (rightHeight<maxHeight && mainHeight<maxHeight) {
			//document.getElementById("main").style.width = '621px';
			document.getElementById("overflow").style.overflowY = 'hidden';
			if (rightHeight<465) {
			document.getElementById("col-right").style.height = '465px';
			}
		}


		if (rightHeight < mainHeight && mainHeight > maxHeight) {
			
			//mainDiff = (!document.getElementById('checkoutSteps'))? 4:123;
			//document.getElementById("col-right").style.height = (mainHeight+mainDiff)+'px';

			if (rightHeight<(mainHeight+4)) {
				document.getElementById("col-right").style.height = (mainHeight+4)+'px';
			}
			//document.getElementById("col-right").style.height = (mainHeight+4)+'px';
			document.getElementById("overflow").style.overflowY = 'auto';
			if (!isIE7) {
				if (window.navigator.appName != 'Microsoft Internet Explorer' 
					|| (window.navigator.appName = 'Microsoft Internet Explorer' && VersNav>7) ) 
					document.getElementById("main").style.width = '604px';
				else document.getElementById("main").style.width = '621px';
			}
		}
/*	} else { // onepage checkout
			//document.getElementById("main").style.width = '621px';
			document.getElementById("overflow").style.overflow = 'auto';
			document.getElementById("col-right").style.height = '465px';
	}*/
}

function popupcalc(MerchantID,Amount){
		var win2 = window.open("http://www.receiveandpay.com/wallet/customer/calculette.php?MerchantID="+MerchantID+"&affiche=divbarem4&Amount="+Amount ,'popup','height=503,width=600,status=yes,scrollbars=yes,menubar=no,resizable=yes');
}

function addToFavorites(urlAddress, pageName) {
    if (document.all) {
        window.external.AddFavorite(urlAddress,pageName);
    }
    else if (window.sidebar) {
        window.sidebar.addPanel(pageName, urlAddress, "");
    }
    else {
        alert("Désolé! Votre navigateur ne supporte pas cette fonction.");
    }
}
