function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function enc(user,domain,ext,sometext,fcolor) {
	if (fcolor == null){
    		fcolor = '';
  	}
	fontcolor ='<span style="color:' + fcolor + '">';

	var first = 'ma';
	var second = 'il';
	var third = 'to:';
	var text = user;
	text += '&#64;';
	text += domain;
	text += '.';
	text += ext;
        var end = fontcolor + text + '</span></a>';
	document.write('<a style="text-decoration:none" href="');
	document.write(first+second+third);
	document.write(user);
	document.write('&#64;');
	document.write(domain);
	document.write('.');
	document.write(ext);
	document.write('?Subject=');
	document.write(sometext);
	document.write('">');
	document.write(end);
}

var WindowObjectReference = null; // global variable

function openmbg()
{
  if(WindowObjectReference == null || WindowObjectReference.closed)
  /* if the pointer to the window object in memory does not exist
     or if such pointer exists but the window was closed */

  {
    WindowObjectReference = window.open('MBG.htm','mbgwindow','width=600,height=380,left=30,top=0,resizable=yes');
    /* then create it. The new window will be created and
       will be brought on top of any other window. */
  }
  else
  {
    WindowObjectReference.focus();
    /* else the window reference must exist and the window
       is not closed; therefore, we can bring it back on top of any other
       window with the focus() method. There would be no need to re-create
       the window or to reload the referenced resource. */
  };
}