/* -*- c++ -*- */

function addr() {
    var domain = "ss"+"j"+"i.n"+"et";
    var username = "nipo";
    return username+"@"+domain;
}

function view_address(ident, protocol) {
	var address_to_replace=document.getElementById(ident).firstChild;

    address_to_replace.parentNode.setAttribute("href", protocol+":"+addr());
}

function set_address(ident) {
	var address_to_replace=document.getElementById(ident).firstChild;

	address_to_replace.nodeValue = addr();
}

window.onload = function() {
    view_address("mail", "mailto");
    view_address("jabber", "xmpp");
    view_address("msn", "mailto");
    view_address("voip", "sip");
    set_address("address");
}
