/* If you use this code, subscribe to my blog or link to it or something, TimLinden.com */

var thelocation = document.location.toString();
if (thelocation.match('#')) { 
	var exchange = urldecode(thelocation.split('#')[1]);
	var customize = replacer(' ', '', exchange);
} else {
	exchange = '';
}

function urldecode( str ) {
    // http://kevin.vanzonneveld.net
    // +   original by: Philip Peterson
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    var histogram = {}, histogram_r = {}, code = 0, str_tmp = [];
    var ret = str.toString();
    
    // The histogram is identical to the one in urlencode.
    histogram['!']   = '%21';
    histogram['%20'] = '+';
    
    for (replace in histogram) {
        search = histogram[replace]; // Switch order when decoding
        ret = replacer(search, replace, ret) // Custom replace. No regexing   
    }
    
    // End with decodeURIComponent, which most resembles PHP's encoding functions
    ret = decodeURIComponent(ret);
 
    return ret;
}

function customize() {
	document.write('<'+'link rel="stylesheet" type="text/css" href="http://irmgardhartmann.com/Ad'+customize+'.css" />');
}

function replacer(search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    }