<!-- Begin to hide script contents from old browsers.

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

// detect a special case of "web browser"
var BrowserIs_ie = ( /msie/i.test(navigator.userAgent) &&
       !/opera/i.test(navigator.userAgent) );

var BrowserIs_ie5 = ( BrowserIs_ie && /msie 5\.0/i.test(navigator.userAgent) );

/// detect Opera browser
var BrowserIs_opera = /opera/i.test(navigator.userAgent);

/// detect KHTML-based browsers
var BrowserIs_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);

// RemoveTrailingSpaces: Right trim the string and return the trimmed value
function RemoveTrailingSpaces(strVal) {
  var nPos = 0;

  if (IsEmpty(strVal))
    return strVal;

  for (nPos = strVal.length-1; nPos >= 0; nPos--) {
    if (whitespace.indexOf(strVal.charAt(nPos)) == -1)
      break;
  }

  return (nPos == strVal.length-1 ? strVal.substring(0) : strVal.substring(0, nPos+1));
}

// RemoveLeadingSpaces: Left trim the string and return the trimmed value
function RemoveLeadingSpaces(strVal) {
  var nPos = 0;

  if (IsEmpty(strVal))
    return strVal;

  for (nPos = 0; nPos < strVal.length; nPos++) {
    if (whitespace.indexOf(strVal.charAt(nPos)) == -1)
      break;
  }

  return strVal.substring(nPos);
}

// RemoveSpaces: Remove leading and trailing spaces
function RemoveSpaces(strVal) {
  return (IsEmpty(strVal) ? strVal:RemoveLeadingSpaces(RemoveTrailingSpaces(strVal)));
}

// IsEmpty: Check whether string strVal is empty
function IsEmpty(strVal) {
  return ((strVal == null) || (strVal.length == 0));
}

// whitespace characters: ' ', '\t', '\r', '\n'
var whitespace = " \t\n\r";

// IsWhitespace: Check if string strVal has only the whitespace characters
function IsWhitespace(strVal) {
	var nPos = 0;

	if (IsEmpty(strVal))
		return false;

	for (nPos = 0; nPos < strVal.length; nPos++)
		if (whitespace.indexOf(strVal.charAt(nPos)) == -1)
			return false;

	return true;
}

// Replace: replaces one occurrence of strVal with strWith in strSrc
function Replace(strSrc, strVal, strWith) {
	var nPos = 0, strLeft="", strRight="";

	// check if empty (or) no string is found to replace
	if (IsEmpty(strSrc) || (strSrc.indexOf(strVal) < 0))
		return strSrc;

	nPos = strSrc.indexOf(strVal);
	strLeft = strSrc.substring(0, nPos);
	nPos += strVal.length;
	strRight = strSrc.substring(nPos);

	return (strLeft + strWith + strRight);
}

// ReplaceAll : replace all occurrences of strVal with strWith in strSrc
function ReplaceAll(strSrc, strVal, strWith) {
	var strBuffer=strSrc;

	while (strBuffer.indexOf(strVal) >= 0)
		strBuffer = Replace(strBuffer, strVal, strWith);

	return (strBuffer);
}

// Occurs: return no of occurrences of strVal within strSrc
function Occurs(strVal, strSrc) {
	var nCnt = 0, strBuffer=strSrc;

	while (strBuffer.indexOf(strVal) >= 0) {
		strBuffer = Replace(strBuffer, strVal, "");
		nCnt++;
	}

	return (nCnt);
}

///////////////////////////////////////////////////////////////////////////////
//
// NOTE: 
//  -- alway RemoveSpaces field value before calling any of these functions
//  -- if field is empty, the function call will return true
//
///////////////////////////////////////////////////////////////////////////////

// IsDigit: check if val has digits (0-9)
function IsDigit(val) {
	var strBuffer = new String(val);
	var nPos = 0;

	if (IsEmpty(strBuffer))
		return false;

	for (nPos = 0; nPos < strBuffer.length; nPos++)
		if (strBuffer.charAt(nPos) < '0' || strBuffer.charAt(nPos) > '9')
			return false;

	return true;
}

// IsAlpha: check if val has alphabets only (a-z, A-Z)
function IsAlpha(val) {
	var strBuffer = new String(val);
	var nPos = 0;

	if (IsEmpty(strBuffer))
		return false;

	for (nPos = 0; nPos < strBuffer.length; nPos++)
		if (!((strBuffer.charAt(nPos) >= 'a' && strBuffer.charAt(nPos) <= 'z') ||
			(strBuffer.charAt(nPos) >= 'A' && strBuffer.charAt(nPos) <= 'Z')))
			return false;

	return true;
}

