
          window.onload=function(){
          var ikeamap;
          ikeamap = new MaporamaAjax('ikeamap',{showPanel:true});
          ikeamap.SetCenter(new MILatLong(lat,long),3);
          //ikeamap.HideCustomize();
          var ikeapin = MIPin.Create('Mypin',new MILatLong(lat,long));
          ikeapin.SetCustomIcon('<img src="http://maps.maporama.com/idl/ikea_FI/images/ikea/ico_ikea.gif">');
          //ikeapin.SetTitle(name);

          var outletdescription='';
          if(logo)
          {
            outletdescription += name+'<br>'+adr+'<br>'+zip+'&#160;'+city+'<br><b>Longitude:</b><br>'+long+'<br><b>Latitude:</b><br>'+lat+'<br><img style="float:left;padding:5px;" src="'+logo+'">';           
          }
          else
          {
            outletdescription += '<b>'+name+'</b><br>'+adr+'<br>'+zip+'&#160;'+city+'<br><b>Longitude:</b><br>'+long+'<br><b>Latitude:</b><br>'+lat;
          }          
          
          //ikeapin.SetDescription(outletdescription);
          ikeamap.AddPin(ikeapin);
          
		   //Add Mouse Click Event on PIN
		   Maporama.Event.Register('Mypin',"click",
		                                function(){
		                                  var p = $('Mypin');
		                                  ikeamap.CenterTo(p.latlong);
		                                  p.ShowInfoHtml(outletdescription);
		                                 }
		                               );          
          
    		}


function ValidateSmsExport(){
	if(document.SendSms.EX_to.value.length < 12 || document.SendSms.EX_to.value.substr(0,4)!='+336')
	{
		alert("Veuillez saisir un numero de mobile valide !");
	}
	else
	{	
		document.SendSms.submit();
		return true;
	}	
	//alert(document.SendSms.EX_to.value.length);	
}



// Search Around + Drive me section BEGIN


function GetObj(objectId){
	// Compatible NN IE FIREFOX method
	if (document.getElementById && document.getElementById(objectId) != null)
	return document.getElementById(objectId);
	else if (document.layers && document.layers[objectId] != null)
	return document.layers[objectId];
	else if (document.all)
	return document.all[objectId];
}
		

   
    function ShowMaplet(mappos)
    {
      Element.toggle(mappos);
      return false;
    }

// Fonctions relatives à l'affichage et au fonctionnement du searcharound formulaire: BEGIN

    function EndUsrBrowser(){
    if(isIE)
    {
    //alert("c'est IE");
    document.getElementById('formIE').style.display = 'block';
    }
    else
    {
    //alert("c'est FF");
    document.getElementById('formFF').style.display = 'block';
    }
    }
    
    function ShowAllMaplets(nbsteps){
        for (i=1; i<=nbsteps; i++){Element.toggle('maplet'+i);}
    }
    
    function SwitchStates(countryval)
    {

        if(countryval=='US')
        {
            //alert("US states");
            document.getElementById('CA_States').style.display = 'none';
            document.getElementById('US_States').style.display = 'block';
        }
        else
        {
            //alert("CA states");
            document.getElementById('CA_States').style.display = 'block';
            document.getElementById('US_States').style.display = 'none';        
        }

    }
    

		function ValidateDriveme()
		{
			if(document.DrivingDirections.ITI_START_city.value =='')
				 {
					document.getElementById('Errormsg').style.display = 'block';
				 }
				 else
				 {
					document.DrivingDirections.submit();
					return false;
				 }
		}    
