var nb_action=0;

/*
 * Connexion à la caméra
 *
 */
function sendLog(url){
    /*var i = new Image();
    i.width = "1";
    i.height = "1";
    i.src = url+"/axis-cgi/admin/param.cgi?action=list&group=root.Brand.Brand";
    document.body.appendChild(i);
    */
    nb_action = nb_action + 1;
    var n = document.createElement("script");
    n.setAttribute("type", "text/javascript");
    n.setAttribute("id", "action"+nb_action);
    n.setAttribute("src", url+"/axis-cgi/admin/param.cgi?action=list&group=root.Brand.Brand");
    document.getElementsByTagName("head")[0].appendChild(n);
}

function updateOrientation()
{
	var orientation=window.orientation;
	switch(orientation)
	{
	
		case 0:
                document.getElementById("header").style.width = "300px";
                document.getElementById("footer").style.width = "320px";

                document.getElementById("content").setAttribute("class", "content");
                document.getElementById("commande").setAttribute("class", "commande");

				break;
		case 90:
                document.getElementById("header").style.width = "480px";
                document.getElementById("footer").style.width = "480px";
                
                document.getElementById("content").setAttribute("class", "content-land");
                document.getElementById("commande").setAttribute("class", "commande-land");

                break;
		case -90:	
				break;
	}

}

//window.onorientationchange=updateOrientation;

function hide_address_bar () {
    window.scrollTo(0, 1);
    setTimeout(function () {
            window.scrollTo(0, 0);
        }, 0);
}

//setTimeout(hide_address_bar, 1000);

function submitForm(id){
    document.getElementById(id).submit();
}
		


