function setImage(el, url) {
	if(el) {
		el.style.backgroundImage = "url(" + url + ")";
	}                                
}

function getSubnodeByClass(node, className) {
    var ELEMENT_NODE = 1;
    var children = node.childNodes;
    
   for(var i = 0; i < children.length; i++)
        if(children[i].nodeType == ELEMENT_NODE && children[i].className == className)
            return children[i];
            
   return null;
}

function onWindowClick(id) {
    // Use this method to work under IE6. Do not change!
    var windowNode = document.getElementById(id);
    var content = getSubnodeByClass(windowNode, "windowContent");
    
    if(content) {
        var titlebar = getSubnodeByClass(windowNode, "windowTop");
        var windowExpand = getSubnodeByClass(titlebar, "windowExpand");
        var windowCollapse = getSubnodeByClass(titlebar, "windowCollapse");
   
        if(content.style.display == "none") {
            content.style.display = "";
            windowExpand.style.display = "none";
            windowCollapse.style.display = "block";
        }
        else {
            content.style.display = "none";
            windowCollapse.style.display = "none";
            windowExpand.style.display = "block";
        }
    }
}