/*
Version=1.0.0
Author=FPD
Date of last change=03JAN01
Changed by=FPD
*/

var current_menu = false;
var current_tab = false;
var overLib_loaded = false;
var useHelp = false;
var current_layer = 1;


var validNav = navigator.appVersion.substring(0,4) >= 3;
isIE = (document.all)? true : false;


function goto_nc2000()
{
  window.open('/templates/name_change_celebration.html','Change_2000','height=500 width=711;')
}  


function init()
{

// select active menu
   if (current_menu=null) {document.images[current_menu].src = NavItem[current_menu]['act'].src;};
    else if (current_menu) {document.images[current_menu].src = NavItem[current_menu]['act'].src;};
   if (current_tab)  {document.images[current_tab].src = NavItem[current_tab]['act'].src;};
   if ((obj=MM_findObj('p'+ current_layer ))!=null) {obj.src='/pix/p_nav/page_' + current_layer + '_act.gif';}
   if ((obj = MM_findObj('previous'))!=null){
     obj.src = "/pix/dot_trans2.gif";
   }
 // start the scrolling menus	
	start();
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
	 n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
  return x;
}

// NavItem
function NavItem(OnSrc, OffSrc, ActSrc, Status_Text){
  if (validNav){
    this['on'] = new Image();
    this['on'].src = OnSrc;
    if (OffSrc){
      this['off'] = new Image();
      this['off'].src = OffSrc;
	}else{this['off'] = this['on']}
    if (ActSrc){
      this['act'] = new Image();
      this['act'].src = ActSrc;
	}else{this['act'] = this['on']}
    this.text = Status_Text;
  }
}


function NavStatus(status,item){
  if (validNav){
     if ((item == current_menu) || (item == current_tab)) {
//        document.images[item].src = NavItem[item]['on'].src;
        return true;
      }
    document.images[item].src = NavItem[item][status].src;
    if (status == 'on'){ 
      window.status = NavItem[item].text;
	      if (useHelp) dlc( NavItem[item].text ,' info'); // overlib function
    }
    else {
      window.status = '';
	      if (useHelp) nd(); // overlib function
    }
  }
  return true;
}


// load top bar images
NavItem['track']         = new NavItem('/pix/tb_track_on.gif','/pix/tb_track_off.gif','/pix/tb_track_on.gif','Quickly find shipment information by entering the waybill number.');
NavItem['search']        = new NavItem('/pix/tb_search_on.gif','/pix/tb_search_off.gif','/pix/tb_search_on.gif','Find important information by entering a keyword.');
NavItem['balloon_help']  = new NavItem('/pix/tb_balloon_help_on.gif','/pix/tb_balloon_help_off.gif','/pix/tb_balloon_help_on.gif','');
// load main menu images
NavItem['serviceguide'] = new NavItem('/pix/tnav_serviceguide_on.gif','/pix/tnav_serviceguide_off.gif','/pix/tnav_serviceguide_act.gif','For Supply Chain Solutions, Products and Services, eMpower Products, and UTi differentiators.');
NavItem['utilities']    = new NavItem('/pix/tnav_utilities_on.gif','/pix/tnav_utilities_off.gif','/pix/tnav_utilities_act.gif','For Downloads, Software Tools and Useful Links.');
NavItem['about']        = new NavItem('/pix/tnav_overview_on.gif','/pix/tnav_overview_off.gif','/pix/tnav_overview_act.gif','For a Company Profile, Management Team, Strategic Alliances, Investor Relations and the Press Room.');
NavItem['contact']      = new NavItem('/pix/tnav_contactus_on.gif','/pix/tnav_contactus_off.gif','/pix/tnav_contactus_act.gif','Send an eMail to UTi.');
NavItem['directory']    = new NavItem('/pix/tnav_directory_on.gif','/pix/tnav_directory_off.gif','/pix/tnav_directory_act.gif','For a UTi Worldwide Office Locator.');

function setHelp(status){
  if (overLib_loaded){
    useHelp = status ;
    nd();
  }
}

function mouseOver(text){
   window.status=text;
    if (useHelp) dlc(text,' info'); // overlib function
   return true;
}

function mouseOut(){
   window.status='';
    if (useHelp) nd(); // overlib function
   return true;
}

function search(form){
  with (form){
    if (keyword.value.length < 2) {
	  alert ("Please insert a searchable term");
	  keyword.focus ();
	  return;
	}
    action = '/cgi-bin/swish-bin/s_uti.pl';
    results.value='0';
	submit();
  }
}

