
function Areaselected(b,from,id) 
{

 var xmlDoc
 var xslDoc
 var AreaId=b.form.Area.value;
 object=document.all.StoresAgent;
 
 
 
if (AreaId=='')
   { 

 
   object.style.display='none';
  
   }
else
   { 
    object.style.display='';
    }   

  
  
  xmlDoc = new ActiveXObject('Microsoft.XMLDOM')
  xmlDoc.async = false;

  xslDoc = new ActiveXObject('Microsoft.XMLDOM')
  xslDoc.async = false;
  if (AreaId!="")
  {
 

  xmlDoc.load("scripts/Store/Storeselect.asp?from="+from+"&AreaId="+AreaId+"&id="+id)
  xslDoc.load("scripts/Store/StoreselectIndex.xsl")

  StoresList.innerHTML = xmlDoc.documentElement.transformNode(xslDoc)
  
  
  xmlDoc.load("scripts/Store/Agentselect.asp?from="+from+"&AreaId="+AreaId)
  xslDoc.load("scripts/Store/AgentselectIndex.xsl")


  
  AgentList.innerHTML = xmlDoc.documentElement.transformNode(xslDoc)
  }
  
  else
  {
  StoresList.innerHTML =""
   AgentList.innerHTML = ""
  }
}

function CheckFormUpdate(){

if (document.form.Email.value ==""){
		window.alert("Veuillez saisir une adresse électronique");
		document.form.Email.focus()	
		return false;
	}
	
	if (document.form.Password.value ==""){
		window.alert("Veuillez saisir un mot de passe");
		document.form.Password.focus()	
		return false;
	}
document.form.action="Login.asp"
	document.form.submit()	


}

var win1 = null;  

function forgotpass(){
settings ='height=200,width=350,top=0,left=0,scrollbars=yes,status =no,menubar =no,toolbar =no'
Page='forgotpass.asp'
win1 = window.open(Page,'newname',settings)

}


function CheckEmail(){
if (document.form.Email.value ==""  || document.form.Email.value.indexOf('@')==-1 ){
		window.alert("Veuillez indiquer une adresse électronique valide")
		document.form.Email.focus()	
		return false;
	}
	document.form.submit()	
}



<!------------------------------------ basket -------------------------->

function MinusQuan(productId,price)
{

minquan=0
var prefixProductQuantity="ProductQuantity"+productId
var prefixTotalProductprice="TotalProductprice"+productId
var currentQuan=0

for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixProductQuantity)
	    {
      	currentQuan=element.value-1
		if (currentQuan<minquan){
		
		window.alert("Please, insert value>="+minquan)
		return false;
		  }
		  else
		element.value=currentQuan
	     }
  	}

	
	for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		element.value=eval(currentQuan*price)
		     document.tofes.totalOrderPrice.value=eval(document.tofes.totalOrderPrice.value-price)
		
			}
  	}


	
	

	}

function PlusQuan(productId,price)
{
var prefixProductQuantity="ProductQuantity"+productId
var prefixTotalProductprice="TotalProductprice"+productId
var currentQuan=0

for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixProductQuantity)
	    {
        currentQuan= element.value
		currentQuan++
		element.value=currentQuan
	     }
  	}

	
	for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		element.value=eval(currentQuan*price)
		 document.tofes.totalOrderPrice.value=parseInt(document.tofes.totalOrderPrice.value)+parseInt(price)
        
		
		}
  	}


	
	

}	



function ChangeQuan(productId,price)
{

minquan=0
var prefixProductQuantity="ProductQuantity"+productId
var prefixTotalProductpriceAll="TotalProductprice"
var prefixTotalProductprice="TotalProductprice"+productId


var currentQuan=0
var totalOrderPrice=0
for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixProductQuantity)
	    {
      	currentQuan=element.value
		}
  	}
for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name == prefixTotalProductprice) {
      
		element.value=eval(currentQuan*price)
		
    	}
  	}


for (i=0; i<document.tofes.elements.length; i++) {
    element = document.tofes.elements[i];
    if (element.name.substring(0,17) == prefixTotalProductpriceAll) {
	
     	  totalOrderPrice =parseInt(totalOrderPrice)+parseInt(element.value) 
	 	}
  	}

 
 
 	        document.tofes.totalOrderPrice.value=totalOrderPrice
  
}





function DeleteItem(num)
{
	document.tofes.delupdate.value="delete";	
	document.tofes.number.value=num;	
	document.tofes.submit();
}

function DeleteAll()
{
document.tofes.delupdate.value="delal";	
document.tofes.submit();

}

function SendBasket()
{
document.tofes.action="OrderForm.asp";	
document.tofes.submit();

}



<!------------------------------------ basket end -------------------------->

function SendOrder()
{
document.Order.submit();

}

function Larger()
{
document.Order.submit();

}

<!-- START WINDOW POPUP -->
var win = null;



function NewWindow(mypage,myname,w,h,scroll){
LeftPosition =  0;
TopPosition =  0;

settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,status =no,menubar =no,toolbar =no   ';

win = window.open(mypage,myname,settings);

}
<!-- END WINDOW POPUP -->




<!-----------------Details  Personal Card -------------------->

function showDetails(j){
  object=document.all.viewDetails(j);
 
if (object.style.display=='none')
   { 

  object.style.display='';
  
   }
else
   { 
    object.style.display='none';
    }   
}	
<!-----------------Details  Personal Card finale-------------------->




<!---------------- Contact -------------------->
function CheckContact() {

if (document.mail.first_name.value ==""){
		window.alert("Veuillez saisir une Prénom");
		document.mail.first_name.focus();	
        return false;
	}
	
			
	else {
		if (document.mail.email.value =="" || document.mail.email.value.indexOf('@')==-1){
				window.alert("Veuillez saisir une adresse électronique");		
			     document.mail.email.focus();	
        return false;
		}
 else{
  document.mail.action = "mail_send.asp";
	document.mail.submit();
		}
		}				
}


function cleanContact(){
	document.mail.reset();

}
<!---------------- Contact finale-------------------->


<!-- START FLASH SCRIPT-->

function writeFlash (flashID, flashMovie, width, height, Bgcolor) {

	var t ="";
	t += '<object ';
	t += '	id="' + flashID + '"';
	t += '	classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	t += '	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
	t += '	width="' + width + '" ';
	t += '	height="' + height + '">';
	t += '		<param name="movie" value="' + flashMovie + '">';
	t += '		<param name="quality" value="high">';
	t += '		<param name="bgcolor" value="' + Bgcolor + '">';
	t += '		<param name="allowScriptAccess" value="sameDomain" >';
	t += '		<embed src="' + flashMovie + '" ';
	t += '			name="' + flashID + '"';
	t += '			quality="high" ';
	t += '			pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	t += '			type="application/x-shockwave-flash" ';
	t += '			allowScriptAccess="sameDomain"  ';
	t += '			width="' + width + '" ';
	t += '			height="' + height + '">';
	t += '		</embed>';
	t += '</object>';
	
	document.write (t);
}


<!-- END FLASH SCRIPT-->


<!-- START FLASH MINICLICK-->

var theURL = 'PopMiniClick.asp';
var width=530;
var height=410;
   
function popMiniClick() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=yes,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}
<!-- END FLASH MINICLICK-->

