function addFav()
	{
	nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1)
	if (nav == "Moz" && ver >= 2)
		{
		url_site="http://www.1969.fr";
		titre_site = "1969 : curiosités indésirables";
		window.external.AddFavorite(url_site, titre_site);
		return(false);
		}
	else
		{
		alert('Faites CTRL+D pour ajouter ce site à vos favoris!')
		}
	}

function Inscription_Newsletter () 

{

window.open('newsletter.php','popupNL','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=200');

}	

function Desabo_Newsletter () {
	
window.open('newsletter_desabo.php','popupNL','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=200');	
	
}

function popup(page,largeur,hauteur,options) {
	var top=(screen.height-hauteur)/2;
  	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
    }
	
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}	



function changephoto (url,id,nbphoto,urlzoom) {


 document.getElementById('photo').src=url;	

 document.cart_quantity.zoom_img.value=urlzoom;

}

function zoom()
{
  if(document.cart_quantity.zoom_img.value!="")
  {
  	url = "zoom_prd.php?zoom="+document.cart_quantity.zoom_img.value;
	
	var Left=(window.screen.width/2)-310;
	var Top=(window.screen.height/2)-240; 
	
  	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=620,height=480,screenX='+Left+'px,screenY='+Top+'px,top='+Top+'px,left='+Left+'px');
  }

	
}

/*====== Gestion des erraurs =======*/
function hide_success () {
	div  = (document.layers) ? document.layers['successPad'] : document.getElementById('successPad');
	div.className = "success_hide"; 
}

function hide_error () {
	div  = (document.layers) ? document.layers['errorPad'] : document.getElementById('errorPad');
	div.className = "error_hide";
}


function change_prix(opt_val)
{
	var nb_opt = document.cart_quantity.nb_attr.value;

	for(i=0;i<nb_opt;i++)
	{
		document.getElementById('attr_'+i).style.display='none';
	}
	document.getElementById('attr_'+opt_val).style.display='block';
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function popupWindowReassort(url) {
	
	/* url_to_go = url + '&opt_id='+document.cart_quantity.option_reassort.value;	*/
	url_to_go = url;
  window.open(url_to_go,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=400,height=300,screenX=150,screenY=150,top=150,left=150')
}
