function addMsgFavoris(name)
{
   alert( "Vous venez d' ajouter cet article  dans vos favoris : \n\n"+name )
}

function printProduit(url,ref)
{
    var url = url+"print.aspx?reference="+ref
    window.open(url,"swf","width=600, height=600, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
}
function ajouterAuPanier(ref)
{
	var choix = ""
	var nc	 = ""
	try
	{
		choix	 = document.aspnetForm.choix.value
		if(choix=="")
		{
			alert("Selectionnez votre choix")
			return false;
		}	
		
	}
	catch(e)
	{}
	
	try
	{
		var nc		 = document.aspnetForm.nc.value
		if(nc=="")
		{
			alert("Selectionnez votre nomenclature")
			return false;
		}	
	}
	catch(e)
	{} 
	document.aspnetForm.action = "Boutique-Livraison-Rapide/ajouterpanier.aspx"
	document.aspnetForm.submit()
}

var doc  = document.all
function inc(obj)
{
	id = new String(obj.id).replace("btninc","Quantity")
	if (document.all)
		doc[id].value = parseInt(doc[id].value) +1
	else if (document.getElementById) 
		document.getElementById(id).value = parseInt(document.getElementById(id).value) +1
}

function dec(obj)
{
	id = new String(obj.id).replace("btndec","Quantity")
	if (document.all){
		if(parseInt(doc[id].value)>1)
			doc[id].value = parseInt(doc[id].value) - 1
	}
	else if (document.getElementById){
		if(document.getElementById(id).value>1)
			document.getElementById(id).value = parseInt(document.getElementById(id).value) -1
	} 
}
 

function  openSWF(url)
{
    window.open(url,"swf","width=600, height=600, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
    //window.open(url+"video/swf.aspx?ref="+ref,"swf","width=500, height=500, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
}	

function  pop_photo(photo,url)
{
    window.open(url+"produit-hygiene/materiel-detail-photo.aspx?photo="+photo,"photovoussert","width=500, height=500, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
}	

function profile(obj)
{
	switch(obj.value)
	{
		case "Administration" :
			document.getElementById("trNC").style.visibility	= "visible"
			document.getElementById("trNC").style.display	= "block"
			
			document.getElementById("trExoTVA").style.visibility	= "hidden"
			document.getElementById("trExoTVA").style.display	= "none"
			
			document.myform.ViewPrice[0].checked = true
			document.myform.ViewPrice[1].checked = false
			
			document.myform.NC[0].checked = false
			document.myform.NC[1].checked = true
			
			
			
			break
		case "Particulier" :
			document.getElementById("trNC").style.visibility	= "hidden"
			document.getElementById("trNC").style.display	= "none"
			
			document.getElementById("trExoTVA").style.visibility	= "hidden"
			document.getElementById("trExoTVA").style.display	= "none"
			
			document.myform.ViewPrice[0].checked = false
			document.myform.ViewPrice[1].checked = true
			
			document.myform.NC[0].checked = true
			document.myform.NC[1].checked = false
		
			
			break
		case "Societe" :
			document.getElementById("trNC").style.visibility	= "hidden"
			document.getElementById("trNC").style.display	= "none"
			
			document.getElementById("trExoTVA").style.visibility	= "visible"
			document.getElementById("trExoTVA").style.display	= "block"
			
			document.myform.ViewPrice[0].checked = true
			document.myform.ViewPrice[1].checked = false
			
			document.myform.NC[0].checked = true
			document.myform.NC[1].checked = false
		
			break
		case "Revendeur" :
			document.getElementById("trNC").style.visibility	= "hidden"
			document.getElementById("trNC").style.display	= "none"
			
			document.getElementById("trExoTVA").style.visibility	= "visible"
			document.getElementById("trExoTVA").style.display	= "block"
			
			document.myform.ViewPrice[0].checked = true
			document.myform.ViewPrice[1].checked = false
			
			document.myform.NC[0].checked = true
			document.myform.NC[1].checked = false
		
		break
		
	}


}
function printOrder(url,nc)
{
    
    if(nc=="NC")
        window.open(url+"boutique-livraison-rapide/printOrdersnc.aspx?d="+(new Date()),"","channelmode=no,directories=no,fullscreen=no,height=600px,width=750px,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no")
    else
        window.open(url+"boutique-livraison-rapide/printOrders.aspx?d="+(new Date()),"","channelmode=no,directories=no,fullscreen=no,height=600px,width=750px,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no")
        
}
function  cgv(url)
{   
    window.open(url+"nos-services/Condition-generale-de-vente-popup.aspx","CGV","width=400, height=400, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
}

function  Aide(url,aide)
{
    if(aide==1)
        window.open(url+"aide1.html","aide1","width=400, height=400, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
    if(aide==2)    
        window.open(url+"aide2.html","aide1","width=400, height=400, location=0, menubar=0, resizable=1,scrollbars=1, status=0, toolbar=0, scroll=auto");
}



self.name="sitecom";
function paiement()
{
	var win;
	win=window.open('','SPPLUS','width=670,height=535,status=1');
	win.focus();
}
/*

function catchEnter()
{alert(1)
    if(event.keyCode == 13)
    {    __doPostBack('ctl00$LeftCtl$BtnSearch2','');
    return false;}
    else
    return true;
}
*/

function EnterKey(b) 
{
    if (event.keyCode == 13) 
    {
        event.cancelBubble = true; 
        event.returnValue = false; 
        //b.click(); 
        document.all ? document.all[b].click() : document.getElementById(b).click();
     } 


} 

/*
function key() 
{ 
if (window.event.keyCode == 13) {return; }
}
document.onkeydown = key;
*/

function kH(e) {
//alert(e)
var pK = e ? e.which : window.event.keyCode;
return pK != 13;
}
document.onkeypress = kH;
if (document.layers) document.captureEvents(Event.KEYPRESS);

/*/function printOrder555()
{
	window.open("printOrders.aspx?d="+(new Date()),"","channelmode=no,directories=no,fullscreen=no,height=600px,width=750px,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no")
}
function printOrder()
{
	window.open("printOrders.aspx?d="+(new Date()),"","channelmode=no,directories=no,fullscreen=no,height=600px,width=750px,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no")
}*/
