
function openVideo() {
    document.location = "/AboutPacer/BrochuresPresentations/OverviewVideo.aspx";
}

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);

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers(obj) { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];  
      if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
  /* 
   obj2=document.getElementById("Layer1");
   obj2.style.left = returnLeft()+55;
   obj2.style.top  = returnTop()+30;
*/}

function displaySubMenu(objParentID, objID, boolShow) { //v6.0
var obj = document.getElementById(objID);
obj.style.left = returnLeft(objParentID) + 55;
obj.style.top = returnTop(objParentID);
//obj.style.visibility = (boolShow ? "visible" : "hidden");
obj.style.display = (boolShow ? "inline" : "none");
}


function getAbsoluteElementPosition(element) {
  if (typeof element == "string")
    element = document.getElementById(element)
    
  if (!element) return { top:0,left:0 };
  
  var y = 0;
  var x = 0;
  while (element.offsetParent) {
    x += element.offsetLeft;
    y += element.offsetTop;
    element = element.offsetParent;
  }
  return {top:y,left:x};
}


function returnLeft(objID) {
  var element = document.getElementById(objID);
  var pos = getAbsoluteElementPosition(element)
  
  return pos.left;
}

function returnTop(objID) {
  var element = document.getElementById(objID);
  var pos = getAbsoluteElementPosition(element)
  
  return pos.top;
}


//START THE JAVASCRIPT FOR THE SEARCH BUTTON

function sendFormCU(){

      f=document.forms[0];

      f.action="/ContactUs/ContactUs.aspx";

    f.target="_top";

    f.submit();

}

 

function checkform () {
    f=document.forms[0];

    if (f.q.value == "") {
        alert( "Please enter your search word." );
        f.q.focus();
        return false;
    }

//alert( "cx: " +  f.cx.value + ", cof: " + f.cof.value + ", ie: " + f.ie.value + ", q: " + f.q.value + ", sa: " + f.sa.value );
//    var newq = replaceChars(f.q.value);

    f.action = "/SearchResults.aspx?cx=" + f.cx.value +
    "&cof=" + f.cof.value +
    "&ie=" + f.ie.value +
    "&q=" + f.q.value +
    "&sa=" + f.sa.value;

    f.submit();
      
    return true;
}

 

function mouseOverImage() {

   document.getElementById("dnn_PSearch_PS_sa").src = skinpath+"/images/btn_search_over.gif";

}

 

function mouseOverImageCU() {

   document.getElementById("img_btnCU").src = skinpath+"/images/btn_contactus_over.gif";

}

 

function mouseOutImage(){

   document.getElementById("dnn_PSearch_PS_sa").src = skinpath+"/images/btn_search.gif";

}

 

function mouseOutImageCU(){

   document.getElementById("img_btnCU").src = skinpath+"/images/btn_contactus.gif";

}

 

function iraConEnter(f){
    f=document.forms[0];

    if(window.event.keyCode==13){
        return checkform();
    }

}

 

 

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

//END THE JAVASCRIPT FOR THE SEARCH BUTTON

