var hWindow = '';
var mSeperator = '@';
var mDomain    = new Array();
mDomain[0]     = 'ca';
mDomain[1]     = 'com';
mDomain[2]     = 'net';
mDomain[3]     = 'org';


function OpenMTag(name, domain,tld,subject){

  document.write('<a href="mail'+'to:');
  document.write(GetMBody(name, domain, tld));
  if (subject != ''){
  
     document.write('?subject='+subject);
    
  }
  document.write('">');

}

function CloseMTag(){
  document.write('</a>');
}

function GetMBody(name, domain,tld){

	var lMTag = name+mSeperator+domain+'.'+mDomain[tld];
	return(lMTag);

}


function openWindow(asURL,asWindowName,aiWidth,aiHeight){
// define a window variable
if (hWindow){
  hWindow.close();
  hWindow = '';
}
LeftPosition = (screen.width) ? (screen.width-aiWidth)/2 : 0;
TopPosition  = (screen.height) ? (screen.height-aiHeight)/2 : 0;
hWindow       = window.open(asURL,asWindowName,
		            config='width='+aiWidth+',height='+aiHeight+',top='+TopPosition+',left='+LeftPosition+',toolbar=yes,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=yes');
}
