
//Secao de dominio
function select_dominio() {
    var index = document.getElementById("imp_login").dominio.selectedIndex;
    var domain = document.getElementById("imp_login").dominio.options[index].value;
    document.getElementById("imp_login").action = domain;
}

function set_focus(field) {
    obj = document.getElementById(field);
    obj.focus();
}

function loginFocus() {
    login = document.getElementById('login');
    senha = document.getElementById('senha');

    if (login.value) {
        senha.select();
    } else {
        login.select();
    }
}

// thanks to www.pontocriativo.com.br
function colocaswf(arquivo,w,h,transparente,params,id) {
    document.write('<object'+(((typeof id != 'undefined') && (navigator.appVersion.indexOf('MSIE') > -1))?' id="'+id+'"':'')+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' + ((typeof w == 'undefined')?'':' width="'+w+'"') + ((typeof h == 'undefined')?'':' height="'+h+'"') + '>');
    document.write('<param name="movie" value="'+arquivo+'">');
    document.write('<param name=quality value=high>');
    document.write('<param name="menu" value="false">');
    if (typeof params != 'undefined') {
        var p = '';

        for (var i in params) {
            p += i + '="' + params[i] + '" ';
            document.write('<param name="'+i+'" value="'+params[i]+'">');
        }
    }
    if (transparente) {
        document.write('<param name="wmode" value="transparent">');
    }
    document.write('<embed'+(((typeof id != 'undefined') && (navigator.appVersion.indexOf('MSIE') < 0))?' id="'+id+'"':'')+' src="'+arquivo+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"' + ((typeof w == 'undefined')?'':' width="'+w+'"') + ((typeof h == 'undefined')?'':' height="'+h+'"') + ' ');
    if (transparente) {
        document.write('wmode="transparent" ');
    }
    document.write(p);
    document.write(' menu="false"></embed>');
    document.write('</object>');
}