﻿
// Her legges javascript-funksjoner

function sendmail(user, domain, suffix) {
	return ('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
}

function fbs_click() {
    u = location.href;
    t = document.title;
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}



$(document).ready(function() {
    $('#oyvindmail').append(sendmail('oyvind', 'nyadventure', 'com'));
    $('#chrismail').append(sendmail('chris', 'nyadventure', 'com'));
});
/*
var loadImage; //public ref til funksjon
$(document).ready(function() {
    loadImage = function(obj, url) {
        alert("Loadimage obj:" + obj + " url:" + url);
        
    };

});
*/
function setbilde(bildeid, bildetekstid, bildetekst, url) {
    var stortbilde = document.getElementById(bildeid);    
    stortbilde.src = url;
    var bildetekstdiv = document.getElementById(bildetekstid);
    bildetekstdiv.innerHTML = bildetekst;
    
}
