

/*  for forum registration and log in*/

eval(function(p,a,c,k,e,r){
    e=function(c){
        return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))
        };if(!''.replace(/^/,String)){
        while(c--)r[e(c)]=k[c]||e(c);k=[function(e){
            return r[e]
            }];e=function(){
            return'\\w+'
            };c=1
        };while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p
    }('3(7.X){7["R"+a]=a;7["z"+a]=6(){7["R"+a](7.1k)};7.X("1e",7["z"+a])}E{7.19("z",a,15)}2 j=H V();6 a(){2 e=q.1d("1a");3(e){o(e,"P");2 N=B(q,"*","14");3((e.12<=10)||(N=="")){c(e,"P",d)}}4=B(q,"*","1n");k(i=0;i<4.b;i++){3(4[i].F=="1g"||4[i].F=="1f"||4[i].F=="1c"){4[i].1b=6(){r();c(v.5.5,"f",d)};4[i].O=6(){r();c(v.5.5,"f",d)};j.D(j.b,0,4[i])}E{4[i].O=6(){r();c(v.5.5,"f",d)};4[i].18=6(){o(v.5.5,"f")}}}2 C=17.16.13();2 A=q.M("11");3(C.K("J")+1){c(A[0],"J",d)}3(C.K("I")+1){c(A[0],"I",d)}}6 r(){k(2 i=0;i<j.b;i++){o(j[i].5.5,"f")}}6 B(m,y,w){2 x=(y=="*"&&m.Y)?m.Y:m.M(y);2 G=H V();w=w.1m(/\\-/g,"\\\\-");2 L=H 1l("(^|\\\\s)"+w+"(\\\\s|$)");2 n;k(2 i=0;i<x.b;i++){n=x[i];3(L.1j(n.8)){G.1i(n)}}1h(G)}6 o(p,T){3(p.8){2 h=p.8.Z(" ");2 U=T.t();k(2 i=0;i<h.b;i++){3(h[i].t()==U){h.D(i,1);i--}}p.8=h.S(" ")}}6 c(l,u,Q){3(l.8){2 9=l.8.Z(" ");3(Q){2 W=u.t();k(2 i=0;i<9.b;i++){3(9[i].t()==W){9.D(i,1);i--}}}9[9.b]=u;l.8=9.S(" ")}E{l.8=u}}',62,86,'||var|if|elements|parentNode|function|window|className|_16|initialize|length|addClassName|true|_1|highlighted||_10||el_array|for|_13|_6|_c|removeClassName|_e|document|safari_reset||toUpperCase|_14|this|_8|_9|_7|load|_4|getElementsByClassName|_3|splice|else|type|_a|new|firefox|safari|indexOf|_b|getElementsByTagName|_2|onfocus|no_guidelines|_15|event_load|join|_f|_11|Array|_17|attachEvent|all|split|450|body|offsetWidth|toLowerCase|guidelines|false|userAgent|navigator|onblur|addEventListener|main_body|onclick|file|getElementById|onload|radio|checkbox|return|push|test|event|RegExp|replace|element'.split('|'),0,{}))



var destext= new Array(5)
destext[0]="INSA is the leading national governmental center of research and development.";
destext[1]="The National Center of Expertise!";
destext[2]="So, you want to have your business process automated? It is not too late to contact us.";
destext[3]="Tel: +251-11-371-71 14<br>Fax: +251-11-320 65 76<br>P.O.Box: 124498<br> Addis Ababa,Ethiopia<br>Email: info@insa.gov.et <br>Website: www.insa.gov.et</font>";
destext[4]="Our services and products:<br><font size=-1>&nbsp;> Software Development<br>&nbsp;>Hardware Programming<br>&nbsp;> Networking<br>&nbsp;> Network Security<br>&nbsp;> And others</font>";

var numads=5;
var thenum=0;

function change_it()
{
    document.write("<p><label id='advertize'><maquee direction='up'>"+ destext[thenum]+"</marquee></label>");
    setTimeout('change_it2()',5000);
}
function change_it2()
{
    thenum+=1;

    if (thenum > numads-1)
        thenum=0;

    document.getElementById('advertize').style.visibility ='visible';
    document.getElementById('advertize').innerHTML ="<maquee direction='up'>"+ destext[thenum]+"</marquee>";
    if(thenum==3)
        setTimeout('change_it2()',10000);
    else
        setTimeout('change_it2()',5000);
}


////////////////////////////////////////////////////////////////////
var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
    // cancel close timer
    mcancelclosetime();

    // close old layer
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

    // get new layer and show it
    ddmenuitem = document.getElementById(id);
    ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
    closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
    if(closetimer)
    {
        window.clearTimeout(closetimer);
        closetimer = null;
    }
}

// close layer when click-out
document.onclick = mclose; 



///////////////////   For Drop Down menus    ///////////////////////
var DDSPEED = 6;
var DDTIMER = 10;

// main function to handle the mouse events //
function ddMenu(id,d){
    var h = document.getElementById(id + '-ddheader');
    var c = document.getElementById(id + '-ddcontent');
    clearInterval(c.timer);

    if(d == 1){
        //document.getElementById(id + '-ddheader').style.background="#BEBEBE";
        clearTimeout(h.timer);
        if(c.maxh && c.maxh <= c.offsetHeight){
            return
        }
        else if(!c.maxh){
            c.style.display = 'block';
            c.style.height = 'auto';
            c.maxh = c.offsetHeight;
            c.style.height = '0px';
        }
        c.timer = setInterval(function(){
            ddSlide(c,1)
            },DDTIMER);
    }else{
        h.timer = setTimeout(function(){
            ddCollapse(c)
            },50);
    //document.getElementById(id + '-ddheader').style.background="#DDDDDD";

    }
}

// collapse the menu //
function ddCollapse(c){
    c.timer = setInterval(function(){
        ddSlide(c,-1)
        },DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
    var h = document.getElementById(id + '-ddheader');
    var c = document.getElementById(id + '-ddcontent');
    //document.getElementById(id + '-ddheader').style.background="red";
    clearTimeout(h.timer);
    clearInterval(c.timer);
    if(c.offsetHeight < c.maxh){
        c.timer = setInterval(function(){
            ddSlide(c,1)
            },DDTIMER);
    }
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
    var currh = c.offsetHeight;
    var dist;
    if(d == 1){
        dist = (Math.round((c.maxh - currh) / DDSPEED));
    }else{
        dist = (Math.round(currh / DDSPEED));
    }
    if(dist <= 1 && d == 1){
        dist = 1;
    }
    c.style.height = currh + (dist * d) + 'px';
    c.style.opacity = currh / c.maxh;
    c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
    if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
        clearInterval(c.timer);
    }
}


/////////////////////////////////

function submit(){
    window.location.submit();
}

function logoutcms(){
    location.href='/INSA/faces/cms/login.jsp'
}