function track(form){
  with (form){
      if (p_hb_no.value.length < 3) {
	  alert ("Please insert a Waybill Number");
	  p_hb_no.focus();
	  return;
	}
    action = 'http://www.us.go2uti.com/uti/uti_q_hbu_hitlist?p_hb_no='+document.form1.p_hb_no.value;
   submit();    
  }
}


function jump(url) {
   if (url != "") 
	   remote = parent.window.location =url;
}


function jump_new_window(url) {
   if ((url != "") || (url != "#"))
	   remote = window.open(url,"");
}

function printversion(){ 
  var printfriendly = document.URL;		//format URL for printer friendly version of page and open in new window
  printfriendly = printfriendly.substr(0,printfriendly.length-4);
  printfriendly += "_print.html"; 
  printfriendly = printfriendly.replace(/_/g,'');
  window.open(printfriendly);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


SERVER = "www.go2uti.com";
CONTENTGROUP = "Content";

<!--
var W="?version=1";
W+="&server="+escape(SERVER);
W+="&cGroup="+escape(CONTENTGROUP);
W+="&browserDate="+escape( Date());
W+="&title="+escape(document.title);
W+="&url="+window.document.URL;
W+="&referrer="+window.document.referrer;
W+="&appname="+escape(navigator.appName);
W+="&appversion="+escape(navigator.appVersion);
W+="&cookieOK="+(navigator.cookieEnabled?"Yes":"No");
W+="&userLanguage="+(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
W+="&platform="+navigator.platform;
W+="&bgColor="+escape(document.bgColor);
if(typeof(screen)=="object")
{
W+="&screenResolution="+screen.width+"x"+screen.height;
W+="&colorDepth="+screen.colorDepth;
W+="&javaOK="+(navigator.javaEnabled()?"Yes":"No");
W+="&NSpluginList=";
for( var i=0; i< navigator.plugins.length; i++)
W+=escape(navigator.plugins[i].name)+";";
}
function logstat(){
  var log = new Image();
  log.src = '/cgi-bin/stat/l3' + W ;
}
// logstat();
//-->

<!-- This script does the scrolling menu on the public site -->

<!-- Begin
//scroller width
var swidth=200

//scroller height
var sheight=46


//scroller's speed;
var sspeed=5

var wholemessage=''

//text: change to your own

wholemessage='<div id="headlines"><A class="black" href="/news/fuel.html" target="_top">News Update:<br>Fuel Surcharge Reductions <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV><p>&nbsp;<div id="headlines"><A class="black" href="/news/economy.html" target="_top">News Update:<br>3PLs Sport a Strong Showing in a Poor U.S. Economy <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV><p>&nbsp;<div id="headlines"><A class="black" href="/news/consumer.html" target="_top">News Update:<br>Consumer Goods Companies Plan on Increasing Supply Chain Applications to Increase Efficiency <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV><p>&nbsp;<div id="headlines"><A class="black" href="/news/transport.html" target="_top">News Update:<br>The U.S. House of Representatives introduces “The Secure Transportation for America Act 2001” bill. <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV><p>&nbsp;</p><div id="headlines"><A class="black" href="/broadcast/material_emergency.html" target="_top">Check out the Networks Broadcast:<br>Wood Packing Emergency Measures <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV><p>&nbsp;</p><div id="headlines"><A class="black" href="/news/security.html" target="_top">News Update:<br>Security Surcharge <IMG alt="" border="0" height="12" src="/pix/arrow.gif" width="12"></a></DIV>'


function start(){
if (document.all) return
if (document.getElementById){
document.getElementById("slider").style.visibility="show"
ns6marquee(document.getElementById('slider'))
}
else if(document.layers){
document.slider1.visibility="show"
ns4marquee(document.slider1.document.slider2)
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
ns4layer.document.write(wholemessage)
ns4layer.document.close()
sizeup=ns4layer.document.height
ns4layer.top-=sizeup
ns4slide()
}
function ns4slide(){
if (ns4layer.top>=sizeup*(-1)){
ns4layer.top-=sspeed
setTimeout("ns4slide()",100)
}
else{
ns4layer.top=sheight
ns4slide()
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
ns6div.innerHTML=wholemessage
ns6div.style.top=sheight
sizeup=sheight
ns6slide()
}
function ns6slide(){
if (parseInt(ns6div.style.top)>=sizeup*(-1)){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6slide()",100)
}
else{
ns6div.style.top=sheight
ns6slide()
}
}
//  End -->

