var emptype = {"ft":"Full Time","pt":"Part Time","con":"Contract","temp":"Temporary","intern":"Internship","season":"Seasonal","vol":"Volunteer"}; var stage = ["Unspecified","Napkin","Product Development","Beta Test \/ Clinical Trials","Shipping Product","Profitable"]; var raised = {"0":"Unspecified amount","1":"< 5M","5":"5 - 20M","20":"20 - 50M","50":"> 50M"}; var employees = {"0":"Unspecified","1":"1-10","10":"11-40","31":"41-100","101":">100"}; var industry = {"1":"Software","2":"Semiconductors","3":"IT Services","4":"Telecommunications","5":"Networking and Equipment","6":"Computers and Peripherals","7":"Electronics \/ Instrumentation","8":"Biotechnology","9":"Medical Devices and Equipment","10":"Healthcare Services","11":"Industrial","12":"Media and Entertainment","13":"Business Products and Services","14":"Consumer Products and Services","15":"Retailing \/ Distribution","16":"Financial Services","17":"Other","18":"Cleantech \/ Energy"}; var funcarea = ["Accounting \/ Finance","Administration \/ HR","Business Development","Customer Service \/ Technical Support","Engineering \/ Product Dev \/ Science","Executive Management","IT","Manufacturing","Marketing","Operations","Professional Services","QA Testing \/ Quality Control","Sales","Other"]; var jobTitle = ""; var description = ""; var cDescription = ""; var postDate = ""; var SearchLocation = ""; SearchLocation += " within "; var employmentType = checkboxOptions('emptype', emptype); var functionalArea = checkboxOptions('funcarea', funcarea); var companyName = ""; var profile = ""; var cStage = checkboxOptions('stage', stage); var dollarsRaised = checkboxOptions('raised', raised); var cEmployees = checkboxOptions('employees', employees); var cIndustry = checkboxOptions('industry', industry); var investors = ""; // The search fields and what they map to // 'Functional Area':functionalArea var fields = {'Job Title':jobTitle, 'Job Description':description, 'Location':SearchLocation, 'Employment Type':employmentType, 'Post Date':postDate, 'Company Name':companyName, 'Company Description':cDescription, 'Industry':cIndustry, 'Stage':cStage, 'Dollars Raised':dollarsRaised, 'Employees':cEmployees, 'VC Investor':investors}; // Some fields should only be shown once var uniques = ['Employment Type', 'Functional Area', 'Stage', 'Dollars Raised', 'Employees', 'Industry', 'In Stealth Mode', 'Post Date']; function checkboxOptions(name, data) { var html = ""; if(isArray(data)) { for(var i=0; i "+data[i]+""; if(!i%2) { html += ""; } name == 'stage' ? val = i : val = data[i]; html += ""; if(i%2) { html += ""; } } if (!i%2) { html += ""; } } else { var count = 0; for(var bit in data) { if(!count%2) { html += ""; } html += ""; if(count%2) { html += ""; } count++; } if (!count%2) { html += ""; } } html += "
"+data[i]+"
"+data[bit]+"
"; return html; } function createSearchRow(selected, input) { var selected = selected || ''; var input = input || ''; var html = ""; html += "
"; html += "
"; html += createCriteriaMenu(selected); html += "
"; html += "
"; html += "
Remove
"; html += "
"; return html; } function createCriteriaMenu(selected) { var selected = selected || ''; var html = ""; html += ""; return html; } function createCriteriaMenuOptions(current) { var current = current || ''; var html = ""; for(field in fields) { var useIt = true; $('.criteria select').each(function() { if($(this).val() == field && $.inArray(field, uniques) >= 0) { useIt = false; return; } }); if(field == current) { html += ""; } else if(useIt) { html += ""; } } return html; } function setSearchRow(field, criteria) { var field = field || ''; var criteria = criteria || ''; $('#addCriteria').click(); jSearchRow = $('#addCriteria').parent().prev(); jSearchRow.find('.criteria option[value="'+field+'"]').attr({selected:true}); jSearchRow.find('.criteria select').change(); switch(field) { case "Job Title": case "Job Description": case "Company Name": case "Company Description": case "VC Investor": jSearchRow.find('.searchFor input').val(criteria); break; case "Location": jSearchRow.find('.searchFor input').val(criteria.joblocation); jSearchRow.find('.searchFor option[value="'+criteria.within+'"]').attr({selected:true}); break; case "Employment Type": case "Functional Area": case "Industry": case "Stage": case "Dollars Raised": case "Employees": for(var i=0; i