﻿function SetTheme(themeid) {
    if (testPersistentCookie())
    {
        writePersistentCookie('theme', themeid, 'days', 30);
        //writeSessionCookie('theme', themeid);
        location.reload(true);
    }
    else 
    {
        alert("You must enable session cookie to use the difrent themes");
    }
}

function SetAltText(t, nodeid) {
    var res = loadXMLDoc(nodeid);
    t.title = res;
    //t.alt = res;
    t.onMouseOver = null;
}

function loadXMLDoc(id) {
    if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
    xmlhttp.open("POST", "/GetWikiWordInfo.ashx?nid=" + id, false);
    xmlhttp.send(null);
    return xmlhttp.responseText;
}

