/*************************************************
    Fonction dimensions de l ecran
**************************************************/
function getScreenHeight()
{
	var h=0;
	h = screen.height;
	return h;
}

function getScreenWidth()
{
	var w=0;
	w = screen.width;
	return w;
}

/*************************************************
	Fonction dimensions de la fenčtre
**************************************************/

function getWindowHeight() {
    var h = 0;
    if (typeof(window.innerHeight) == 'number') { // Netscape
        h = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        h = document.documentElement.clientHeight;
    } else if (document.body && document.body.offsetHeight) { //client
        h = document.body.offsetHeight;
    }
    return h;
}

function getWindowWidth() {
    var w = 0;
    if (typeof(window.innerWidth) == 'number') { // Netscape
        w = window.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
        w = document.documentElement.clientWidth;
    } else if (document.body && document.body.offsetWidth) { //client
        w = document.body.offsetWidth;
    }
    return w;
}

/****************************************************
 * Fonction Redirection des Mobiles
 * **************************************************/
function resolutionRedirect(width, url) 
{
	if(getWindowWidth()<width)
	{
		window.location.replace(url);
	}
}

resolutionRedirect(640,"http://www.avisor.mobi");