var ClipBoard=0;var ActualTab=0;var TotalTabs=0;var ActualStatus=0;function getRef(obj){objRef=eval(document.getElementById(obj));return objRef}function cleanTabs(a){for(i=1;i<=a;i++){if(document.getElementById("tab"+i)){closeLayerList("tab"+i,i)}}}function showLayerMatrix(a,c){objform=document.getElementById(c);var b=getRef("cue");if(b.style.visibility=="visible"){showLayerCue("cue",0,c);showLayerCue("cue",0,c)}new Ajax.Updater(a,"gridAjax.php",{onLoading:function(d){Element.show("indicator")},onComplete:function(d){Element.hide("indicator")},parameters:"mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("timeSlotDateSpan","gridAjax.php",{parameters:"action=showTimeSlotDate&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("agreedMeetings","gridAjax.php",{parameters:"action=showUpdateAgreed&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("layerUnscheduledMeetings","gridAjax.php",{parameters:"action=showBarUnscheduled&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("helpMeeting","gridAjax.php",{parameters:"action=showHelp&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function addMeeting(a,b){objform=document.getElementById(b);new Ajax.Updater(a,"gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix("ajaxcontentarea","formmain")},parameters:"action=addMeeting&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function updateAgreedMeetings(a,b){if(confirm("Are you sure you want to upgrade all the scheduled agreed meetings filtered to confirmed?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=updateAgreedMeetings&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function updateRequestedMeetings(a,b){if(confirm("Are you sure you want to upgrade all the scheduled requested meetings filtered to agreed?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=updateRequestedMeetings&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function unscheduleResquested(a,b){if(confirm("Arer you sure you want to unschedule all the scheduled requested meetings filtered?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=unscheduleResquested&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function avoidTicketConflicts(a,b){if(confirm("Are you sure you want to find wrong meetings and unschedule them?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=avoidConflictsTicket&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function avoidMeetingConflicts(a,b){if(confirm("Are you sure you want to find conflicts and unschedule them?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=avoidConflicts&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function tryScheduleMeetings(a,b){if(confirm("Are you sure you want to try to schedule meetings?")){objform=document.getElementById(b);new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){showLayerMatrix(a,b)},parameters:"action=trytoschedule&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function showLayerList(c,b,a,e){TotalTabs=a;var d=getRef(c);objform=document.getElementById(e);closeLayerMeeting("edittooltip");if(d.style.visibility=="visible"){closeLayerList(c,b)}else{cleanTabs(a);ActualTab=b;d.style.width="100%";d.style.visibility="visible";d.style.display="";d=getRef("colex"+b);d.style.width="100%";d.style.visibility="visible";d.style.display="";new Ajax.Updater(c,"gridAjax.php",{onLoading:function(f){Element.show("indicator")},onComplete:function(f){Element.hide("indicator")},parameters:"action=showTab&idTab="+b+"&idMeeting="+ClipBoard+"&totalColumns="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function closeLayerList(b,a){ActualTab=0;var c=getRef(b);c.style.width="1px";c.style.visibility="hidden";c.style.display="none";c=getRef("colex"+a);c.style.width="1px";c.style.visibility="hidden";c.style.display="none"}function showLayerCue(a,b,d){if(b==0){b=ActualStatus}if(b==0){b=1;ActualStatus=1}var c=getRef(a);closeLayer("edittooltip");if((c.style.visibility=="visible")&&(b==ActualStatus)){c.style.visibility="hidden";c.style.display="none"}else{objform=document.getElementById(d);c.style.visibility="hidden";c.style.display="none";new Ajax.Updater("cue","gridAjax.php",{onLoading:function(e){Element.show("indicator")},onComplete:function(e){Element.hide("indicator"),c.style.visibility="visible",c.style.display=""},parameters:"action=showCue&id_statusCue="+b+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});c.style.visibility="visible"}ActualStatus=b}function doClear(){ClipBoard="0";new Ajax.Updater("clipboard","gridAjax.php",{onLoading:function(a){Element.show("indicator")},onComplete:function(a){Element.hide("indicator")},parameters:"action=copy",evalScripts:true,asynchronous:true})}function doClearClipBoard(b){var a=ActualTab;objform=document.getElementById(b);doClear();cleanTabs(TotalTabs);if(a>0){if(TotalTabs>0){showLayerList("tab"+a,a,TotalTabs,b)}}else{new Ajax.Updater("ajaxcontentarea","gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){Element.hide("indicator")},parameters:"mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function doUpdate(c,b,d,a,e,g,f){if(a==0){a=TotalTabs}objform=document.getElementById(f);closeLayerMeeting("edittooltip");if(g==1){new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){doPasteNextCue(c,b,d,a,f)},parameters:"action=update&idTab="+b+"&idMeeting="+d+"&isVisitor="+e+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}else{if(ActualTab!=0){c="tab"+ActualTab;b=ActualTab;closeLayerList(c,b)}new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){doPasteNext(c,b,d,a,f)},parameters:"action=update&idTab="+b+"&idMeeting="+d+"&isVisitor="+e+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function doPaste(e,c,b,a,d,g,f){if(a==0){a=TotalTabs}if(ClipBoard=="0"){new Ajax.Updater(g,"gridAjax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){Element.hide("indicator")},parameters:"action=pasteBlockMeeting&idTab="+c+"&idMatrix="+b+"&idMeeting="+ClipBoard+"&totalColumns="+a+"&blocked="+d+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}else{if(d!=1){objform=document.getElementById(f);if(e!=0){closeLayerList(e,c)}else{if(ActualTab!=0){e="tab"+ActualTab;c=ActualTab;closeLayerList(e,c)}}new Ajax.Updater("nothing","gridAjax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){doPasteNext(e,c,b,a,f)},parameters:"action=paste&idTab="+c+"&idMatrix="+b+"&idMeeting="+ClipBoard+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}}function doPasteNext(d,c,b,a,f){objform=document.getElementById(f);doClear();var e=getRef("cue");if(e.style.visibility=="visible"){showLayerCue("cue",0,f);showLayerCue("cue",0,f)}new Ajax.Updater("agreedMeetings","gridAjax.php",{parameters:"action=showUpdateAgreed&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("layerUnscheduledMeetings","gridAjax.php",{parameters:"action=showBarUnscheduled&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("helpMeeting","gridAjax.php",{parameters:"action=showHelp&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("ajaxcontentarea","gridAjax.php",{onComplete:function(g){showLayerList(d,c,a,f)},parameters:"idTab="+c+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function doPasteNextCue(d,c,b,a,f){objform=document.getElementById(f);doClear();var e=getRef("cue");if(e.style.visibility=="visible"){showLayerCue("cue",0,f);showLayerCue("cue",0,f)}new Ajax.Updater("agreedMeetings","gridAjax.php",{parameters:"action=showUpdateAgreed&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("layerUnscheduledMeetings","gridAjax.php",{parameters:"action=showBarUnscheduled&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});new Ajax.Updater("helpMeeting","gridAjax.php",{onComplete:function(g){Element.hide("indicator")},parameters:"action=showHelp&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function doCopyList(b,a,c){if(ClipBoard!=b){if(ActualTab==0){cleanTabs(a)}doCopy("tab"+ActualTab,ActualTab,b,c)}}function doCopy(b,a,c,d){if(ClipBoard!=c){if(a==0){b="tab"+ActualTab;a=ActualTab}objform=document.getElementById(d);ClipBoard=c;closeLayerMeeting("edittooltip");new Ajax.Updater("clipboard","gridAjax.php",{onLoading:function(e){Element.show("indicator")},onComplete:function(e){doCopyNext(b,a,c,d)},parameters:"action=copy&idMeeting="+c,evalScripts:true,asynchronous:true})}}function doCopyNext(b,a,c,d){objform=document.getElementById(d);new Ajax.Updater(b,"gridAjax.php",{onComplete:function(e){Element.hide("indicator")},parameters:"action=showTab&idTab="+a+"&idMeeting="+c+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function processShowLayerMeeting(b,k,h,a,d,f,e,g,j){var c=getRef(k);if(c.style.visibility=="hidden"){c=getRef(h);if(c.style.visibility=="hidden"){Locate(b,h,f,e);showLayerMeeting(h,a,d,g,j)}}}function showLayerMeeting(b,a,c,f,e){objform=document.getElementById(e);var d=getRef(b);d.style.visibility="hidden";d.style.display="none";new Ajax.Updater(b,"gridAjax.php",{onLoading:function(g){Element.show("indicator")},onComplete:function(g){Element.hide("indicator"),d.style.visibility="visible",d.style.display=""},parameters:"action=showMeeting&idTab="+a+"&idMeeting="+c+"&showVisitor="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function processShowImage(d,c,g,b,a,f){e=getRef(c);if(e.style.visibility=="hidden"){Locate(d,c,b,a);objform=document.getElementById(f);var e=getRef(c);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(c,"ajax.php",{onComplete:function(h){e.style.visibility="visible",e.style.display=""},parameters:"action=showHelpImage&id="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function processHelp(d,c,f,b,a,e){objRef=getRef(c);if(objRef.style.visibility=="hidden"){Locate(d,c,b,a);showHelp(c,f,e)}}function showHelp(a,d,c){objform=document.getElementById(c);var b=getRef(a);b.style.visibility="hidden";b.style.display="none";new Ajax.Updater(a,"ajax.php",{onComplete:function(e){b.style.visibility="visible",b.style.display=""},parameters:"action=showHelp&id="+d+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showEditLayerMeeting(b,d,a,c,g,f){objform=document.getElementById(f);var e=getRef(d);e.style.visibility="hidden";e.style.display="none";e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"gridAjax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){Element.hide("indicator"),closeLayer("tooltip"),e.style.visibility="visible",e.style.display=""},parameters:"action=editMeeting&idTab="+a+"&idMeeting="+c+"&showVisitor="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function closeLayerMeeting(a){var b=getRef(a);new Ajax.Updater(a,"gridAjax.php",{onLoading:function(c){Element.show("indicator")},onComplete:function(c){Element.hide("indicator"),b.style.visibility="hidden",b.style.display="none"},parameters:"action=showMeeting&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showcloseLayerHide(a){var b;for(i=1;i<=3;i++){b=getRef("tr"+i+"_"+a);if(b.style.visibility=="visible"){b.style.visibility="hidden";b.style.display="none"}else{b.style.visibility="visible";b.style.display=""}}}function showcloseLayer(a){var b=getRef(a);if(b.style.visibility=="visible"){b.style.visibility="hidden";b.style.display="none";doResize()}else{b.style.visibility="visible";b.style.display="";doResize()}}function showcloseLayerLevel(a,b){var d=getRef(a);var c=getRef(b);if(d.style.visibility=="visible"){d.style.visibility="hidden";d.style.display="none";c.src="images/icons/plusIcon.gif"}else{d.style.visibility="visible";d.style.display="";c.src="images/icons/minusIcon.gif"}}function showLayer(a){var b=getRef(a);b.style.visibility="visible";b.style.display="";doResize()}function closeLayer(a){var b=getRef(a);b.style.visibility="hidden";b.style.display="none";doResize()}function showLayerN(a){var b=getRef(a);b.style.visibility="visible";b.style.display=""}function closeLayerN(a){var b=getRef(a);b.style.visibility="hidden";b.style.display="none"}function showLayerBold(a){var b=getRef(a+"bold");b.style.fontWeight="bold";var b=getRef(a);b.style.visibility="visible";b.style.display=""}function closeLayerBold(a){var b=getRef(a+"bold");b.style.fontWeight="normal";var b=getRef(a);b.style.visibility="hidden";b.style.display="none"}function showcloseLayerBold(a){var b=getRef(a);if(b.style.visibility=="visible"){closeLayerBold(a);doResize()}else{showLayerBold(a);doResize()}}function closeLayerMeeting(a){var b=getRef(a);if(b.style.visibility=="visible"){closeLayer(a)}}function showSettings(a,b,c){objform=document.getElementById(c);new Ajax.Updater(a,"ajax.php",{onLoading:function(d){Element.show("indicator")},parameters:"action="+b+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showProfile(a,c,d,b){new Ajax.Updater(a,"ajax.php",{onComplete:function(e){doResize()},parameters:"action="+c+"&id="+d+"&profile="+b,evalScripts:true,asynchronous:true})}function showProfileSearch(a,d,e,c,b){new Ajax.Updater(a,"ajax.php",{onComplete:function(f){setTimeout("doResize()",500)},parameters:"action="+d+"&id="+e+"&profile="+b+"&type="+c,evalScripts:true,asynchronous:true})}function showProfileSearchH(a,d,f,c,b,e){objform=document.getElementById(e);new Ajax.Updater(a,"ajax.php",{onComplete:function(g){setTimeout("doResize()",500)},parameters:"action="+d+"&id="+f+"&profile="+b+"&type="+c+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function doCallBack(a,b,c){new Ajax.Updater(a,"ajax.php",{onLoading:function(d){Element.show("notification")},onComplete:function(d){Element.hide("notification")},parameters:"action="+b+"&id="+c,evalScripts:true,asynchronous:true})}function add2cart(b,c,e,d,a){new Ajax.Updater(b,"ajax.php",{onLoading:function(f){Element.show("notification")},onComplete:function(f){Element.hide("notification")},parameters:"action="+c+"&id="+e+"&qt="+d,evalScripts:true,asynchronous:true});new Ajax.Updater("cartdisplay","ajax.php",{parameters:"action=displaycart",evalScripts:true,asynchronous:true});doCallBack("cartimg_"+e,"updimgcart",e);showLayer("viewbasket")}function showImage(b,e,c,a){var d=getRef(b);d.style.visibility="hidden";d.style.display="none";new Ajax.Updater(e,"ajax.php",{onComplete:function(f){d.style.visibility="visible",d.style.display=""},parameters:"action="+c+"&imagelink="+a,evalScripts:true,asynchronous:true})}function showSearchTo(c,d,a,f){objform=document.getElementById(f);var e=getRef(c);var b=getRef("indicator");e.style.visibility="hidden";e.style.display="none";b.style.visibility="visible";b.style.display="";new Ajax.Updater(c,"ajax.php",{onComplete:function(g){b.style.visibility="hidden",b.style.display="none",e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&filterTo="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUser(a,c,b){var d=getRef(a);d.style.visibility="hidden";d.style.display="none";new Ajax.Updater(a,"ajax.php",{onComplete:function(e){d.style.visibility="visible",d.style.display=""},parameters:"action="+c+"&idApp="+b,evalScripts:true,asynchronous:true})}function showcloseLayerDetails(a,b,e,d,c){var f=getRef(b);if(f.style.visibility=="visible"){f.style.visibility="hidden";f.style.display="none";doResize()}else{f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onLoading:function(g){Element.show("indicator_"+d)},onComplete:function(g){Element.hide("indicator_"+d),doResize()},parameters:"action="+e+"&idApp="+d+"&type="+c,evalScripts:true,asynchronous:true});f.style.visibility="visible";f.style.display="";var f=getRef(a);f.href="javascript:showcloseLayer('"+b+"');"}}function showcloseLayerDetailsMeeting(b,c,e,d,a){var f=getRef(c);if(f.style.visibility=="visible"){f.style.visibility="hidden";f.style.display="none"}else{f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(c,"ajax.php",{onLoading:function(g){Element.show("indicator_"+a)},onComplete:function(g){Element.hide("indicator_"+a),doResize()},parameters:"action="+e+"&idApp="+d,evalScripts:true,asynchronous:true});f.style.visibility="visible";f.style.display="";var f=getRef(b);f.href="javascript:showcloseLayer('"+c+"');"}}function showLayerUserEditAdd(a,d,b,f,c){objform=document.getElementById(f);var e=getRef(a);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(a,"ajax.php",{onLoading:function(g){Element.show("indicator")},onComplete:function(g){showListPersons(c),e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+b+"&edit="+c+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditAddBO(b,e,c,a,g,d){objform=document.getElementById(g);var f=getRef(b);f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onLoading:function(h){Element.show("indicator")},onComplete:function(h){showListPersonsBO(c,d),f.style.visibility="visible",f.style.display=""},parameters:"action="+e+"&idApp="+c+"&idPerson="+a+"&edit="+d+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showListPersons(a){if(a>0){new Ajax.Updater("personsedition","ajax.php",{parameters:"action=showListPersons",evalScripts:true,asynchronous:true})}Element.hide("indicator")}function showListPersonsBO(a,b){if(b>0){new Ajax.Updater("personsedition","ajax.php",{parameters:"action=showListPersonsBO&idApp="+a,evalScripts:true,asynchronous:true})}Element.hide("indicator")}function noShow(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEdit(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEdit2Param(b,d,e,c,a,g){objform=document.getElementById(g);var f=getRef(b);f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(h){f.style.visibility="visible",f.style.display=""},parameters:"action="+d+"&idLogin="+e+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerHistoryLog(c,e,d,f,a,b,h){objform=document.getElementById(h);var g=getRef(c);g.style.visibility="hidden";g.style.display="none";new Ajax.Updater(c,"ajax.php",{onComplete:function(j){g.style.visibility="visible",g.style.display=""},parameters:"action="+e+"&idLogin="+f+"&idApp="+d+"&idHistorial="+a+"&idType="+b+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerStand(f,e,b,a,j,d,h,g){objform=document.getElementById(g);var c=getRef(f);c.style.visibility="hidden";c.style.display="none";new Ajax.Updater(f,"ajax.php",{onComplete:function(k){c.style.visibility="visible",c.style.display=""},parameters:"action="+e+"&idPricing="+j+"&idCategory="+d+"&idApp="+b+"&idLogin="+a+"&idHistorial="+h+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditLocation(a,c,b,e){objform=document.getElementById(e);var d=getRef(a);d.style.visibility="hidden";d.style.display="none";new Ajax.Updater(a,"ajax.php",{onComplete:function(f){update_layer("edit_layer_location",b,0),d.style.visibility="visible",d.style.display=""},parameters:"action="+c+"&idApp="+b+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditLogo(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idOffer="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSave(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){update_layer("edit_layer_legalname",c,a),e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSaveClose(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){update_layer("edit_layer_legalname",c,a)},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUpdatePaymentMethod(b,d,c,e,a,g){objform=document.getElementById(g);var f=getRef(b);f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(h){update_layer("edit_layer_paymentmethod",c,e),f.style.visibility="visible",f.style.display=""},parameters:"action="+d+"&idApp="+c+"&idLogin="+e+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerCalSave(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){update_layer("edit_layer_cal",c,a),e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSaveStand(f,e,b,a,j,d,h,g){objform=document.getElementById(g);var c=getRef(f);c.style.visibility="hidden";c.style.display="none";new Ajax.Updater(f,"ajax.php",{onComplete:function(k){update_layer("edit_layer_stand",b,h),c.style.visibility="visible",c.style.display=""},parameters:"action="+e+"&idPricing="+j+"&idCategory="+d+"&idApp="+b+"&idLogin="+a+"&idHistorial="+h+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSaveAct(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){update_layer("edit_layer_activity",c,a),e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSaveIdent(b,d,c,a,f){objform=document.getElementById(f);var e=getRef(b);e.style.visibility="hidden";e.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(g){update_layer("edit_layer_identity",c,a),e.style.visibility="visible",e.style.display=""},parameters:"action="+d+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSave2Param(b,d,e,c,a,g){objform=document.getElementById(g);var f=getRef(b);f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(h){update_layer("edit_layer_name",c,a),f.style.visibility="visible",f.style.display=""},parameters:"action="+d+"&idLogin="+e+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function showLayerUserEditSave2ParamClose(b,d,e,c,a,g){objform=document.getElementById(g);var f=getRef(b);f.style.visibility="hidden";f.style.display="none";new Ajax.Updater(b,"ajax.php",{onComplete:function(h){update_layer("edit_layer_name",c,a)},parameters:"action="+d+"&idLogin="+e+"&idApp="+c+"&idHistorial="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function update_layer(b,c,a){new Ajax.Updater(b+c,"ajax.php",{parameters:"action=update_"+b+"&idApp="+c+"&idHistorial="+a,evalScripts:true,asynchronous:true})}function closeLayerUser(a){var b=getRef(a);b.style.left=1024;b.style.top=1;b.style.visibility="hidden";b.style.display="none";mydrag.destroy()}function monitor(d,g,b,f,c,e,h){objform=document.getElementById(h);var a=0;if(e=="company"){a=f}else{if(e=="delegate"){a=b}else{a=e}}new Ajax.Updater(d,"ajax.php",{parameters:"action="+g+"&idApp="+b+"&idLogin="+f+"&dbaction="+c+"&type="+e+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function contactsharingrequest(c,e,d,b,f,a,g){objform=document.getElementById(g);new Ajax.Updater(c,"ajax.php",{parameters:"action="+e+"&idOrgunitFrom="+d+"&idDelegateFrom="+b+"&idOrgunitTo="+f+"&idDelegateTo="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function networksharingnext(d,f,e,c,g,b,a,h){objform=document.getElementById(h);new Ajax.Updater("nothing","ajax.php",{onComplete:function(j){closeLayer(d),closeLayer("tr"+d)},parameters:"action="+f+"&idOrgunitFrom="+e+"&idDelegateFrom="+c+"&idOrgunitTo="+g+"&idDelegateTo="+b+"&status="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function publish(e,d,c,f,a,h){if(confirm("Are you sure you want to publish the offer?")){objform=document.getElementById(h);var g=getRef(c);g.style.visibility="hidden";g.style.display="none";new Ajax.Updater(c,"ajax.php",{onLoading:function(j){Element.show("indicator_"+idApp)},onComplete:function(j){Element.hide("indicator_"+idApp),g.style.visibility="visible",g.style.display=""},parameters:"action="+f+"&idOffer="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});var b=getRef(e);b.style.backgroundColor="#F29200";var b=getRef(d);b.style.backgroundColor="#F29200"}}function unpublish(e,d,c,f,a,h){if(confirm("Are you sure you want to unpublish the offer?")){objform=document.getElementById(h);var g=getRef(c);g.style.visibility="hidden";g.style.display="none";new Ajax.Updater(c,"ajax.php",{onLoading:function(j){Element.show("indicator_"+idApp)},onComplete:function(j){Element.hide("indicator_"+idApp),g.style.visibility="visible",g.style.display=""},parameters:"action="+f+"&idOffer="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});var b=getRef(e);b.style.backgroundColor="#FF0000";var b=getRef(d);b.style.backgroundColor="#FF0000"}}function standName(b,d,g,c,a,e,h){objform=document.getElementById(h);var f=getRef(b);f.style.visibility="visible";f.style.display="block";new Ajax.Updater("update","ajax.php",{onComplete:function(j){f.style.visibility="hidden",f.style.display="none"},parameters:"action="+d+"&idOrgunit="+g+"&idProduct="+c+"&idStand="+a+"&letNum="+e+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function editPersonBox(a,b,d,c){objform=document.getElementById(c);new Ajax.Updater(a,"ajax.php",{onComplete:function(e){submitAreaPage("mso","boxes","")},parameters:"action="+b+"&idBooth="+d+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function Locate(f,d,c,b){var a=0;var g=0;c=((c)?c:-36);b=((b)?b:-104);if(!f){var f=window.event}if(f.pageX||f.pageY){a=f.pageX;g=f.pageY}else{if(f.clientX||f.clientY){a=f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;g=f.clientY+document.body.scrollTop+document.documentElement.scrollTop}}g=g+b;g=((g>40)?g:40);a=a+c;a=((a>1)?a:1);a=((a<700)?a:700);document.getElementById(d).style.top=(g)+"px";document.getElementById(d).style.left=(a)+"px"}function listBoxRegion(a,b){objform=document.getElementById(b);new Ajax.Updater(a,"ajax.php",{onComplete:function(c){doResize()},parameters:"action=listRegion&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listBoxSalon(a,b){objform=document.getElementById(b);new Ajax.Updater(a,"ajax.php",{onComplete:function(c){doResize()},parameters:"action=listSalon&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listSecondList(c,b,e,d,a,f){objform=document.getElementById(f);new Ajax.Updater(c,"ajax.php",{onComplete:function(g){doResize()},parameters:"action=listSecondList&listName="+b+"&postName="+e+"&defValue="+d+"&listClass="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleLevelMax(e,g,c,l,h,d,j,b,f,k,a){objform=document.getElementById(g);new Ajax.Updater(e,"ajax.php",{onComplete:function(m){doResize()},parameters:"action=listMultipleLevelMax&idLayer="+e+"&Classification="+c+"&Classlist="+l+"&idDE="+h+"&idParent="+d+"&orderBy="+j+"&MaxSel="+b+"&widthscale="+f+"&toSession="+k+"&idlang="+a+"&objformname="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(e+"Anc").focus()}function listMultipleLevelMin(e,g,c,l,h,d,j,b,f,k,a){objform=document.getElementById(g);new Ajax.Updater(e,"ajax.php",{onComplete:function(m){doResize()},parameters:"action=listMultipleLevelMin&idLayer="+e+"&Classification="+c+"&Classlist="+l+"&idDE="+h+"&idParent="+d+"&orderBy="+j+"&MaxSel="+b+"&widthscale="+f+"&toSession="+k+"&idlang="+a+"&objformname="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleLevelSMax(e,g,c,l,h,d,j,b,f,k,a){objform=document.getElementById(g);new Ajax.Updater(e,"ajax.php",{onComplete:function(m){doResize()},parameters:"action=listMultipleLevelSMax&idLayer="+e+"&Classification="+c+"&Classlist="+l+"&idDE="+h+"&idParent="+d+"&orderBy="+j+"&MaxSel="+b+"&widthscale="+f+"&toSession="+k+"&idlang="+a+"&objformname="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(e+"Anc").focus()}function listMultipleLevelSMin(e,g,c,l,h,d,j,b,f,k,a){objform=document.getElementById(g);new Ajax.Updater(e,"ajax.php",{onComplete:function(m){doResize()},parameters:"action=listMultipleLevelSMin&idLayer="+e+"&Classification="+c+"&Classlist="+l+"&idDE="+h+"&idParent="+d+"&orderBy="+j+"&MaxSel="+b+"&widthscale="+f+"&toSession="+k+"&idlang="+a+"&objformname="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleLevelSMaxNaked(e,g,c,l,h,d,j,b,f,k,a){objform=document.getElementById(g);new Ajax.Updater(e,"ajax.php",{onComplete:function(m){doResize()},parameters:"action=listMultipleLevelSMaxNaked&idLayer="+e+"&Classification="+c+"&Classlist="+l+"&idDE="+h+"&idParent="+d+"&orderBy="+j+"&MaxSel="+b+"&widthscale="+f+"&toSession="+k+"&idlang="+a+"&objformname="+g+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(e+"Anc").focus()}function listMultipleLevelSFilterMax(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleLevelSFilterMax&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(d+"Anc").focus()}function listMultipleLevelSFilterMin(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleLevelSFilterMin&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleMax(f,h,d,m,j,e,k,b,g,l,c,a){objform=document.getElementById(h);new Ajax.Updater(f,"ajax.php",{onComplete:function(n){doResize()},parameters:"action=listMultipleMax&idLayer="+f+"&Classification="+d+"&Classlist="+m+"&idDE="+j+"&idParent="+e+"&orderBy="+k+"&MaxSel="+b+"&widthscale="+g+"&toSession="+l+"&acronym="+c+"&counter="+a+"&objformname="+h+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(f+"Anc").focus()}function listMultipleMin(f,h,d,m,j,e,k,b,g,l,c,a){objform=document.getElementById(h);new Ajax.Updater(f,"ajax.php",{onComplete:function(n){doResize()},parameters:"action=listMultipleMin&idLayer="+f+"&Classification="+d+"&Classlist="+m+"&idDE="+j+"&idParent="+e+"&orderBy="+k+"&MaxSel="+b+"&widthscale="+g+"&toSession="+l+"&acronym="+c+"&counter="+a+"&objformname="+h+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleMaxFilter(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleMaxFilter&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(d+"Anc").focus()}function listMultipleMinFilter(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleMinFilter&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleLevelMaxFilter(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleLevelMaxFilter&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true});document.getElementById(d+"Anc").focus()}function listMultipleLevelMinFilter(d,f,b,k,g,c,h,a,e,j){objform=document.getElementById(f);new Ajax.Updater(d,"ajax.php",{onComplete:function(l){doResize()},parameters:"action=listMultipleLevelMinFilter&idLayer="+d+"&Classification="+b+"&Classlist="+k+"&idDE="+g+"&idParent="+c+"&orderBy="+h+"&MaxSel="+a+"&widthscale="+e+"&toSession="+j+"&objformname="+f+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleEdit(e,h,j,b,k,f,o,l,g,m,d,n,a,c){SumSel=parseInt(document.getElementById(e).value);opt=document.getElementById(h).checked;if((d>0)&&(SumSel>=d)&&(opt)){if(c=="fr"){alert("Vous pouvez en choisir seulement "+d+".")}else{alert("You can not select more than "+d+".")}document.getElementById(h).checked=false}else{if(opt){document.getElementById(e).value=SumSel+1}else{document.getElementById(e).value=SumSel-1}objform=document.getElementById(k);new Ajax.Updater("edit","ajax.php",{parameters:"action=listMultipleEdit&idlPost="+h+"&idLayer="+j+"&idObject="+b+"&Classification="+f+"&Classlist="+o+"&idDE="+l+"&idParent="+g+"&level="+a+"&orderBy="+m+"&MaxSel="+d+"&toSession="+n+"&objformname="+k+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}}function listMultipleEditParent(e,h,j,b,k,f,p,l,g,m,d,n,a,c,o){SumSel=parseInt(document.getElementById(e).value);opt=document.getElementById(h).checked;par=document.getElementById(o);if((!opt)&&(par.checked)){par.checked=false;document.getElementById(e).value=SumSel-1}if(opt){document.getElementById(e).value=SumSel+1}else{document.getElementById(e).value=SumSel-1}}function pausecomp(c){var b=new Date();var a=null;do{a=new Date()}while(a-b<c)}function checkUncheckAll(m,h,l,e,k,g,b,n,f,r,o,j,p,d,q,a,c){value=document.getElementById(k).checked?true:false;toggleChecked(document.getElementById(m),value,h,l,e,k,g,b,n,f,r,o,j,p,d,q,a,c)}function toggleChecked(b,n,k,c,h,j,s,l,r,e,p,m,q,g,u,o,a,t){try{str=b.name;if(str.substr(0,c)==k){b.checked=n;SumSel=parseInt(document.getElementById(h).value);opt=document.getElementById(j).checked;if((u>0)&&(SumSel>=u)&&(opt)){if(t=="fr"){alert("Vous pouvez en choisir seulement "+u+".")}else{alert("You can not select more than "+u+".")}document.getElementById(j).checked=false}if(opt){document.getElementById(h).value=SumSel+1}else{document.getElementById(h).value=SumSel-1}}}catch(f){}if(b.childNodes&&b.childNodes.length>0){for(var d=0;d<b.childNodes.length;d++){toggleChecked(b.childNodes[d],n,k,c,h,j,s,l,r,e,p,m,q,g,u,o,a,t)}}}function listMultipleEditFilter(d,g,h,b,j,e,n,k,f,l,c,m,a){SumSel=parseInt(document.getElementById(d).value);opt=document.getElementById(g).checked;if(opt){document.getElementById(d).value=SumSel+1}else{document.getElementById(d).value=SumSel-1}objform=document.getElementById(j);new Ajax.Updater("edit","ajax.php",{parameters:"action=listMultipleEditFilter&idlPost="+g+"&idLayer="+h+"&idObject="+b+"&Classification="+e+"&Classlist="+n+"&idDE="+k+"&idParent="+f+"&level="+a+"&orderBy="+l+"&MaxSel="+c+"&toSession="+m+"&objformname="+j+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listSingle(f,e,d,h,g,c,b,a){opt=document.getElementById(f).value;if(opt>0){document.getElementById(e).value=1}else{document.getElementById(e).value=0}objform=document.getElementById(g);new Ajax.Updater("edit","ajax.php",{parameters:"action=listSingle&idlPost="+opt+"&idLayer="+d+"&Classification="+c+"&Classlist="+b+"&idDE="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleRadio(f,b,e,h,g,d,c,a){objform=document.getElementById(g);new Ajax.Updater("edit","ajax.php",{parameters:"action=listMultipleRadio&idlPost="+b+"&idLayer="+e+"&idObject="+h+"&Classification="+d+"&Classlist="+c+"&idDE="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listMultipleOneRadio(f,b,e,h,g,d,c,a){objform=document.getElementById(g);new Ajax.Updater("edit","ajax.php",{parameters:"action=listMultipleOneRadio&idlPost="+b+"&idLayer="+e+"&idObject="+h+"&Classification="+d+"&Classlist="+c+"&idDE="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function listSingleRadio(e,d,g,f,c,b,a){objform=document.getElementById(f);new Ajax.Updater("edit","ajax.php",{parameters:"action=listSingleRadio&idlPost="+e+"&idLayer="+d+"&idObject="+g+"&Classification="+c+"&Classlist="+b+"&idDE="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function availableSlot(b,a,c,d,e,h){var f=getRef(a);var g=getRef(c);objform=document.getElementById(h);if(g.checked){f.style.backgroundColor="#E7EBF4"}else{f.style.backgroundColor="red"}new Ajax.Updater(d,"ajax.php",{parameters:"action=editAvailability&idslot="+b+"&iddate="+e+"&idval="+g.checked+"&idslottr="+a+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function availableSlotBO(b,c,h,d,g,a,k,f){var j=getRef(c);var e=getRef(h);objform=document.getElementById(f);if(e.checked){j.style.backgroundColor="#E7EBF4"}else{j.style.backgroundColor="red"}new Ajax.Updater(d,"ajax.php",{parameters:"action=editAvailabilityBO&idslot="+b+"&iddate="+g+"&idval="+e.checked+"&idslottr="+c+"&idOrgunit="+a+"&idPerson="+k+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function importpubmedXML(a,b){objform=document.getElementById(b);new Ajax.Updater(a,"ajax.php",{parameters:"action=importpubmedXML&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})}function callinfobox(a,b){new Ajax.Updater(a,"ajaxinfobox.php",{onComplete:function(c){doResize()},parameters:"action="+b,evalScripts:true,asynchronous:true})}function callwww(a,b,c){new Ajax.Updater(a,"ajaxinfobox.php",{onComplete:function(d){doResize()},parameters:"action="+b+"&id="+c,evalScripts:true,asynchronous:true})}function callblocksearch(a,b,c){new Ajax.Updater(a,"ajaxblocksearch.php",{onComplete:function(d){doResize()},parameters:"action="+b+"&mypost="+Form.serialize(objform),evalScripts:true,asynchronous:true})};
