function HM_lang_Toggle() {
   var isFrench = false;
   var theurl = (location.href);
   var newUrl = "";
   langLoc = theurl.indexOf("/fr/")
   if (langLoc > -1)
     {
	       //flip to english
	       newUrl = (theurl.replace("/fr/","/en/"));
	       document.location.replace(newUrl);
	       window.location(newUrl);
     }
   else
     {
        langLoc = theurl.indexOf("/en/");
	    if (langLoc > -1)
	     {
	       //flip it to french
	       newUrl = (theurl.replace("/en/","/fr/"));
	       document.location.replace(newUrl);
	       window.location(newUrl);
	     }
        else
         {
            langLoc = theurl.indexOf("index.html");
               if (langLoc > -1)
	        {
 	          newUrl = "http://www.maplesoftconsulting.com/index_f.html";
	          document.location.replace(newUrl);
	          window.location(newUrl);	        
	        
	        }
	       else 
	        {
 	         newUrl = "http://www.maplesoftconsulting.com/index.html";
	         document.location.replace(newUrl);
	         window.location(newUrl);	        	        
	        }

         }
	 }
}


function imgSwap(oImg)
{
   var strOver  = "_on"    // image to be used with mouse over
   var strOff = "_off"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1)
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}

function showIt(id) {
var d = document.getElementById(id);
if (d) {d.style.display='block';}
}

function hideIt(id) {
  document.getElementById(id).style.display='none';
}

function preloadImages() {

	image1 = new Image();
	image1.src = "/images/sd_the_off.jpg";
	
}


				   
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}

