	function VersionNavigateur(Netscape, Explorer) {
	if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||
	(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
	return true;
	else return false;
	}
	
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	function send_request(query)
		{
			var xhr_object;
		    if(window.XMLHttpRequest) // FIREFOX
			{
		        xhr_object = new XMLHttpRequest();
			}else if(window.ActiveXObject) // IE
			{
		        xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
			}else
			{
		        return(false);
			}

		    xhr_object.open("GET", query, false);
		    xhr_object.send(null);
			
			// just a little loop in order to force reconnect with server
			var lRetryIndex=0;
			while(xhr_object.status == 101 && lRetryIndex < 3)
			{
				lRetryIndex++;
				xhr_object.abort();
				xhr_object.open("GET", query, false);
				xhr_object.send(null);
			}
			
		    if(xhr_object.readyState == 4) 
			{
		        return(xhr_object.responseText);
			}else 
			{
		        return(false);
			}
		}
		function doSendMsg()
		{
			var lMsg = document.getElementById('customermsg').value;
			var lQuery = "storeAndSend.php?msg="+lMsg;
			// alert(lQuery);
			send_request(lQuery);
			// Call Google tracking
			window.open("google_message_tracking.html", "mymessageiframe");
			alert("Merci pour votre message. Notre equipe commerciale va prendre contact avec vous dans les meilleurs delais.");
			document.getElementById('customermsg').innerHTML = "Merci et à très bientôt.";
		}
		
		function cleanText()
		{
			document.getElementById('phonenumber').value='';
		}
		function callbackplease()
		{
			var lMsg = "OBooLo Web Site. Please call back "+document.getElementById('phonenumber').value;
			var lQuery = "sendSms.php?msg="+lMsg;
			// alert(lQuery);
			send_request(lQuery);
			// Call Google tracking
			window.open("google_callback_tracking.html", "mycallbackiframe");
			alert("Merci pour votre message. Un conseiller va prendre contact avec vous dans les meilleurs delais.");
			document.getElementById('phonenumber').value = "A très bientôt";
		}
		
		function doChangeStatus(pId)
		{
			if(document.getElementById(pId).checked == true)
			{
				var lQuery = "storeAccountChange.php?id="+pId+"&checked=1";
			}else
			{
				var lQuery = "storeAccountChange.php?id="+pId+"&checked=0";
			}
			send_request(lQuery);
		}
	
	MM_preloadImages('pic/logo_pme_click.png', 'pic/logo_collaborateurs_click.png', 'pic/logo_pro_click.png', 'pic/logo_oboolo_netfile_click.png', 'pic/logo_oboolo_netbackup_click.png');
	
	//SETTING UP OUR POPUP  
	//0 means disabled; 1 means enabled;  
	var popupStatus = 0; 

	//loading popup with jQuery magic!  
	function loadPopup(pId)
	{  
		//loads popup only if it is disabled  
		if(popupStatus==0){  
		$("#globalpagediv").css({  
		"opacity": "0.7"  
		});  
		$("#globalpagediv").fadeIn("slow");  
		$("#"+pId).css({  
		"opacity": "1"  
		});
		$("#"+pId).fadeIn("slow");  
		popupStatus = 1;  
		}  
	} 
	//disabling popup with jQuery magic!  
	function disablePopup(pId)
	{  
		//disables popup only if it is enabled  
		if(popupStatus==1){    
			$("#globalpagediv").css({  
			"opacity": "1"  
			});  
			$("#globalpagediv").fadeIn("slow"); 
			
			$("#"+pId).fadeOut("slow");
			popupStatus = 0;  
		}  
	}
	//centering popup  
	function centerPopup(pId)
	{  
		//request data for centering  
		var windowWidth = document.documentElement.clientWidth;  
		var windowHeight = document.documentElement.clientHeight;  
		var popupHeight = $("#"+pId).height();  
		var popupWidth = $("#"+pId).width();  
		//centering  
		$("#"+pId).css({  
		"position": "absolute",  
		"top": windowHeight/2-popupHeight/2,  
		"left": windowWidth/2-popupWidth/2  
		});  
		//only need force for IE6  
		  
		$("#globalpagediv").css({  
		"height": windowHeight  
		});  
	}
	
	function showPopup(pId)
	{
		//centering with css  
		centerPopup(pId);  
		//load popup  
		loadPopup(pId);  
	}
	
	//callback function to bring a hidden box back
	function callbackIn(){
		/*setTimeout(function(){
			$("#maindiv:hidden").removeAttr('style').hide().fadeIn();
		}, 0);*/
	}
	function callbackOut(){
		/*setTimeout(function(){
			$("#maindiv:visible").removeAttr('style').hide().fadeOut();
		}, 1000);*/
	};
		
	//run the currently selected effect
	function runEffectIn(pId)
	{
		//get effect type from 
		var selectedEffect = "drop";
		
		//most effect types need no options passed by default
		var options = {};
		
		//run the effect
		$("#"+pId).hide(selectedEffect,options,2500,callbackIn);
	}
	function runEffectOut(pId){
		//get effect type from 
		var selectedEffect = "drop";
		
		//most effect types need no options passed by default
		var options = {};
		
		//run the effect
		$("#"+pId).show(selectedEffect,options,2500,callbackOut);
	};
	var gLogoDivId=0;
	function doChangeLogoDiv(picId)
	{
		if(gLogoDivId == 0)
		{
			document.getElementById(picId).src = "pic/oboolo_standard_web_slogan.png";
			gLogoDivId=1;
		}else
		{
			document.getElementById(picId).src = "pic/oboolo_standard_web_slogan_2.png";
			gLogoDivId=0;
		}
	}
	function doAnimation()
	{
		runEffectIn("logodiv");
		setTimeout("doChangeLogoDiv('logopic')", 2500);			
		runEffectOut("logodiv");
	}
	
	function initCatalogueProduct(pId)
	{
		//CLOSING POPUP  
		//Click the x event!  
		$("#"+pId).click(function(){  
			disablePopup(pId);  
		});  
		//Press Escape event!  
		$(document).keypress(function(e){  
			if(e.keyCode==27 && popupStatus==1)
			{  
				disablePopup(pId);  
			}  
		});
	}
	
//	var timer = setInterval("doAnimation()", 7000);

	function onLoadTime()
	{
		initCatalogueProduct('agendapresentation');
		initCatalogueProduct('collaboratifpresentation');
		initCatalogueProduct('documentspresentation');
		initCatalogueProduct('actualitespresentation');
		initCatalogueProduct('intranetpresentation');
		initCatalogueProduct('messageriepresentation');
		initCatalogueProduct('projetspresentation');
		initCatalogueProduct('ressourcespresentation');
		initCatalogueProduct('rhpresentation');
		initCatalogueProduct('pointeusepresentation');
		initCatalogueProduct('netfilepresentation');
		initCatalogueProduct('netbackuppresentation');
		initCatalogueProduct('collectivitespresentation');
		initCatalogueProduct('crmpresentation');
		initCatalogueProduct('propresentation');
		initCatalogueProduct('gescompresentation');
	}

