function getLinkForm(B){var A="/xwiki2/bin/view/ADTMCode/dataServices?act=getLinkForm&xpage=plain&targetCard="+B;new Ajax.Request(A,{method:"get",onSuccess:function(C){$("linkForm").update(C.responseText);Effect.SlideDown("linkForm");$("plusLink").hide()}})}function clearLinkForm(){$("linkForm").innerHTML="";$("plusLink").appear()}function validateLinkForm(B){var C=$(B);var E="/xwiki2/bin/view/ADTMCode/dataServices?act=addLinkToCard";E+="&targetCard="+$("ltargetCard").value;E+="&title="+$("linkTitle").value;E+="&url="+$("linkUrl").value;var A="newInternLinks";var D="newExternLinks";if((!$("internalLinkInput").checked&&!$("externalLinkInput").checked)||$("linkTitle").value==""||$("linkUrl").value==""){alert("les champs : titre, url & type de lien sont obligatoires")}else{if($("internalLinkInput").checked){updateContent(A,E+"&linkType=0&xpage=plain","updatelinksSubForm();");$("noInternLinks").hide()}if($("externalLinkInput").checked){updateContent(D,E+"&linkType=1&xpage=plain","updatelinksSubForm();");$("noExternLinks").hide()}clearLinkForm()}}function getIllustrationForm(A){var B="/xwiki2/bin/view/ADTMCode/dataServices?act=getIllustrationForm&xpage=plain&targetCard="+A;getContent("illustrationForm",B,'Effect.SlideDown("illustrationForm");$("plusIllustration").hide();')}function validateIllustrationForm(B){var C=$(B);var E="/xwiki2/bin/view/ADTMCode/dataServices?act=addLinkToCard";E+="&targetCard="+$("targetCard").value;E+="&title="+$("illustrationTitle").value;E+="&url="+$("illustrationUrl").value;var A="newVideoLinks";var D="newAudioLinks";var F="newFlickrLinks";if((!$("videoLink").checked&&!$("audioLink").checked&&!$("imageLink").checked)||$("illustrationTitle").value==""||$("illustrationUrl").value==""){alert("les champs : titre, url & type de lien sont obligatoires")}else{if($("videoLink").checked){updateContent(A,E+"&linkType=2&xpage=plain","updatelinksSubForm();");$("noVideoLinks").hide()}if($("audioLink").checked){updateContent(D,E+"&linkType=3&xpage=plain","updatelinksSubForm();");$("noAudioLinks").hide()}if($("imageLink").checked){updateContent(F,E+"&linkType=4&xpage=plain","updatelinksSubForm();");$("noFlickrLinks").hide()}clearIllustrationForm()}}function clearIllustrationForm(){$("illustrationForm").innerHTML="";$("plusIllustration").appear()}function clearLinkForm(){$("linkForm").innerHTML="";$("plusLink").appear()}function playVideo(B){var A="/xwiki2/bin/view/ADTMCode/dataServices?xpage=plain&act=showVideo&videoURL="+B;new Ajax.Request(A,{onSuccess:function(C){$("videoPlayer").innerHTML=C.responseText;showVideoPlayer()}})}function playDeezer(B){var A="/xwiki2/bin/view/ADTMCode/dataServices?xpage=plain&act=showAudio&songId="+B;new Ajax.Request(A,{onSuccess:function(C){$("audioPlayer").innerHTML=C.responseText;showAudioPlayer()}})}function showVideoPlayer(){$("videoList").hide();Effect.BlindDown("videoPlayer")}function hideVideoPlayer(){$("videoPlayer").hide();Effect.BlindDown("videoList");$("videoPlayer").innerHTML=""}function showAudioPlayer(){$("audioList").hide();Effect.BlindDown("audioPlayer")}function hideAudioPlayer(){$("audioPlayer").hide();Effect.BlindDown("audioList");$("audioPlayer").innerHTML=""}function removeTag(A,C){if(confirm("êtes-vous sûr de vouloir supprimer ce tag ?")){var B="/xwiki2/bin/view/ADTMCode/dataServices?xpage=plain&act=removeTag&tagId="+A+"&targetCard="+C;new Ajax.Request(B);$(A).style.display="none"}}function resetTagForm(B){Effect.SlideUp("tagsAdder");$("tagLabel").value="";var A="/xwiki2/bin/view/ADTMCode/dataServices?xpage=plain&act=getDocTags&targetCard="+B;new Ajax.Updater("oldTags",A)}function addTag(A){if($("tagLabel").value!=""){$("addTagForm").request({method:"get",onComplete:function(){resetTagForm(A)}})}else{alert("veuillez insérer un mot.")}}function sendModificationRequest(B,A){$("messageBody").value="Bonjour "+$("messageDestination").value+". \n Vous venez de rédiger la fiche : [["+B+">>"+A+"]] sur le site 'Marketing pour PME'. Suite à l'examen par nos correcteurs, celle-ci nécessite les modifications suivantes : ";$("validationMessage").slideDown();$("composeMessageForm").style.display="inline";$("validationMessageTitle").innerHTML="<h1>Demande de modification</h1>";$("messageSubject").value="Demande de modification";$("desiredState").value="2"}function sendAcceptRequest(B,A){$("messageBody").value="Bonjour "+$("messageDestination").value+". \n Vous venez de rédiger la fiche : [["+B+">>"+A+"]] sur le site 'Marketing pour PME', suite à l'examen par nos correcteurs, votre fiche est acceptée & sera mise en ligne.";$("validationMessage").slideDown();$("composeMessageForm").style.display="inline";$("validationMessageTitle").innerHTML="<h1>Fiche acceptée</h1>";$("messageSubject").value="Fiche acceptée";$("desiredState").value="1"}function cancelAction(){$("validationMessage").style.display="none";$("composeMessageForm").style.display="none"}