function write_links_content(div_id) {
	var links = draw_links('rescue_links','href_225',3,rescue_data);
    document.getElementById('rescue_links_hrefs').innerHTML = links;
    var links = draw_links('shelter_links','href_310',2,shelter_data);
    document.getElementById('shelter_links_hrefs').innerHTML = links;
}

function draw_links(div_id,div_class,colspan,data) {
	// bringing in url, then info
    var mylinks = '';
	var colcount = 0;
    for(var i in data) {
		colcount++;
		if(colcount == 1){
			mylinks += '<DIV CLASS=page_text>';
		}
		if(data[i][0] != '') {
        	mylinks += '<DIV CLASS=' + div_class + ' onMouseOver="this.style.backgroundColor=\'#008\'" ' +
           	         'onMouseOut="this.style.backgroundColor=\'#fff\'" onClick="javascript:window.open(\'' +
                    data[i][0] + '\',\'_blank\',\'height=600px,width=800px,menubar=0,status=0,scrollbars=0,resizable=1;\');">' + 
					data[i][1] + '</DIV>\n';
		}
		else {
			mylinks += '<DIV CLASS=' + div_class + '>' + data[i][1] + '</DIV>';
		}
		if(colcount == colspan){
			mylinks += '</DIV>';
			colcount = 0;
		}
    }
	if(colcount == colspan){
		mylinks += '</DIV>';
	}
	return mylinks;
}
