var mob = navigator.userAgent && ( navigator.userAgent.match( /iPhone/i ) || navigator.userAgent.match( /iPod/i ) || navigator.userAgent.match( /up.browser/i ) || navigator.userAgent.match( /up.link/i ) || navigator.userAgent.match( /audiovox/i ) || navigator.userAgent.match( /blackberry/i ) || navigator.userAgent.match( /ericsson,/i ) || navigator.userAgent.match( /panasonic/i ) || navigator.userAgent.match( /philips/i ) || navigator.userAgent.match( /sanyo/i ) || navigator.userAgent.match( /portalmmm/i ) || navigator.userAgent.match( /sie-/i ) || navigator.userAgent.match( /blazer/i ) || navigator.userAgent.match( /avantgo/i ) || navigator.userAgent.match( /danger/i ) || navigator.userAgent.match( /palm/i ) || navigator.userAgent.match( /series60/i ) || navigator.userAgent.match( /palmsource/i ) || navigator.userAgent.match( /pocketpc/i ) || navigator.userAgent.match( /smartphone/i ) || navigator.userAgent.match( /rover/i ) || navigator.userAgent.match( /ipaq/i ) || navigator.userAgent.match( /au-mic,/i ) || navigator.userAgent.match( /alcatel/i ) || navigator.userAgent.match( /ericy/i ) || navigator.userAgent.match( /vodafone/i ) || navigator.userAgent.match( /wap1./i ) || navigator.userAgent.match( /wap2./i ));
var ev = document.cookie.indexOf('embVersion=');

if((mob) && (ev == -1))
{
	if(confirm("Passer sur la version mobile ?"))
	{
		document.cookie = 'embVersion=mobile';
		window.location.href = "http://www.embauche.mobi/";
	}
	else
	{
		document.cookie = 'embVersion=mobile';
	}
}
