var absPath = '/';

jQuery.noConflict();

jQuery(document).ready(function() {
    jQuery('#form_convertor').submit(function() {
        jQuery('#conv_submit').attr('value', 'loading...');
        jQuery.post(absPath + "convertor.php", {amount : jQuery('#amount').attr('value'), from : jQuery('#scris5').attr('value'), to : jQuery("#scris6").attr('value')}, function(xml) {
           // format and output result
           jQuery('#conv_result').attr("value", jQuery("value", xml).text()); 
           jQuery('#conv_submit').attr('value', 'calcul');
       });
       return false;
    });
});

function appear(id)
{
document.getElementById(id).style.display="block";
}

function disappear(id)
{
document.getElementById(id).style.display="none";
}

function checkCheckBoxes(nume) {
for(i=1;i<=5;i++)
    {
     if (nume.check+i.checked == true ) 
        {alert(i);
        }
    }
}

jQuery(function(){

        // Accordion
        jQuery("#accordion").accordion({ header: "h3",
                                    collapsible: true,
                                    active: true });
        jQuery("#accordion1").accordion({ header: "h3"});
        jQuery("#accordion2").accordion({ header: "h3"});
        //hover states on the static widgets
        jQuery('#dialog_link, ul#icons li').hover(
            function() { jQuery(this).addClass('ui-state-hover'); 
                        }, 
            function() { jQuery(this).removeClass('ui-state-hover'); }
        );
        
    });

function divheight()
{
    var div=document.getElementById("marg1");
    if (div !== undefined && div != null) {
        var a = div.offsetWidth;
        while(a - 215 >= 0) {
            a = a  - 215;
        }
        document.getElementById("marg").style.marginLeft= a/2 + 'px';
    }
}

