function openWin(_url, _name, _features) {
  if (_features != null)
    win = window.open(_url, _name, _features);
  else
    win = window.open(_url, _name);
  win.focus();
  return win
}

function jumpTo(_url, _displaymode, _iframename){
	// _displaymode =  I (display in specified iframe)
	// _displaymode <> I (display in a new browser window)

	if (document.getElementById&&_displaymode=="I")
		document.getElementById(_iframename).src=_url
	else if (document.all&&_displaymode=="I")
		document.all.external.src=_url
	else{
		if (!window.win2||win2.closed)
			// win2 not found
			win2=window.open(_url)
		else{
			// win2 already exists
			win2.location=_url
			win2.focus()
		}
	}
}

function mLink(_e, _split, _display) {
	var e_array=_e.split(_split);
	var aTagStart = "<a href=";
	var mt = "mai" + "lto:";
	var a = '@';
	var d = '.';
	var aTagEnd = '</a>';
	var real_e = e_array[0] + a + e_array[1] + d + e_array[2];
	if (_display == "")
	  _display = real_e;
	document.write(aTagStart + mt + real_e + '>' + _display + aTagEnd)
}

function writeEmail(_e, _split) {
	var e_array=_e.split(_split);
	var a = '@';
	var d = '.';
	var real_e = e_array[0] + a + e_array[1] + d + e_array[2];
	document.write(real_e)
}

function EvalSound(_soundobj) {
  var thissound= eval("document."+_soundobj);
  thissound.Play();
}

function swapImg(_name, _src, _alt) {
	if (document.getElementById(_name)!=null) {
		document.getElementById(_name).src = _src;
		document.getElementById(_name).alt = _alt;
	}
}

function showhide(elem,mode) {
	if (mode == "hide") {
		elem.style.visibility = "hidden";
	}
	if (mode == "show") {
		elem.style.visibility = "visible";
	}
}

function changeBox(cbox) {
	box = eval(cbox);
	box.checked = !box.checked;
}
