function axPostRequest(myurl,mysrcid,mydestid) {
    new Ajax.Request(myurl, {
        method:'post',
        encoding:'UTF-8',
        parameters:$(mysrcid).serialize(),
        onSuccess:function(transport) {
            var response = transport.responseText || "no response text";
            printMessage(mydestid,response);
        } ,
        onFailure:function() {
            alert('Something went wrong...')
        }
    });
}
function axPostRequestLoader(myurl,mysrcid,mydestid) {
    printMessage(mydestid,"<img class=\"loading\" style=\"border:none;background:none\" alt=\"Loading\" src=\"./styles/default/img/loading.gif\" />");
    axPostRequest(myurl,mysrcid,mydestid);
}
function axGetRequest(myurl,mydestid) {
    new Ajax.Request(myurl, {
        method:'get',
        onSuccess:function(transport) {
            var response = transport.responseText || "no response text";
            printMessage(mydestid,response);
        } ,
        onFailure:function() {
            alert('Something went wrong...')
        }
    });
}
function axGetRequestLoader(myurl,mydestid) {
    printMessage(mydestid,"<img class=\"loading\" style=\"border:none;background:none\" alt=\"Loading\" src=\"./styles/default/img/loading.gif\" />");
    axGetRequest(myurl,mydestid);
}
function fadeOut(myid) {
    new Effect.Fade(myid, {
        duration:0.5,
        from:1,
        to:0
    });
}
function fadeIn(myid) {
    new Effect.Appear(myid, {
        duration:0.5
    });
}
function reloadCaptcha() {
    hideBlock('captcha');
    document.getElementById('captcha').src="./captcha.png?"+Math.floor(1111+(9999999-1111+1)*(Math.random()));
    fadeIn('captcha');
}
function dropBox(mysubmit,myid) {
    Effect.Fade(myid, {
        duration:0.2,
        afterFinish:function() {
            document.forms[mysubmit].submit();
        }
    });
}
function axconfirmRedirect(mytarget, mymsg, myid) {
    if(confirm(mymsg)) {
        axGetRequest(mytarget, myid);
    } else {
        return false;
    }
}
