var tlcur_cat = tlcur_getParameterByName('cat');
var tlcur_uname = tlcur_getParameterByName('theme');
var tlcur_path = tlcur_getParameterByName('path');
//alert(tlcur_uname);
if(tlcur_uname.length>0){
var tlcur_head = document.getElementsByTagName('head')[0];
var tlcur_styleElement = document.createElement('style');
var tlcur_divElement = document.createElement('div');
tlcur_styleElement.setAttribute('type', 'text/css');
var tlcur_code = '*, html, body, a, a:hover { cursor:url(\'http://www.themesltd.com/tumblr/cursors/'+tlcur_cat+'/mouse-cursors.php?theme='+tlcur_uname+'&path='+tlcur_path+'\'), auto }';
var tlcur_div_code = '';
tlcur_divElement.innerHTML = tlcur_div_code;
if (tlcur_styleElement.styleSheet) { // IE
tlcur_styleElement.styleSheet.cssText = tlcur_code;
} else { // the world
tlcur_styleElement.appendChild(document.createTextNode(tlcur_code));
}
tlcur_head.appendChild(tlcur_styleElement);
//tlcur_head.appendChild(tlcur_divElement);
}
function tlcur_getParameterByName(tlcur_name)
{
var tlcur_script_location = tlcur_getScriptQuery('cursors.js');
tlcur_name = tlcur_name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var tlcur_regexS = "[\\?&]" + tlcur_name + "=([^]*)";
var tlcur_regex = new RegExp(tlcur_regexS);
var tlcur_results = tlcur_regex.exec(tlcur_script_location);
if(tlcur_results == null)
return "";
else
return decodeURIComponent(tlcur_results[1].replace(/\+/g, " "));
}
function tlcur_getScriptQuery(tlcur_identifier) {
var tlcur_scripts = document.getElementsByTagName('script'),
tlcur_i, tlcur_curScript;
for (tlcur_i = 0; tlcur_i < tlcur_scripts.length; ++tlcur_i) {
tlcur_curScript = tlcur_scripts[tlcur_i];
if (tlcur_curScript.src.match(tlcur_identifier)) {
return (tlcur_curScript.src.match(/\?.*/) || [undefined])[0];
}
}
}
document.write("Tumblr Cursors");