// IsInteger: check if nVal is integer type
function IsInteger(nVal) {
	var strBuffer = new String(nVal);
	var nPos = 0, nStart = 0;

	if (IsEmpty(strBuffer))
		return true;
	if (IsWhitespace(strBuffer))
		return false;

	// check if -ve or +ve sign occurs in the beginning
	if ((strBuffer.charAt(0) == '-') || (strBuffer.charAt(0) == '+'))
		nStart = 1;
	else
		nStart = 0;

	for (nPos = nStart; nPos < strBuffer.length; nPos++)
		if (strBuffer.charAt(nPos) < '0' || strBuffer.charAt(nPos) > '9')
			return false;

	return true;	
}

// IsFloat: check if fVal is floating-point type
//	LIMITATION: no scientific notation (for eg: xxxx.xxE+xx)
function IsFloat(fVal) {
	var strBuffer = new String(fVal);
	var nPos = 0, nStart = 0;

	if (IsEmpty(strBuffer))
		return true;
	if (IsWhitespace(strBuffer))
		return false;

	// check if -ve or +ve sign occurs in the beginning
	if ((strBuffer.charAt(0) == '-') || (strBuffer.charAt(0) == '+'))
		nStart = 1;
	else
		nStart = 0;

	for (nPos = nStart; nPos < strBuffer.length; nPos++)
		if ((strBuffer.charAt(nPos) < '0' || strBuffer.charAt(nPos) > '9') && 
				(strBuffer.charAt(nPos) != '.'))
			return false;

	return true;
}


///////////////////////////////////////////////////////////////////////////////
//
// Commify
//
// The following function is used to add commas to a number
//
// Input:  Number to commify
// 
// Return: Commified number
//
///////////////////////////////////////////////////////////////////////////////

function Commify(tNum) {

//var Num = document.form.input.value;

var Num = tNum.toString();
var newNum = "";
var newNum2 = "";
var count = 0;

//check for decimal number
	if (Num.indexOf('.') != -1){ //number ends with a decimal point
		if (Num.indexOf('.') == Num.length-1){
			Num += "00";
		}
		if (Num.indexOf('.') == Num.length-2){ //number ends with a single digit
			Num += "0";
		}

		var a = Num.split("."); 
		Num = a[0]; //the part we will commify
		var end = a[1] //the decimal place we will ignore and add back later
	}
	else {var end = "00";} 

	//this loop actually adds the commas 
	for (var k = Num.length-1; k >= 0; k--){
		var oneChar = Num.charAt(k);
		if (count == 3){
			newNum += ",";
			newNum += oneChar;
			count = 1;
			continue;
		}
		else {
			newNum += oneChar;
			count ++;
		}
	} //but now the string is reversed!

//re-reverse the string
	for (var k = newNum.length-1; k >= 0; k--){
		var oneChar = newNum.charAt(k);
		newNum2 += oneChar;
	}

// add dollar sign and decimal ending from above
//	newNum2 = "$" + newNum2 + "." + end;
	newNum2 = newNum2 + "." + end;
//	document.form.newValue.value = newNum2;
return newNum2;
}

///////////////////////////////////////////////////////////////////////////////
//
// RoundNumber
//
// The following function is used to round real numbers to a
// a given precision.
//
// Input:  Number to round
//         Precision
//
// Return: Rounded number
//
///////////////////////////////////////////////////////////////////////////////

function RoundNumber(num, precision) {

  var roundedNum, sign, oldNum, decimalValue;

  roundedNum = parseFloat(num);
  if ( isNaN(roundedNum) )
    return num;

  // Change neg numbers to positive for rounding and then change them back
  sign = roundedNum < 0.0? -1.0 : 1.0;
  roundedNum *= sign;

  // Move decimal point to the right according to the precision
  roundedNum *= Math.pow( 10, precision );
  oldNum = roundedNum;
  roundedNum = Math.floor( roundedNum );   
  decimalValue = oldNum - roundedNum;

  if ( decimalValue >= 0.499999999 )
    roundedNum += 1.0;

  // Move decimal point back to the correct position
  roundedNum /= Math.pow( 10, precision );

  // Put the correct sign back on the number
  if ( roundedNum != 0.0 )
    roundedNum *= sign;

  return roundedNum;

}


