function ass_objc (Object_id, Contents) {
	document.getElementById(Object_id).innerHTML = Contents;
}

function message_alerte2(message, sweetch, ancre) {


	if (message == "gb") {
        message = "If you just ordered a Package, you will be receiving an e-mail within 24h including your account information.<br><br>If you already have your account information for a Business, Business+ or Custom Professionnal package, please connect directly  to the online mini-website created for your structure.";
	} else {
        message = "Si vous venez de commander un pack, vous allez recevoir par mail sous 24H vos identifiants de connexion.<br><br>Si vous poss&eacute;dez d&eacute;jà vos paramètres de connexion à un pack Business, Business+ ou Pro personnalis&eacute;, veuillez vous connecter directement au mini site en ligne cr&eacute;&eacute; pour votre structure.";
	}

  fancyAlert(message);

  //	if (sweetch) {
  //        var msg = "";
  //		msg = msg + '<table width="325" border="0" cellspacing="0" cellpadding="0">';
  //	  	msg = msg + '<tr>';
  //	    msg = msg + '	<td id="message_alerte_top">';
  //	    msg = msg + '     <table width="100%" border="0" cellspacing="0" cellpadding="3" id="message_alerte_title">';
  //		msg = msg + '	  	<tr>';
  //		msg = msg + '	    	<td width="90%" valign="middle"><span class="grey-dark" style="font-size:13px;">Information</span></td>';
  //		msg = msg + '	    	<td width="10%"><a href="javascript:message_alerte(\'\', false);"><img src="images/buttons_close.png" width="12" height="12" border="0" alt="fermer" /></a></td>';
  //		msg = msg + '	  	</tr>';
  //	   	msg = msg + '	</table>';
  //	   	msg = msg + '	</td/>';
  //	    msg = msg + '</tr>';
  //		//var msg = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab_message_alerte"><tr><td></td><td align="right"><img src="images/croix.gif" border="0" style="cursor:pointer;" onclick="message_alerte(\'\', false)"></td></tr><tr><td colspan="2">'+message+"</td></tr></table>";
  //		msg = msg + '<tr><td align="left" style="padding:10px 5px 15px 5px;font-size:12px;">'+message+"</td></tr></table>";
  //        ass_objc ('message_alerte', msg);
  //		window.document.getElementById("cache_tout").style.display = "block";
  //		window.document.getElementById("message_alerte").style.display = "block";
  //	} else {
  //		window.document.getElementById("cache_tout").style.display = "none";
  //		window.document.getElementById("message_alerte").style.display = "none";
  //	}
  //	if (ancre!="") {
  //		document.location="#"+ancre;
  //	}
	//return true;
}


function message_aide(sweetch, ancre) {
	if (sweetch) {
		window.document.getElementById("cache_tout").style.display = "block";
		window.document.getElementById("message_aide").style.display = "block";
	} else {
		window.document.getElementById("cache_tout").style.display = "none";
		window.document.getElementById("message_aide").style.display = "none";
	}
	if (ancre!="") {
		document.location="#"+ancre;
	}
	//return true;
}

function onglet_produit3(div_aff) {
	window.document.getElementById('onglet_1').style.display = "none";
	window.document.getElementById('onglet_2').style.display = "none";
	window.document.getElementById('onglet_3').style.display = "none";
	window.document.getElementById('onglet_4').style.display = "none";
	window.document.getElementById('onglet_5').style.display = "none";

	window.document.getElementById(div_aff).style.display = "block";
}

function onglet_produit2(div_aff) {
	window.document.getElementById('onglet_1').style.display = "none";
	window.document.getElementById('onglet_2').style.display = "none";
	window.document.getElementById('onglet_3').style.display = "none";
	window.document.getElementById('onglet_4').style.display = "none";

	window.document.getElementById(div_aff).style.display = "block";
}

function zoom_360 (sweetch, ancre) {
     if (sweetch) {
	 	window.document.getElementById("cache_tout").style.display = "block";
	 	window.document.getElementById("zoom_360").style.display = "block";
	 	//window.document.getElementById("div_flash_zoom_360").innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="680" height="453"><param name="movie" value="flash-360-'+produit_titre+'-'+produit_id+'.swf"><param name="quality" value="high"><embed src="flash-360-'+produit_titre+'-'+produit_id+'.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="680" height="453"></embed></object>';
	 } else {
        window.document.getElementById("cache_tout").style.display = "none";
	 	window.document.getElementById("zoom_360").style.display = "none";
	 }
     if (ancre!="") {
		document.location="#"+ancre;
	}
}

