// JavaScript below

function popup(url, target, width, height, features)
{
    var wnd, features1;

    features1 = 'width=' + width + ',height=' + height;
    if (screen)
        features1 += ',left=' + (screen.width - width) / 2 +
                ',top=' + (screen.height - height) /2;
    if (features)
        features1 += ',' + features;

    wnd = window.open(url, target, features1);
    wnd.focus();
}

function confirm_url(msg, url)
{
    if (confirm(msg)) {
        location.href = url;
    }
}

function pause(numberMillis) {
    var now = new Date();
    var exitTime = now.getTime() + numberMillis;
    while (true) {
        now = new Date();
        if (now.getTime() > exitTime)
            return;
    }
}

function validate(action, form_id)
{
   document.getElementById("id_action").value = action;
   document.forms[form_id].submit();

}

function change_tab(nr)
{
for(i=1;i<4;i++){
  document.getElementById('t'+i).style.display='none';
  document.getElementById('ta'+i).className='tab'+i;
}
document.getElementById('t'+nr).style.display='block';
document.getElementById('ta'+nr).className='tab'+nr+'_active'
}