///////////////////////////////////////////////////////////////////////////////
//
// FormatNumber
//
// The following function is used to format a number to a specified precision.
//
// Input:  Number
//         Precision
//
// Return: Rounded number as a string
//
///////////////////////////////////////////////////////////////////////////////

function FormatNumber(num, precision) {

  var rNum = RoundNumber( num, precision );
  var strNum = new String(rNum);
  var i = 0, decPos = 0;
  var decimalFound = false;
  var numPlaces = 0;

  for (i = 0; i < strNum.length; i++) {
    if (strNum.charAt(i) == '.') {
      decPos = i;
      decimalFound = true;
    }
  }

  if ( decimalFound ) {
    numPlaces = strNum.length - decPos - 1;
  }
  else {
    strNum += '.';
  }

  for (i = numPlaces; i < precision; i++) {
    strNum += '0';
  }

  return strNum;

}

///////////////////////////////////////////////////////////////////////////////
//
// ConvertToFloat
//
// The following function is used to convert a string to a float
//
// Input:  Number
//
// Return: Converted float
//
///////////////////////////////////////////////////////////////////////////////

function ConvertToFloat( str ) {
	var strBuffer = new String(str);
	var nPos = 0;
  var newStr = "";
  var digitFound = false;
  var negNum = false;

  RemoveSpaces( strBuffer );

  if ( IsEmpty( strBuffer ) ) {
    return( 0.0 );
  }

  for (nPos = 0; nPos < strBuffer.length; nPos++) {
    var currChar = strBuffer.charAt(nPos);
    if (currChar != '(' && currChar != '$' &&
        currChar != ','&& currChar != ')') {
      if ( currChar >= '0' && currChar <= '9' ) {
        digitFound = true;
      }
      newStr += currChar;
    } else if ( currChar == '(' ) {
      negNum = true;
    }
  }

  if ( digitFound ) {
    return( negNum? parseFloat( newStr ) * -1.0 : parseFloat( newStr ) );
  } else {
    return( 0.0 );
  }

}

///////////////////////////////////////////////////////////////////////////////
//
// DisableField
//
// The following function disables the given element
//
///////////////////////////////////////////////////////////////////////////////

function DisableField ( field ) {
	field.disabled = !(field.disabled);
}


///////////////////////////////////////////////////////////////////////////////
//
// CancelEvent
//
// The following function cancels a window event
//
///////////////////////////////////////////////////////////////////////////////

function CancelEvent( bubble ) {
  window.event.returnValue = false;
  if ( bubble ) window.event.cancelBubble = true;
}

///////////////////////////////////////////////////////////////////////////////
//
// GetContainerWith
//
// Starting with the given node, find the nearest containing element
// with the specified tag name and style class.
//
///////////////////////////////////////////////////////////////////////////////

function GetContainerWith(node, tagName, className) {

  while (node != null) {
    if (node.tagName != null && node.tagName == tagName &&
        HasClassName(node, className))
      return node;
    node = node.parentNode;
  }

  return node;
}

///////////////////////////////////////////////////////////////////////////////
//
// HasClassName
//
// Return true if the given element currently has the given class name.
//
///////////////////////////////////////////////////////////////////////////////

function HasClassName(el, name) {

  var i, list;

  list = el.className.split(" ");
  for (i = 0; i < list.length; i++)
    if (list[i] == name)
      return true;

  return false;
}

///////////////////////////////////////////////////////////////////////////////
//
// RemoveClassName
//
// Remove the given class name from the element's className property.
//
///////////////////////////////////////////////////////////////////////////////

