
function registerAjaxInfo() {
   ajaxEngine.registerRequest( 'getCal', 'getwhat.php' );
   ajaxEngine.registerRequest( 'report', 'getwhat.php?what=report' );
   ajaxEngine.registerRequest( 'aads', 'getwhat.php?what=all' );
   ajaxEngine.registerRequest( 'pads', 'getwhat.php?what=photos' );
   ajaxEngine.registerRequest( 'mads', 'getwhat.php?what=map' );
   ajaxEngine.registerRequest( 'vads', 'getwhat.php?what=video' );
   ajaxEngine.registerAjaxElement('calendax');
   ajaxEngine.registerAjaxElement('rptDiv');
   ajaxEngine.registerAjaxElement('s2Con');
   ajaxEngine.registerAjaxElement('s3Con');
   ajaxEngine.registerAjaxElement('s4Con');
   ajaxEngine.registerAjaxElement('s5Con');
}

function getCal(m,year,action) {
ajaxEngine.sendRequest( "getCal","what=calendax","month="+m,"year="+year,"action="+action,"oDiv=calendax");
}

function report(id,action) {
ajaxEngine.sendRequest( "report","id="+id,"action="+action,"oDiv=rptDiv");
}


function aads(action) {
if(action=="new"){
document.getElementById("Ss2New").id="s2New";
document.getElementById("Ss2Mp").id="s2Mp";
}
if(action=="mopo"){
document.getElementById("s2New").id="Ss2New";
document.getElementById("s2Mp").id="Ss2Mp";
}
ajaxEngine.sendRequest( "aads","action="+action,"oDiv=s2Con");
}

function pads(action) {
if(action=="new"){
document.getElementById("Ss3New").id="s3New";
document.getElementById("Ss3Mp").id="s3Mp";
}
if(action=="mopo"){
document.getElementById("s3New").id="Ss3New";
document.getElementById("s3Mp").id="Ss3Mp";
}

ajaxEngine.sendRequest( "pads","action="+action,"oDiv=s3Con");
}

function mads(action) {
if(action=="new"){
initialize();
chargerFichierXml(20)
document.getElementById("Ss4New").id="s4New";
document.getElementById("Ss4Area").id="s4Area";
document.getElementById("s4Link").innerHTML="<a href=\"p,big-map.htm\">Enlarge</a>";
}
if(action=="area"){
document.getElementById("s4New").id="Ss4New";
document.getElementById("s4Area").id="Ss4Area";
document.getElementById("s4Link").innerHTML="";
GUnload();
document.getElementById("s4Con").innerHTML="<br/>";
//document.getElementById("s4Con").innerHTML+="click the map or choose an area here <select name='mapArea'><option value='central'>Central</option><option value='east'>East</option><option value='northeast'>North-East</option><option value='north'>North</option><option value='west'>West</option></select>";
ajaxEngine.sendRequest( "mads","action="+action,"oDiv=s4Con");
}

}

function vads(action) {
ajaxEngine.sendRequest( "vads","action="+action,"oDiv=s5Con");
}

function loadDefault(num){
registerAjaxInfo();
initialize();
chargerFichierXml(num);
}

