
window.onload = setLinks

function setLinks() {

    var base_url = location.protocol + '//' + location.hostname;
    var now = new Date()
    var offset = now.getTimezoneOffset();

    for (i = 0; document.links.length > i; i++) {
	with (document.links[i]) {
	
	    if (href.indexOf(base_url) == 0) {
		if (href.indexOf('?') == -1) {
		    location = location + '?offset=' + offset;
		} else {
		    location = location + '&offset=' + offset;
		}
	    }
	}
    }

}

