<!--
//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;


//loading popup with jQuery magic!
function loadPopup(){
//loads popup only if it is disabled
if(popupStatus==0){
$("#backgroundPopup").css({
"opacity": "0.7"
});
$("#backgroundPopup").fadeIn("slow");
$("#popupContact").fadeIn("slow");
popupStatus = 1;
}
}

//disabling popup with jQuery magic!
function disablePopup(){
//disables popup only if it is enabled
if(popupStatus==1){
$("#backgroundPopup").fadeOut("slow");
$("#popupContact").fadeOut("slow");
popupStatus = 0;
}
}


//centering popup
function centerPopup(){
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $("#popupContact").height();
var popupWidth = $("#popupContact").width();
//centering
$("#popupContact").css({
"position": "absolute",
"top": windowHeight/2-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
//only need force for IE6

$("#backgroundPopup").css({
"height": windowHeight
});

}


function dtiLaunchApp( page )
{
    var url;
    
	if( page == 'proj' )
	{
		url = '/company/achievo/index.php';
	}
	else if( page == 'search' )
	{
		url = '/ix/';
	}
	else if( page == 'personnel' )
	{
		url = '/company/addpersonnel.php';
	}
	else if( page == 'vperson' )
	{
		url = '/company/viewpersonnel.php';
	}
    else if( page == 'client' )
    {
        url = '/company/client.php';
    }
	
  if (window.screen)
  {
    var hori=screen.availWidth;
    var verti=screen.availHeight;
    window.open(url,'fullscreen', 'width='+hori+',height='+verti+',fullscreen=1, scrollbars=1,left='+(0)+',top='+(0));
  }
}

function preloadImages()
{
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}
function check_search()
{
    var fieldText=document.search.q.value;
    if(fieldText=="search..." || fieldText=="")
    {
        return false;
    }else{ document.search.submit(); }
}
function csb(v){ if(v.value=="search..."){ v.value=""; } }
function d(v){ if(v.value==""){ v.value="search..."; }else{ check_search(); } }
function goto(v)
{
	if(v.id=="btn1")
	{
		location.href="/svcs/";
	}
	else if(v.id=="btn2")
	{
		location.href="/esupport/";
	}
	else if(v.id=="btn3")
	{
		location.href="/portfolio/";
	}
	else if(v.id=="home")
	{
		location.href="/";
	}
    else if(v.id=="srchhome")
    {
        location.href="/ix/home.php";
    }
    else if(v.id == "help")
    {
        location.href = "/help/";
    }
    else if( v.id == "cp" )
    {
		location.href = '/company/user.php';
    }
    else if( v.id == "lo" )
    {
		location.href = '/company/logoff.php';
    }
}
//-->