
function ShowEmail(user, domain, anchor) {
	var OutText = '';
	OutText += '<a href="mailto:' + user + '@' + domain + '">';
	if (anchor != '') OutText += anchor;
	else OutText += user + '@' + domain;
	OutText  += '</a>';
	document.write(OutText);
}

function ShowEmailBySubject(user, domain, anchor, subject) {
	var OutText = '';
	OutText += '<a href="mailto:' + user + '@' + domain + '?subject=' + subject + '">'
	if (anchor != '') OutText += anchor;
	OutText  += '</a>';
	document.write(OutText);
}

function externalLinks() { 
	if (!document.getElementsByTagName) return; 
 	var anchors = document.getElementsByTagName("a"); 
 	for (var i=0; i<anchors.length; i++) { 
   		var anchor = anchors[i]; 
   		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
     			anchor.target = "_blank"; 
	 } 
} 
window.onload = externalLinks;



function VirtualnetChat() 
{
    if(window.location.hostname != 'apollo')
        //Online
        //document.write('<iframe src="http://' + window.location.hostname + '/chat.aspx" id="chatframe" height="159" width="170" frameborder="0" scrolling="no"></iframe>');
        //testing
        //document.write('<iframe src="chat_OFF.aspx" id="chatframe" height="159" width="170" frameborder="0" scrolling="no"></iframe>');
        document.write('<iframe src="chat.aspx" id="chatframe" height="159" width="170" frameborder="0" scrolling="no"></iframe>');
    else
        //for Testing
        document.write('<iframe src="http://' + window.location.hostname + '/NettitudePenTesting/chat.aspx" id="chatframe" height="159" width="170" frameborder="0" scrolling="no"></iframe>');
}





