﻿var newWindow=null;
function comOpenWindow(link) 
{ newWindow = window.open(link,"comWindow"); 
  newWindow.focus();
  return false;
}

var newSearchWindow=null;
function comOpenSearchWindow(comForm)
{ if (!window.focus) return true;
  newSearchWindow = window.open("", "comSearchWindow");
  comForm.target = "comSearchWindow";
  newSearchWindow.focus();
  return true;
}

function comToggleTabs(showTab, hideTab1, hideTab2, hideTab3, hideTab4, hideTab5) 
{ var show = document.getElementById(showTab);
  show.style.display = "block";
  var hide1 = document.getElementById(hideTab1);
  hide1.style.display = "none";
  if (hideTab2 != null)
  { var hide2 = document.getElementById(hideTab2);
    hide2.style.display = "none";
  }
  if (hideTab3 != null)
  { var hide3 = document.getElementById(hideTab3);
    hide3.style.display = "none";
  }
  if (hideTab4 != null)
  { var hide4 = document.getElementById(hideTab4);
    hide4.style.display = "none";
  }
  if (hideTab5 != null)
  { var hide5 = document.getElementById(hideTab5);
    hide5.style.display = "none";
  }
}

function comToggleTabs2(showTab, totalTabs) 
{	for (var i=1; i <= totalTabs; i++)
	{	var tabId = document.getElementById("comTab" + i + "Img");
		var divId = document.getElementById("comTab" + i + "Div");
		if (i == showTab)
		{	tabId.src = "../images/com_tab_on.png";
			divId.style.display = "block";
		}
		else
		{	tabId.src = "../images/com_tab_off.png";
			divId.style.display = "none";
		}
	}
}

var ua = navigator.userAgent.toLowerCase(); 
var comBrowserName = "unknown";
if ( ua.indexOf( "msie" ) != -1 )
{ comBrowserName = "msie";
}
if ( ua.indexOf( "safari" ) != -1 )
{ comBrowserName = "safari";
}
if ( ua.indexOf( "firefox" ) != -1 )
{ comBrowserName = "firefox";
}

