
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ZED.js - */
// http://evido.zindep.com/portal_javascripts/ZED.js?original=1
function object_update(portal,url){win2=window.open(portal+"/remoteUpdate?at_url="+url,"","width=450,height=450,scrollbars,resizable")
win2.creator=self};
function documents_models(portal,url){win2=window.open(portal+"/remoteModels?url="+url,"","width=300,height=450,scrollbars")
win2.creator=self};var inDrag=0;
function deleteCut(){var nomCookie='url_object_to_cut';createCookie(nomCookie,null,null);document.body.style.cursor='auto';inDrag=0}
function setCut(url_object,title){var nomCookie='url_object_to_cut';createCookie(nomCookie,title,null);document.onmousemove=function(){return false}
document.body.style.cursor='crosshair';inDrag=1}
function setPaste(url_object,title){if(inDrag==1){var nomCookie='url_object_to_paste';from=readCookie('url_object_to_cut')
createCookie(nomCookie,title,null);alert('Copie effectuée. De '+from+' dans '+title)
document.onmousemove=null;document.body.style.cursor='auto';inDrag=0}}
function notAFolder(){alert('Ce n\'est pas un dossier')}
function display_actions(zedsearch){var zedsearch=typeof(zedsearch)!='undefined'?zedsearch:false;var nomCookie='buttonActions';if(zedsearch==true){nomCookie='buttonActionsSearch'}
var zones=document.getElementsByName('zone_buttonActions');var val=readCookie(nomCookie);if(val==null||val=='0'){createCookie(nomCookie,'1',null)}
else{createCookie(nomCookie,'0',null)}
for(i=0;i<zones.length;i++){if(val==null||val=='0'){zones[i].style.display=''}
else{zones[i].style.display='none'}}};
function display_filters(zedsearch){var zedsearch=typeof(zedsearch)!='undefined'?zedsearch:false;var nomCookie='filter';if(zedsearch==true){nomCookie='filterSearch'}
var area=document.getElementById('filterArea');if(area==null){return}
var val=readCookie(nomCookie);if(val==null||val=='0'){createCookie(nomCookie,'1',null);showList();area.style.display=''}
else{createCookie(nomCookie,'0',null);area.style.display='none'}};filterReq=null;
function calculateList(url,fields,querystring){for(i=0;i<fields.length;i++){var fieldId=fields[i].split('||')[0];var value=fields[i].split('||')[1];field_to_update=document.getElementById(fieldId);if(field_to_update.options.length>1){continue}
filterReq=new XMLHttpRequest();var new_url=url+'/reqFilter?fieldId='+fieldId+'&value='+value;if(querystring){new_url+='&'+unescape(querystring)}
filterReq.open("GET",new_url,false);filterReq.send(null);xml=filterReq.responseXML;if(field_to_update!=void(0)){field_to_update.selectedInded=-1;while(field_to_update.options.length>0){field_to_update.options[0]=null}}
if(xml==null){return null}
cats=xml.firstChild.nextSibling;if(cats==null){cats=xml.firstChild}
for(var ni=0;ni<cats.childNodes.length;ni++){node=cats.childNodes[ni];if(node.nodeName!='cat'){continue}
id=node.getAttribute('id');name=node.getAttribute('name');field_to_update.options[field_to_update.options.length]=new Option(name,id);if(node.getAttribute('selected')=="1"){op=field_to_update.options[field_to_update.options.length-1];op.selected=true}}}}


/* - ploneoootransforms.js - */
// http://evido.zindep.com/portal_javascripts/ploneoootransforms.js?original=1
function displayPloneOOoPortlet(hlink){var childs=hlink.parentNode.parentNode.childNodes;for(var i=0;i<childs.length;i++){if((childs[i].className=="portletBody")||(childs[i].className=="portletBody hidden")){var portletBody=childs[i]}}
if(portletBody.className=="portletBody"){portletBody.className+=" hidden"} else{portletBody.className=portletBody.className.replace(' hidden','')}}