function RemoveClassName(el, name) {
  var i, curList, newList;

  if (el.className == null)
    return;

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

///////////////////////////////////////////////////////////////////////////////
//
// GetPageOffsetLeft
//
// Return the x coordinate of an element relative to the page.
//
///////////////////////////////////////////////////////////////////////////////

function GetPageOffsetLeft(el) {
  var x;

  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += GetPageOffsetLeft(el.offsetParent);

  return x;
}

///////////////////////////////////////////////////////////////////////////////
//
// GetPageOffsetTop
//
// Return the x coordinate of an element relative to the page.
//
///////////////////////////////////////////////////////////////////////////////

function GetPageOffsetTop(el) {
  var y;

  y = el.offsetTop;
  if (el.offsetParent != null)
    y += GetPageOffsetTop(el.offsetParent);

  return y;
}

///////////////////////////////////////////////////////////////////////////////
//
// LogDebugMsg
//
// Write the given message to the debug "DIV" element
//
// Note:  "debugMsg" needs to be defined in the document
//
///////////////////////////////////////////////////////////////////////////////

function LogDebugMsg(str) {
  var debugEl = document.all.debugMsg;
  var debugMsg = debugEl.innerHTML;

  debugMsg += str + "<BR>";
  debugEl.innerHTML = debugMsg;
}

///////////////////////////////////////////////////////////////////////////////
//
// HandlePrintEvent
//
// Handle the event when in print mode.  Don't allow the user to
// click on any thing except the print and close button.
//
///////////////////////////////////////////////////////////////////////////////

function HandlePrintEvent() {
  var printButton = document.all.printButton;
  var closeButton = document.all.closeButton;

  if ( printButton.contains(window.event.srcElement) ||
       closeButton.contains(window.event.srcElement) ) {
    return true;
  } else {
    CancelEvent( true );
    return false;
  }

  return true;
}

///////////////////////////////////////////////////////////////////////////////
//
// SetPrintEvents
//
// Reset all element events when in print mode.
//
///////////////////////////////////////////////////////////////////////////////

function SetPrintEvents() {
  //document.onmousedown = HandlePrintEvent;
  //document.onclick = HandlePrintEvent;

  // Reset all <DIV> events
  var allDiv = document.all.tags("DIV");
  for ( var div = 0; div < allDiv.length; div++ ) {
    var id = new String(allDiv[div].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      allDiv[div].onmousedown = HandlePrintEvent;
      allDiv[div].onclick = HandlePrintEvent;
      allDiv[div].style.cursor = 'default';
    }
  }

  // Reset all <TD> events
  var allTd = document.all.tags("TD");
  for ( var td = 0; td < allTd.length; td++ ) {
    var id = new String(allTd[td].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      allTd[td].onmousedown = HandlePrintEvent;
      allTd[td].onclick = HandlePrintEvent;
      allTd[td].style.cursor = 'default';
    }
  }

  // Reset all <SPAN> events
  var allSpan = document.all.tags("SPAN");
  for ( var span = 0; span < allSpan.length; span++ ) {
    var id = new String(allSpan[span].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      allSpan[span].onmousedown = HandlePrintEvent;
      allSpan[span].onclick = HandlePrintEvent;
      allSpan[span].style.cursor = 'default';
    }
  }

  // Reset all anchor "<A>" events
  var allA = document.all.tags("A");
  for ( var a = 0; a < allA.length; a++ ) {
    var id = new String(allA[a].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      allA[a].onmousedown = HandlePrintEvent;
      allA[a].onclick = HandlePrintEvent;

      var printButton = document.all.printButton;
      var closeButton = document.all.closeButton;
      if ( !printButton.contains(allA[a]) && 
           !closeButton.contains(allA[a]) ) {
        allA[a].style.cursor = 'default';
      }
    }
  }

  // Reset all img "<IMG>" events
  for ( var i = 0; i < document.images.length; i++ ) {
    var id = new String(document.images[i].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      document.images[i].onmousedown = HandlePrintEvent;
      document.images[i].onclick = HandlePrintEvent;
      document.images[i].style.cursor = 'default';
    }
  }

  // Reset events for all form elements
  for ( var d = 0; d < document.forms.length; d++ ) {
    var id = new String(document.forms[d].id);
    var prefix = id.substring(0,1);
    if ( prefix != '_' ) {
      document.forms[d].onmousedown = HandlePrintEvent;
      document.forms[d].onclick = HandlePrintEvent;
      document.forms[d].style.cursor = 'default';
    }
    for ( var e = 0; e < document.forms[d].elements.length; e++ ) {
      var id = new String(document.forms[d].elements[e].id);
      var prefix = id.substring(0,1);
      if ( prefix != '_' ) {
        document.forms[d].elements[e].onmousedown = HandlePrintEvent;
        document.forms[d].elements[e].onclick = HandlePrintEvent;
        document.forms[d].elements[e].style.cursor = 'default';
      }
    }
  }
}

///////////////////////////////////////////////////////////////////////////////
//
// CheckElHidden
//
// Check to see if the given element is contained within a hidden object.  It
// traverses up the object tree until no parent is found, or until it finds
// a parent that is hidden.
//
// Input:  Element to check
// 
// Return: true if 'hidden' found in object tree
//         false otherwise
//
///////////////////////////////////////////////////////////////////////////////

function CheckElHidden( el ) {
  if ( el ) {
    if ( el.currentStyle.visibility == 'hidden' )
      return true;

    var parentEl =  el.parentElement;
    while ( parentEl ) {
      if ( parentEl.currentStyle.visibility == 'hidden' )
        return true;
      parentEl = parentEl.parentElement;
    }
  }

  return false;
}

///////////////////////////////////////////////////////////////////////////////
//
// GetEventSrc
//
// Get the source of the current window event
//
// Input:  Event
// 
// Return: event element
//
///////////////////////////////////////////////////////////////////////////////

function GetEventSrc(e) {
  if (!e) e = window.event;

  if (e.target)
    return e.target;
  else if (e.srcElement)
    return e.srcElement;
}

///////////////////////////////////////////////////////////////////////////////
//
// GetObjPosition
//
// Get the position of the given object
//
// Input:  Object
// 
// Return: position structure
//
///////////////////////////////////////////////////////////////////////////////

function GetObjPosition( el ) {
  var SL = 0, ST = 0;
  var is_div = /^div$/i.test(el.tagName);
  if (is_div && el.scrollLeft)
    SL = el.scrollLeft;
  if (is_div && el.scrollTop)
    ST = el.scrollTop;
  var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
  if (el.offsetParent) {
    var tmp = GetObjPosition(el.offsetParent);
    r.x += tmp.x;
    r.y += tmp.y;
  }
  return r;
};

///////////////////////////////////////////////////////////////////////////////
//
// GetObjVisibility
//
// Get the visibility of the given object
//
// Input:  Object
// 
// Return: visibility
//
///////////////////////////////////////////////////////////////////////////////

function GetObjVisibility(obj) {
  var value = obj.style.visibility;
  if (!value) {
    if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") {
      if (!BrowserIs_khtml)
        value = document.defaultView.
          getComputedStyle(obj, "").getPropertyValue("visibility");
      else
        value = '';
    } else if (obj.currentStyle) { // IE
      value = obj.currentStyle.visibility;
    } else
      value = '';
  }
  return value;
}

