<script>

function go()
{
	var fav_count = document.getElementByName('fav[]');
	//var is_checked = false;
 
	alert("fav_54646count");
 
	/*for (var i = 0; i < fav_count; i++)
	{
		/*if (document.myform.elements['fav[]'].checked)
		{
			is_checked = true;
			break;
		}*/
	/*}
 
	if (is_checked == false)
	{
		window.alert('Please select at least 1 favorite fruit');
	}*/
}

function toto()
 var elem = document.getElementsByClassName("webcampics");
  var names = [];
  for (var i = 0; i < elem.length; ++i) {
    if (typeof elem[i].value !== "undefined") {
        names.push(elem[i].value);
      }
    }
  }
  var webcamval = names;
  
  alert(webcamval);
  
}  
</script>


	<input type="checkbox" name="fav[]">Apple <br/>
    <input type="checkbox" name="fav[]">Banana <br/>
    <input type="checkbox" name="fav[]">Orange <br/>
    <input type="checkbox" name="fav[]">Mango <br/>
	<input type="submit" value="Envoyer" onclick="go();" /> 
	
	<input type="hidden" value="'+image_url+'" name="webcampics[]" class="webcampics">
	<input type="hidden" value="'+image_url+'" name="webcampics[]" class="webcampics">
	<input type="hidden" value="'+image_url+'" name="webcampics[]" class="webcampics">
	<input type="hidden" value="'+image_url+'" name="webcampics[]" class="webcampics">
	<input type="submit" value="Envoyer" onclick="toto();" /> 

	
	
<?php


?>