function parseLiens() {
	parseLiensExternes();
	parseLightWindowElems();
}

function parseLiensExternes() {
	$$('a.externe').each( function(lien) {
		if (!lien.hasClassName('allreadyObserve')) {
			lien.setAttribute('target', '_blank');
			lien.addClassName('allreadyObserve');
		}
	});
}

function parseLightWindowElems() {
	var hasForm = false;

	$$('a.lightwin')
			.each(
					function(lien) {
						if (!lien.hasClassName('allreadyWin')) {
							Event
									.observe(
											lien,
											'click',
											function(evt) {
												Event.stop(evt);
												var url = lien.href;
												url = url.split('?');
												url = url.join('&');
												url = url_shadow+'shadowbox.php?url='+url;
												

												new Ajax.Request(
														url,
														{
															method : 'get',
															onSuccess : function(
																	transport) {
																var response = transport.responseText;
																Shadowbox
																		.open( {
																			content : response,
																			player : "html",
																			title : lien.title,
																			width : 540,
																			height : 700
																		});
		                                                        document.title = lien.title+' - '+titre_page;
															},
															onFailure : function() {
																alert('Impossible d\'ouvrir cette page. Veuillez nous en excuser.');
															}
														});
											});
							lien.addClassName('allreadyWin');
						}
					});

	$$('form.lightwin').each( function(form) {
		if (!form.hasClassName('allreadyWin')) {
			hasForm = true;
			//addInteractFormulaire(form);
			addVerifFormulaire(form);
			form.addClassName('allreadyWin');
		}
	});

	if (!hasForm && $('closeBox') != null && $('closeBox') != undefined) {
		Event.observe($('closeBox'), 'click', function() {
			Shadowbox.close();
		});
	}
}
