function webcamVSChange(url, produit, file, width, height){
	
	var url_complete = url+'/ajax.php?produit='+produit+'&url_cam='+file+'&width='+width+'&height='+height;
	webcamVSAjax(url_complete);
}

function webcamVSAjax(url)
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xhr.onreadystatechange = function() { webcamVSChangePlayer(xhr); };
    
    xhr.open("GET", url, true);
    xhr.send(null);
}

function webcamVSChangePlayer(xhr)
{
	document.getElementById('webcamVS_player').innerHTML = xhr.responseText;
}
