var isDHTML  = 0;
var isID     = 0;
var isAll    = 0;
var isLayers = 0;

if (document.getElementById) {
 isID = 1;
 isDHTML = 1;
}
else if (document.all) {
 isAll = 1;
 isDHTML = 1;
}
else {
 browserVersion = parseInt(navigator.appVersion);
 if ((navigator.appName.indexOf('Netscape') != 1) && (browserVersion == 4)) {
  isLayers = 1;
  isDHTML = 1;
 }
}
function findDOM(objectID,withStyle) {
 if (withStyle == 1) {
  if (isID) {
   return (document.getElementById(objectID).style);
  }
  else {
   if (isAll) {
    return (document.all[objectID].style);
   }
   else {
    if (isLayers) {
	 return (document.layers[objectID]);
	}
   }
  }
 }
 else {
  if (isID) {
   return (document.getElementById(objectID));
  }
  else {
   if (isAll) {
    return (document.all[objectID]);
   }
   else {
    if (isLayers) {
	 return (document.layers[objectID]);
	}
   }
  }
 }
}

var marqueewidth="470px";
var marqueeheight="22px";
var marqueespeed=2;
var pauseit=1;
var copyspeed=marqueespeed;
var pausespeed=(pauseit==0?copyspeed:0);
var actualwidth='';
var cross_marquee;
function populate() {
 cross_marquee=document.getElementById("marquee");
 cross_marquee.style.left=parseInt(marqueewidth)+8+"px";
 cross_marquee.innerHTML=document.getElementById("scrollTemp").innerHTML;
 actualwidth=document.getElementById("scrollTemp").offsetWidth;
 lefttime=setInterval("scrollmarquee()",30);
}
function scrollmarquee(){
 if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) {
  cross_marquee.style.left = parseInt(cross_marquee.style.left)-copyspeed+"px";
  cross_marquee.style.width = parseInt(cross_marquee.style.width)+copyspeed+"px";
 }
 else {
  cross_marquee.style.left=parseInt(marqueewidth)+8+"px";
  cross_marquee.style.width="79px";
 }
}

function extLink(theUrl) {
 document.location = "/external/?id=" + theUrl;
}

function useLink(obj) {
 findDOM(obj.id).click();
}

window.onload = populate;

//Search Box
function changeFormText(theItem,txt) {
	if (theItem.value == txt) {
		theItem.value = "";
	}
}
function changeFormText2(theItem,txt) {
	if (theItem.value == '') {
		theItem.value = txt;
	}
}
