// JavaScript Document
<!--
function savoir(){
   var str1,strdim, strnom;
   str1 = "";strdim = "";strnom = "";
   for (jj=1; jj < ijk; jj++) {
	 	  str1 = document.depotform.photoadeposer1.value ; 
		  monimage=new Image();
		  monimage.src=str1;
		  if (monimage.height > 1){
			  strdim = strdim + monimage.height + '.' + monimage.width  + 'x';
//			  strnom = strnom + str1  + 'x';
		  };
//   if (strdim)
//   	location.href = "depot.cfm?etp=7&d="+strdim+"&s="+strnom;
//		alert(strdim);
	};
}
function brillantt(qui){
   if(qui) {
		   document.optionindiv.matbrillant.value = "Brillant";
   } else {
		   document.optionindiv.matbrillant.value = "Mat";
	};
}
function margee(qui){
   if(qui) {
		   document.optionindiv.margessmg.value = "Marge";
   } else {
		   document.optionindiv.margessmg.value = "Ssmarge";
	};
}
function brillanttold(qui){
   //
   if(qui) {
	   for (jj=1; jj < ijk+1; jj++) {
		   str= eval("document.optionindiv.matbrill"+jj)
		   str[1].checked = true;
	   };
   } else {
	   for (jj=1; jj < ijk+1; jj++) {
		   str= eval("document.optionindiv.matbrill"+jj) 
		   str[0].checked = true;
	   };
	};
}
function margeeold(qui){
   if(qui) {
	   for (jj=1; jj < ijk+1; jj++) {
		   str= eval("document.optionindiv.margess"+jj);
		   str[0].checked = true;
	   };
   } else {
	   for (jj=1; jj < ijk+1; jj++) {
		   str= eval("document.optionindiv.margess"+jj);
		   str[1].checked = true;
	   };
	};
}
function selectformat(num)
{
   for (jj=1; jj < ijk+1; jj++) {
	   str= eval("document.optionindiv.format"+jj);
//	   alert(str);
	   str.options[num].selected = true;
	};
}
function qtee(num){
   for (jj=1; jj < ijk+1; jj++) {
	   str= eval("document.optionindiv.qte"+jj);
//	   alert(str);
	   str.options[num].selected = true;
	};
}
function qter(num,format){
   format = format+1;
   for (jj=1; jj < ijk+1; jj++) {
//	   alert("document.optionindiv.qte_"+format+"_"+jj);
	   str= eval("document.optionindiv.qte_"+format+"_"+jj);
//	   if (numv != 0) {str.options[numv].style.background = "#FFFFFF";
	   //str.options[numv].style.color = "#0099FF";
//	    str.options[numv].style.fontWeight="bold";
//	   }
	   str.options[num].selected = true;
	};
}

function changeNFiles(n)
{
	touteslesphotos = "";
	window.location = "?etp=5&n="+escape(n)+touteslesphotos;
}
function verifq(img,taille)
{
	monimage=new Image();
	monimage.src=img;
	hauteur = monimage.height;
	largeur = monimage.width;
	if(hauteur*largeur>taille*2.4){
		alert('Cette photo a une bonne résolution pour être développée : '+hauteur+'<>'+largeur+'<>'+taille);
	} else { if(hauteur*largeur<taille*1.2) {
			alert('Cette photo a une très mauvaise résolution pour être développée : '+hauteur+'<>'+largeur+'<>'+taille);
		  }else{ 
				alert('Cette photo a une résolution correcte pour être développée : '+hauteur+'<>'+largeur+'<>'+taille);
			}
	}
}
function Verifjpg(listeFichiers){
	messageerreur = ''; 
	for(i in listeFichiers){
		encours = listeFichiers[i];
		var extension = encours.substr(encours.lastIndexOf('.') + 1, encours.length);
		extension = extension.toLowerCase();
		if(extension != 'jpg' && extension!='jpeg'){
			messageerreur += 'Le fichier ' + encours + ' est de type incorrect.\n';
		}  
	}
	if(messageerreur != ''){
		alert(messageerreur+'Seules les extensions ".jpg" ou ".jpeg" sont acceptees. ');
	}
	return messageerreur;
}  
function testbox(form, ctrl, value) {
	if (value == "" || value.indexOf ('@', 1) == -1 ||	value.indexOf ('.', 3) == -1)
		{
		return (false);
	}
	else
	{
		return (true);
	}
}
function cpval(form, ctrl, value) {
	if (value.length < 6 )
		{
		return (false);
	}
	else
	{
		return (true);
	}
}

function veriftel(form, ctrl, value) {
	if(value.length > 10 && value.search(/^[0-9]{1}[0-9\s]*[0-9]{1}$/) == -1 )
		{
		return (false);
	}
	else
	{
		return (true);
	}
}
function verifcanal(form, ctrl, value) {
	if((value.length > 3) || (value == 0) || (value > 300) || (value.search(/^[0-9]{1}[0-9\s]*[0-9]{1}$/) == -1 ))
		{
		return (false);
	}
	else
	{
		return (true);
	}
}
