Event.observe(window, "load", stretchSidebar);

function stretchSidebar(e) {
    var new_height = $('content-left').getHeight();
    var old_height = $('news').getHeight();
    var height = old_height;

    if( new_height > old_height ) {
        height = new_height;
    }

	try {
		$$('.javatags').each(function(a){
			Event.observe(a, "click", openDiv);
		});
	} catch(ex) {
		
	} 
}

function openDiv(e) {
	var number = Event.element(e).id.split("_")[1];
	var anchor = $('open_'+number);
	var id = "info_" + number;
	var string;
	
	if( $('company_'+number) ) {
		if( $(id).style.display == "none" ) {
	        string = "Hide <strong>&larr;</strong>";
	    } else {
	    	string = "<strong>&rarr;</strong> View Opportunities";
		}
	} else {
		if( $(id).style.display == "none" ) {
	        string = "Hide <strong>&larr;</strong>";
	    } else {
	    	string = "<strong>&rarr;</strong> Learn More";
		}
	}

    anchor.innerHTML = string;
    Effect.toggle(id, 'blind', {duration: 1});
}