function getPortfolioSearch(val1,val2) { var investval = ""; var invchks = document.getElementsByName('invest[]'); for (var i = 0; i < invchks.length; i++) { if (invchks[i].checked) { investval += invchks[i].value + ","; } } var sectorval = ""; var sectchks = document.getElementsByName('sector[]'); for (var i = 0; i < sectchks.length; i++) { if (sectchks[i].checked) { sectorval += sectchks[i].value + ","; } } var tagval = ""; var chks = document.getElementsByName('tag[]'); for (var i = 0; i < chks.length; i++) { if (chks[i].checked) { tagval += chks[i].value + ","; } } if(val1 == "all_invest") investval = val2; var url = 'http://www.altosventures.com/ajax/portfolio_search_result.php'; new Ajax.Request(url, { parameters: { invest: investval , sector: sectorval , tag: tagval}, onSuccess: function(transport) { var response = transport.responseText; $('portfoliodiv').update(response); } } ); } function getPortfolioDetail(id,invest) { show_hide_details('portfolio_detail_div', 'portfoliodiv'); var url = 'http://www.altosventures.com/ajax/portfolio_detail.php'; new Ajax.Request(url, { parameters: { id:id , invest: invest}, onSuccess: function(transport) { var response = transport.responseText; $('portfolio_detail_div').update(response); } } ); }