///////////////////////////////////////////////////////////////////////////////
//
// HideShowCovered
//
// Set the visibility to 'hidden' for all tags that show through objects that
// draw over them
//
// Input:  Object that will be visible
// 
///////////////////////////////////////////////////////////////////////////////

function HideShowCovered( obj ) {
  var tags = new Array("applet", "iframe", "select");

  var p = GetObjPosition(obj);
  var EX1 = p.x;
  var EX2 = obj.offsetWidth + EX1;
  var EY1 = p.y;
  var EY2 = obj.offsetHeight + EY1;

  for (var k = tags.length; k > 0; ) {
    var ar = document.getElementsByTagName(tags[--k]);
    var cc = null;

    for (var i = ar.length; i > 0;) {
      cc = ar[--i];

      p = GetObjPosition(cc);
      var CX1 = p.x;
      var CX2 = cc.offsetWidth + CX1;
      var CY1 = p.y;
      var CY2 = cc.offsetHeight + CY1;

      if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
        if (!cc.__msh_save_visibility) {
          cc.__msh_save_visibility = GetObjVisibility(cc);
        }
        cc.style.visibility = cc.__msh_save_visibility;
      } else {
        if (!cc.__msh_save_visibility) {
          cc.__msh_save_visibility = GetObjVisibility(cc);
        }
        cc.style.visibility = "hidden";
      }
    }
  }
}

///////////////////////////////////////////////////////////////////////////////
//
// PreloadImage
//
// Preload the image for later use
//
// Input:  Image to preload
//
///////////////////////////////////////////////////////////////////////////////

function PreloadImage( image ) {
  if ( document.images ) {
    img = new Image();
    img.src = image;
  }
}

///////////////////////////////////////////////////////////////////////////////
//
// WindowOpen
//
// Open a javascript window centered on the screen
//
///////////////////////////////////////////////////////////////////////////////

function WindowOpen(url, name, w, h, scroll) {
  var s = scroll? "yes" : "no";
    
  if (w > screen.width) {
    w = screen.width;
    wleft = 0;
  } else {
    wleft = (screen.width - w) / 2;
  }
  
  if (h > (screen.height - 60)) {
    h = screen.height - 60;
    wtop = 0;
  } else {
    wtop = (screen.height - h) / 2;
  }
  
  
  // IE5 and other old browsers might allow a window that is
  // partially offscreen or wider than the screen. Fix that.
  // (Newer browsers fix this for us, but let's be thorough.)
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=yes, menubar=no, titlebar=no, directories=no ' +
    'status=yes, toolbar=no, scrollbars=' + scroll + ', resizable=no');
    
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
  
  return win;
}

// End the hiding here. -->