// image rollovers

if (document.images) {
	hometab = new Image
	costsavingstab = new Image
	fullservicetab = new Image
	featurestab = new Image
	contacttab = new Image
	
	hometab.src = "images/nav/navhome_cool.gif"
	costsavingstab.src = "images/nav/navcostsavings_cool.gif"
	fullservicetab.src = "images/nav/navfullservice_cool.gif"
	featurestab.src = "images/nav/navfeatures_cool.gif"
	contacttab.src = "images/nav/navcontact_cool.gif"
	
	hometabhot = new Image
	costsavingstabhot = new Image
	fullservicetabhot = new Image
	featurestabhot = new Image
	contacttabhot = new Image
	
	hometabhot.src = "images/nav/navhome_hot.gif"
	costsavingstabhot.src = "images/nav/navcostsavings_hot.gif"
	fullservicetabhot.src = "images/nav/navfullservice_hot.gif"
	featurestabhot.src = "images/nav/navfeatures_hot.gif"
	contacttabhot.src = "images/nav/navcontact_hot.gif"
	
	jump_guarantee = new Image
	jump_costsavings = new Image
	jump_fullservice = new Image
	jump_features = new Image
	
	jump_guarantee.src = "images/home/jump_guarantee_cool.gif"
	jump_costsavings.src = "images/home/jump_costsavings_cool.gif"
	jump_fullservice.src = "images/home/jump_fullservice_cool.gif"
	jump_features.src = "images/home/jump_features_cool.gif"
	
	jump_guaranteehot = new Image
	jump_costsavingshot = new Image
	jump_fullservicehot = new Image
	jump_featureshot = new Image
	
	jump_guaranteehot.src = "images/home/jump_guarantee_hot.gif"
	jump_costsavingshot.src = "images/home/jump_costsavings_hot.gif"
	jump_fullservicehot.src = "images/home/jump_fullservice_hot.gif"
	jump_featureshot.src = "images/home/jump_features_hot.gif"
}

function chgImg(imgField, newImg) {
	if (document.images) {
	document[imgField].src= eval(newImg + ".src")
	}
}

// popup window resizer

var screenW = 640, screenH = 480;
if (parseInt(navigator.appVersion)>3) {
 screenW = screen.width;
 screenH = screen.height;
}
else if (navigator.appName == "Netscape" 
    && parseInt(navigator.appVersion)==3
    && navigator.javaEnabled()
   ) 
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screenH = jScreenSize.height;
}

function GetPopupHeight(popupH)
{
	var popupBuffer = 60; // Extra space allowed for task bar, etc
	if (popupH > (screenH - popupBuffer))
	{
		popupH = screenH - popupBuffer; // Make sure the popup window height is no larger than the screen height
	}
	return popupH;
}

function GetPopupWidth(popupW)
{
	var popupBuffer = 5; // Extra space allowed for task bar, etc
	if (popupW > (screenW - popupBuffer))
	{
		popupW = screenW - popupBuffer; // Make sure the popup window height is no larger than the screen height
	}
	return popupW;
}

// open any window no-chrome

function openAnyWindow(url, name) {
  var l = openAnyWindow.arguments.length;
  var w = "";
  var h = "";
  var features = "";

  for (i=2; i<l; i++) {
    var param = openAnyWindow.arguments[i];
    if ( (parseInt(param) == 0) ||
      (isNaN(parseInt(param))) ) {
      features += param + ',';
    } else {
      (w == "") ? w = "width=" + param + "," :
        h = "height=" + param;
    }
  }

  features += w + h;
  var code = "popupWin = window.open(url, name";
  if (l > 2) code += ", '" + features;
  code += "')";
  eval(code);
}
