// JavaScript Document

var menucolor = "#E8F0F1";
var hilightcolor = "#54519E";
var normaltextcolor = "#000099";
var hilighttextcolor = "#eeffee";
var myhide = false;
var myscreenwidth = 780;

var documentleft = 1;

function setvars()
{
        var mybrowser = navigator.appName;

        if (mybrowser == "Netscape")
        {
                myscreenwidth = window.outerWidth - 8;
//                alert(myscreenwidth);

                if (myscreenwidth > 778)
                        {
                                documentleft = (myscreenwidth - 778)/2;
                        }
                else
                        {
                                documentleft = 0;
                        }
        }

        else

        {
                myscreenwidth = document.documentElement.scrollWidth - 20;

                if (myscreenwidth > 778)
                        {
                                documentleft = (myscreenwidth - 778)/2;
                        }
                else
                        {
                                documentleft = 0;
                        }
        }

}



function showpop(myelement)

{
myhide = false;
document.getElementById(myelement).style.visibility = "visible";
}

function hidepop(myelement)
{
if (myhide == true)
{
//document.getElementById(myelement).style.visibility = "hidden";
hidenow(myelement);
}
}

function hidenow(myelement)
{
document.getElementById(myelement).style.visibility = "hidden";
}

function startpop(id, poptop, popleft, myshow, my_z_index)

{
if (myshow == true)
document.write("<div onmouseout = clearpop(id) id ='"+ id + "' class ='popmenu_1' style = 'position:absolute;left:"+popleft+";top:"+poptop+"; visibility:visible; z-index:" + my_z_index + ";'><table cellspacing = '0'>");
else
document.write("<div onmouseout = clearpop(id) id ='"+ id + "' class ='popmenu_1' style = 'position:absolute;left:"+popleft+";top:"+poptop+"; visibility:hidden;z-index:" + my_z_index + ";'><table cellspacing = '0'>");
}


function mymove(myurl)
{

//document.location = myurl;
document.location = myurl;

}

function popitem(myaddress,mycaption,mybase)
{
document.write("<tr><td bgcolor ='" + menucolor +"' onmouseout = 'mymouseout(this)' onmouseover = 'mymouseover(this)'  onclick = mymove('" + myaddress + "')>" + mycaption + "</td></tr>");
}

function start_pop_cell()
{
document.write("<tr><td bgcolor ='" + menucolor +"' onmouseout = 'mymouseout(this)' onmouseover = 'mymouseover(this)'>");
}

function stop_pop_cell()
{
        document.write("</td></tr>");
}

function endpop()


{
document.write("</table></div>");
}


function clearpop(myelement)
{
myhide = true;
setTimeout("hidepop('"+ myelement +"')",1000);
}


function mymouseover(myelement)
{
//myelement.className = "pop_onmouse";
myelement.style.backgroundColor= hilightcolor;
myelement.style.color = hilighttextcolor;
//myelement.style.filter = "alpha(opacity=100)";
myhide = false;
}

function mymouseout(myelement)
{
//myelement.className = "pop_onmouse";
myelement.style.backgroundColor = menucolor;
myelement.style.color = normaltextcolor;
//myelement.style.filter = "alpha(opacity=100)";
myhide = true;

}

function menubarover(myelement)
{
        myelement.style.backgroundImage = "url(images/Bar_4.gif)";
        myelement.style.color = "#ff0000";
}

function menubarout(myelement)
{
        myelement.style.backgroundImage = "url(images/Bar_3.gif)";
        myelement.style.color = "#000066";
}



startpop("pop_aboutus",134,documentleft + 95, false,2);

popitem("about_square.php","About SQUARE");
popitem("about_square_informatix.php","About SQUARE InformatiX");
popitem("sister_concerns.php","Sister Concerns");
endpop();


startpop("pop_services",134,documentleft + 180, false,3);

popitem("ispservice.php","ISP Service");
popitem("vsat.php","VSAT Connectivity Service");
popitem("disaster_recovery.php","Disaster Recovery Service");
//popitem("hybrid_networking.php","Hybrid Networking Solution");
//popitem("web_solution.php","Web & E-commerce Solution");
popitem("software_development.php","Software Development");

endpop();

startpop("pop_career",134,documentleft + 365, false,4);

popitem("hot_jobs.php","Hot Jobs");
//popitem("my_job_account.php","My Job Account");
//popitem("search_square_jobs.php","Find A SQUARE JOB");

//        start_pop_cell();
//        document.write("<input type ='text' class = 'text_box_1' size = '15'> <input class = 'button_1' type = 'button' value = 'go'>");
//        stop_pop_cell();

popitem("submit_resume.php","Submit Resume");

endpop();



startpop("pop_contuct_us",134,documentleft + 435, false,5);

//popitem("mailto:help@e-home2u.com","Help Desk");
//popitem("mailto:info@e-home2u.com","Customer Care");

endpop();




function showonly(myelement,myleft)
{
        setvars();
        hidenow("pop_aboutus");
        hidenow("pop_services");
        hidenow("pop_career");
        hidenow("pop_contuct_us");
        showpop(myelement);
        document.getElementById(myelement).style.left = documentleft + myleft;
}


function center_body()
{        setvars();
        document.getElementById("main_body").style.left = documentleft;
}