function content_link_hover()
{
    var elements = $$('.related_content .image_link');
    
    for (var i = 0; i < elements.length; i++)
    {
        elements[i].onmouseover = function() {  
                                        
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace(".gif", "_on.gif");
                                            }
                                        }
                                        
                                    };
                                    
        elements[i].onmouseout = function() {  
                                        
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace("_on.gif", ".gif");
                                            }
                                        }
                                        
                                    };
    }
}

function submit_button_hover()
{
    var elements = $$('.submit_button');
    
    for (var i = 0; i < elements.length; i++)
    {
        elements[i].onmouseover = function() {  
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "INPUT" || children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace(".png", "_on.png");
                                               children[i].src = children[i].src.replace(".gif", "_on.gif");
                                            }
                                        }
                                        
                                    };
                                    
        elements[i].onmouseout = function() {  
                                        
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "INPUT" || children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace("_on.png", ".png");
                                               children[i].src = children[i].src.replace("_on.gif", ".gif");
                                            }
                                        }
                                        
                                    };
    }
}

function nav_hover() {
	//
	var elements = $$('#nav a');
	//
	for (var i = 0; i < elements.length; i++) {
		elements[i].onmouseover = function() {
			this.addClassName('on');
		};
		elements[i].onmouseout = function() {
			this.removeClassName('on');
		};
	}
}

function content_map_link_hover()
{
    var elements = $$('.content_map_link');
    
    for (var i = 0; i < elements.length; i++)
    {
        elements[i].onmouseover = function() {  
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace(".png", "_on.png");
                                               children[i].src = children[i].src.replace(".gif", "_on.gif");
                                            }
                                        }
                                        
                                    };
                                    
        elements[i].onmouseout = function() {  
                                        
                                        var children = this.childNodes
                                        for (var i = 0; i < children.length; i++)
                                        {
                                            if (children[i].tagName == "IMG")
                                            {
                                               children[i].src = children[i].src.replace("_on.png", ".png");
                                               children[i].src = children[i].src.replace("_on.gif", ".gif");
                                            }
                                        }
                                        
                                    };
    }
}

function toggleMyIdeasProject () {
    if ($('my_ideas_project_popup').getStyle('display') == 'none') {
        //$('my_ideas_project_popup').clonePosition('my_ideas_btn', {setWidth: false, setHeight: false, offsetTop: 28});
        $('my_ideas_project_popup').setStyle({
            display: 'block'
        });
    } else {
        $('my_ideas_project_popup').setStyle({
            display: 'none'
        });
    }
}

window.onresize = function() {
    //$('my_ideas_project_popup').clonePosition('my_ideas_btn', {setWidth: false, setHeight: false, offsetTop: 28});
};
