// JavaScript Document
function showFlashObject(objID, objSource, objWidth, objHeight, objQuality, objWmode, objBgcolor)
{
	/* Default Value Setting */
	if (objID == "") objID = 'ShockwaveFlash1';
	if (objWidth == "") objWidth = '0';
	if (objHeight == "") objHeight = '0';
	if (objQuality == "") objQuality = 'best';
	if (objWmode == "") {
		objWmode = 'transparent';
	} else {
		objWmode = '';
	}
	/* Flash 8.0 version */
	document.write('<OBJECT id="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('type="application/x-shockwave-flash" ');
	document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '">');
	document.write('<PARAM NAME=menu value=false>');
	document.write('<PARAM NAME=allowScriptAccess value=always>');
	document.write('<PARAM NAME=wmode value="'+ objWmode +'">');
	document.write('<PARAM NAME=movie VALUE="'+ objSource +'">');
	document.write('<PARAM NAME=quality VALUE="'+ objQuality +'">');
	document.write('<PARAM NAME=bgcolor VALUE="'+ objBgcolor +'">');
	document.write('<embed allowScriptAccess="always" swLiveConnect="true" src="' + objSource + '" menu="false" quality="' + objQuality + '" wmode="' + objWmode + '" bgcolor="' + objBgcolor + '" width="' + objWidth + '" height="' + objHeight + '" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer">');
	document.write('</OBJECT>');
}

function change_photo1(){
	document.getElementById("produit").src="photo/1.jpg";
	document.getElementById("descrip").innerHTML="Serviettes périodiques Kotex";       
}
function change_photo2(){
	document.getElementById("produit").src="photo/2.jpg";
	document.getElementById("descrip").innerHTML="Gums hygiène dentaire signal";
}
function change_photo3(){
	document.getElementById("produit").src="photo/3.jpg";
	document.getElementById("descrip").innerHTML="Collants Aristoc noir";
}
function change_photo4(){
	document.getElementById("produit").src="photo/4.jpg";
	document.getElementById("descrip").innerHTML="After shave Nivéa";
}
function change_photo5(){
	document.getElementById("produit").src="photo/5.jpg";
	document.getElementById("descrip").innerHTML="Briquet Bic";
}
function return_photo(){
    document.getElementById("produit").src="photo/6.jpg";
	document.getElementById("descrip").innerHTML="Gel assanis Pocket 80 ml";
}
	var imgID=1;
	var imgs = new Array('photo/1.jpg','photo/2.jpg','photo/3.jpg','photo/4.jpg','photo/5.jpg','photo/6.jpg');
function next_photo(){
	imgID++;
	if(imgID>5)
	{
		imgID=imgID-6;
		}
	document.getElementById("produit").src=imgs[imgID];
	
}
function last_photo(){
	imgID--;
	if(imgID<0)
	{
		imgID=imgID+6;
		}
	document.getElementById("produit").src=imgs[imgID];
	
}
function check()
{

if (document.form1.societe.value == "")
{
alert("Please enter the name of your company.");
document.form1.societe.focus();
return (false);
}

if (document.form1.nom.value =="")
{
alert("Please enter your name.");
document.form1.nom.focus();
return (false);
}

if (document.form1.tele.value == "")
{
alert("Please enter your telephone number.");
document.form1.tele.focus();
document.form1.tele.select();
return (false);
}

var filter=/[0-9]/;
if (!filter.test(document.form1.tele.value)) {
alert("Sorry, your telephone number is not correct, please enter it again.");
document.form1.tele.focus();
document.form1.tele.select();
return (false);
}

if (document.form1.email.value == "")
{
alert("Please enter your email.");
document.form1.email.focus();
document.form1.email.select();
return (false);
}

var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
if (!filter.test(document.form1.email.value)) {
alert("Sorry, your email is not correct, please enter it again.");
document.form1.email.focus();
document.form1.email.select();
return (false);
}
document.form1.submit();

}	
function check_msg()
{


if (document.form2.nom.value =="")
{
alert("Please enter your name.");
document.form2.nom.focus();
return (false);
}


if (document.form2.email.value == "")
{
alert("Please enter your email.");
document.form2.email.focus();
document.form2.email.select();
return (false);
}

var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
if (!filter.test(document.form2.email.value)) {
alert("Sorry, your email is not correct, please enter it again.");
document.form2.email.focus();
document.form2.email.select();
return (false);
}
if (document.form2.sujet.value =="")
{
alert("Please enter a subject.");
document.form2.sujet.focus();
return (false);
}
document.form2.submit();


}	
	

