var HelpX, HelpY, HelpText;
var ToShow, ToClear;

function winPop(theURL,winName,features) {
  window.open(theURL,winName,features);
  return false;
}
function DoFlyOver() {
  if( ToClear != -1 ) window.clearTimeout( ToClear );
  tooltip_Inner.innerText = HelpText;
  FOArea.style.posLeft = HelpX + 0;
  FOArea.style.posTop = HelpY + 0;
  FOArea.style.display = "";
  ToClear = setTimeout( "ClearFlyOver()", 8000, "JAVASCRIPT" );
}
function ClearFlyOver() {
  FOArea.style.display = "none";
}
function FlyOver( Text ) {
  HelpText = Text;
  HelpX = window.event.clientX;
  HelpY = window.event.clientY;
  ToShow = setTimeout( "DoFlyOver()", 500, "JAVASCRIPT" );
}
function show(which_element) {
        $(which_element).style.display='';
}
function hide(which_element) {
        $(which_element).style.display='none';
}
function highlight(which_element) {
        $(which_element).style.color='red';

}
function unhighlight(which_element) {
        $(which_element).style.color='';

}
function $(item) {
        return document.getElementById(item);
}
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
	return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
	return stringToTrim.replace(/\s+$/,"");
}
function ajaxLoad(mode) {
	if(mode=='show') {
		show('ajaxLoading');
		$('ajaxWrapper').style.opacity='0.4';
		$('ajaxWrapper').style.filter='alpha(opacity=40)';
		$('ajaxWrapper').style.background='#CCC8C6';
		$('ajaxWrapper').style.zIndex='3';
	}
	if(mode=='hide') {
		hide('ajaxLoading');
		$('ajaxWrapper').style.opacity='1.0';
		$('ajaxWrapper').style.filter='alpha(opacity=100)';
		$('ajaxWrapper').style.background='#CCC8C6;';
		$('ajaxWrapper').style.zIndex='0';		
	}
}