function ajout_perso_panier (produit_id, produit_ref, sweetch) {
    if (sweetch) {
		window.document.getElementById("pz_produit_ref").innerHTML = produit_ref;
		window.document.getElementById("pz_link_perso").innerHTML = '<a href="personnaliser-cartes-de-voeux-2.php?id='+produit_id+'">Je transmets mes &eacute;lements<br />pour la personnalisation</a>';
		window.document.getElementById("cache_tout").style.display = "block";
		window.document.getElementById("panier_zoom").style.display = "block";
	} else {
        window.document.getElementById("cache_tout").style.display = "none";
		window.document.getElementById("panier_zoom").style.display = "none";
	}
}

function ajout_panier (produit_id, produit_ref, quantite, sweetch, id_prod_perso) {
    if (sweetch) {
		//ajax_http_request ('appel_ajax.php', 'part=ajout_panier&produit_id='+produit_id+'&quantite='+quantite, 'panier_zoom');
        window.document.getElementById("pz_produit_ref").innerHTML = produit_ref;
        window.document.getElementById("pz_quantite").innerHTML = quantite;
		window.document.getElementById("pz_image").innerHTML = '<img src="image-carte-de-voeux-244-1-'+produit_id+'.jpg" width="107" height="107" border="0" alt="/" />';
		window.document.getElementById("pz_link_perso").innerHTML = '<a href="personnaliser-cartes-de-voeux-1.php?id='+id_prod_perso+'">Je transmets mes &eacute;lements<br />pour la personnalisation</a>';
		window.document.getElementById("cache_tout").style.display = "block";
		window.document.getElementById("panier_zoom").style.display = "block";
	} else {
        window.document.getElementById("cache_tout").style.display = "none";
		window.document.getElementById("panier_zoom").style.display = "none";
	}
}

function ajout_cadre (produit_id) {
	ajax_http_request ('ajax_ajout_cadre.php', 'produit_id='+produit_id, 'cadre_zoom');
    window.document.getElementById("cache_tout").style.display = "block";
	window.document.getElementById("cadre_zoom").style.display = "block";
	document.location="#top";
}

function close_cadre (produit_id) {
    window.document.getElementById("cache_tout").style.display = "none";
	window.document.getElementById("cadre_zoom").style.display = "none";
}

function plus(id) {
	window.document.getElementById(id).value = parseInt(window.document.getElementById(id).value)+1;
}
function moins(id) {
    if (window.document.getElementById(id).value > 0) {
		window.document.getElementById(id).value = parseInt(window.document.getElementById(id).value)-1;
	}
}
function plus10(id) {
	window.document.getElementById(id).value = parseInt(window.document.getElementById(id).value)+10;
}
function moins10(id) {
    if (window.document.getElementById(id).value > 10) {
		window.document.getElementById(id).value = parseInt(window.document.getElementById(id).value)-10;
	} else {
        window.document.getElementById(id).value = 0;
    }
}

function onglet_produit(div_aff) {
	window.document.getElementById('onglet_tarif_carte').style.display = "none";
	window.document.getElementById('onglet_tarif_perso').style.display = "none";
	window.document.getElementById('onglet_info').style.display = "none";
	window.document.getElementById(div_aff).style.display = "block";
}

function openWindow(file,tx,ty) {
 myWindow= open(file, "newWindow", "width="+tx+",height="+ty+",menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
}

function open_shadowbox (id) {
    window.document.getElementById("cache_tout").style.display = "block";
	window.document.getElementById(id).style.display = "block";
	document.location="#top";
}
function close_shadowbox (id) {
    window.document.getElementById("cache_tout").style.display = "none";
	window.document.getElementById(id).style.display = "none";
	document.location="#top";
}

function PopupWindow(source, strWindowToOpen){
var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
strWindowFeatures = strWindowFeatures + "menubar=no,width=413,height=299,maximize=null";
window.open(strWindowToOpen, '', strWindowFeatures); } 
