



<!--Browser Detection -->

bName = navigator.appName;
   bVer = parseInt(navigator.appVersion);
   br = "";

   if (bName == "Netscape" && bVer == 4) br = "n4";
      else if (bName == "Netscape" && bVer == 3) br = "n3";
      else if (bName == "Microsoft Internet Explorer" && bVer >=4 )
          br = "e4";
      else if (bName == "Microsoft Internet Explorer") br = "e3";
      else br = "n2";


<!-- Check for frames, break out if yes -->

function breakout_of_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}

<!-- Places focus on first form input (if called)-->
function placeFocus()
{
  if(document.forms.length > 0)
  {
    var field = document.forms[0];

    for(i = 0; i < field.length; i++)
    {
      if((field.elements[i].type == "text") ||
         (field.elements[i].type == "textarea") ||
         (field.elements[i].type == "password") ||
         (field.elements[i].type.toString().charAt(0) == "s"))
      {
        if(document.forms[0].elements[i].value != null &&
           document.forms[0].elements[i].value.length == 0)
        {
          document.forms[0].elements[i].focus();
          break;
        }
      }
    }
  }
}
 

<!-- pop-up window FAQ ad

function popup_faq_ad() {
  var popupURL = "http://www.prudensconsulting.com/faq_ad.html";
  newWindow = window.open(popupURL, "subWindow","width=392,height=300,scrollbars=no");
  newWindow.top.location.href = popupURL;
  newWindow.focus();
}  

<!-- Dynamic stuff for Signup -->

var dhtml;

if(typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4)
  dhtml = "IE";
else if(typeof(document.getElementsByTagName) != 'undefined')
  dhtml = "DOM";
else if(typeof(document.layers) != 'undefined')
  dhtml = "NS";

<!-- feature pop-up window "2"-->
function popup_features(feature) {
  var popupURL = "http://www.prudensconsulting.com/services/features.html#" + feature;
  newWindow = window.open("", "subWindow","width=450,height=300,scrollbars=yes");
  newWindow.top.location.href = popupURL;
  newWindow.focus();
    
}


<!-- drop-down menu -->

 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS6 = (bName == "Netscape" && bVer >= 5);
 var NS4 = (bName == "Netscape" && bVer >= 4 && bVer < 5);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 window.onerror = null;
 var menuActive = 0;
 var menuOn = 0;
 var onLayer;
 var timeOn = null // LAYER SWITCHING CODE
 if (NS4 || IE4 || NS6) {
	 if (navigator.appName == "Netscape" && !document.getElementById){
	 layerStyleRef="layer.";
	 layerRef="document.layers";
	 styleSwitch="";
	 layerVis="show";
	 layerHid="hide";
	 }
	 else if (!document.all && document.getElementById) {
	 layerStyleRef="layer.style.";
	 layerRef="document.getElementById";
	 styleSwitch=".style";
	 layerVis="visible";
	 layerHid="hidden";
	 }
	 else {
	 layerStyleRef="layer.style.";
	 layerRef="document.all";
	 styleSwitch=".style";
	 layerVis="visible";
	 layerHid="hidden";
	 }
 }
// SHOW MENU
function shLayer(layerName){
 img = getImage("imgTabs");
 x = getImagePageLeft(img);
 y = getImagePageTop(img);
 menuTop = y + 15 ; //Vertical offset for all menus

 //Define horizontal offsets for each layer
 lyr_homeL = x + 2;
 lyr_hostingL = x + 65;
 lyr_managedL = x + 161; 
 lyr_cpL = x + 189;
 lyr_domainsL = x + 281;
 lyr_supportL = x + 358; 
 lyr_blankL = x + 0;

  if (NS4 || IE4 || NS6) {
   if (timeOn != null) {
   clearTimeout(timeOn)
   hideLayer(onLayer)
   }
   if (NS4 || IE4) {
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerVis+'"');
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top="'+menuTop+'px"');
   eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left="'+eval(layerName+'L')+'px"');
   } 
   if (NS6) {
   eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="'+layerVis+'"');
   eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="'+menuTop+'px"');
   eval(layerRef+'("'+layerName+'")'+styleSwitch+'.left="'+eval(layerName+'L')+'px"');
   } 
   onLayer = layerName
 }
 //alert(layerRef+'("'+layerName+'")'+styleSwitch+'.left="'+eval(layerName+'L')+'px"');
}

// HIDE MENU
function hideLayer(layerName){
 if (menuActive == 0) {
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerHid+'"');
 }
 if (NS6) {
 eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="'+layerHid+'"');
 }
 }
}// TIMER FOR BUTTON MOUSE OUT
function btnTimer() {
 timeOn = setTimeout("btnOut()",1000)
}// BUTTON MOUSE OUT
function btnOut(layerName) {
 if (menuActive == 0) {
 hideLayer(onLayer)
 }
}// MENU MOUSE OVER 
function menuOver(itemName) {
 clearTimeout(timeOn)

 menuActive = 1
}// MENU MOUSE OUT 
function menuOut(itemName) {
 menuActive = 0 
 timeOn = setTimeout("hideLayer(onLayer)", 400)

 }// SET BACKGROUND COLOR 
function setBgColor(layer, color) {
  if (NS6){
    eval('document.getElementById("'+layer+'").style.backgroundColor="'+color+'"');
  }
  else if (NS4){
    eval('window.document.layers["'+layer+'"].document.bgColor="'+color+'"');
	eval('window.document.layers["'+layer+'"].saveColor="'+color+'"');
  }
  else if (IE4){

    eval('document.all.'+layer+'.style.backgroundColor="'+color+'"');
  }
}

function getImage(name) {
  if (NS4 || NS6) {
    return findImage(name, document);
  }
  if (IE4 || NS6)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {
  var i, img;
  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageX + img.x - 1;
    else
      return img.x - 1;
  }
  if (IE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;

  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (IE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

<!--end drop-down menu -->

function switchdisplay(element_off,element_on)
{
  document.getElementById(element_on).style.display ='';
  document.getElementById(element_off).style.display ='none';
}

function changedisplay(element,display)
{
  if (display=='on') 
  {  document.getElementById(element).style.display =''; }
  else
  { document.getElementById(element).style.display ='none';}
}