
/* Sidebar.js - generates sidebard content for the Careers section */

// SNAPSHOTS
var path = "/careers/images/charts/";
var snapshots = [	{category:"community", src:"probonohours_2001-06.png"},
					{category:"diversity", src:"partners-genders_2006.png"},
					{category:"diversity", src:"dom-partners_1993.png"}];


// OFFICE PHOTO
var officephotos = [{office:"london", src:"london_building4.jpg"}];

// FACTS

var facts = [	    {category:"facts", content:"Established in 1998, the London office has more than 70 lawyers, including 21 partners and six of counsel.", href:""},
					{category:"facts", content:"We take up to 10 trainees per year.", href: "" },
					{category:"facts", content:"Working at Orrick offers the benefits of a major international law firm, providing leading practices in a variety of sectors, with the opportunity for interaction in an mid-sized informal office environment.", href:""},
					{category:"facts", content:"Trainees at Orrick sit four six-month seats, one of which must be a contentious seat. Seat rotations can include competition, corporate, employment, finance, litigation, real estate and restructuring.", href:""},
					{category:"facts", content:"To get acquainted with colleagues, we have regular office social activities, including drinks evenings, sports outings and trainee events.", href:""},
					{category:"facts", content:"We consider our trainees to be an integral part of our team, and they play key parts from day one.", href:""},
					{category:"facts", content:"We see ourselves as the London office of a global law firm, and not just a satellite branch. Much of Orrick's client work involves cross-border transactions.", href:""},
					{category:"facts", content:"Orrick has  a global reputation advising  established and emerging companies. Our clients include leading investment banks, private equity and hedge funds, and multinational and national corporates.", href:""},
					{category:"facts", content:"The firm's 21 offices are located in Beijing, Berlin, Düsseldorf, Frankfurt, Hong Kong, London, Los Angeles, Milan, Moscow, New York, Orange County, Pacific   Northwest, Paris, Rome, Sacramento, San Francisco, Shanghai, Silicon Valley,   Taipei, Tokyo and Washington, D.C.", href:""}];
					



// RANKINGS
var rankings = [	{category:"practice", content:"Orrick was named to <em>The American Lawyer's</em> prestigious &quot;A-List&quot; for the third consecutive year in 2009. The list, which &quot;aims to measure and quantify the qualities that define an elite law firm,&quot; ranks the nation's top law firms on the basis of not only financial results but also associate satisfaction, diversity and pro bono contribution.", href:""},
			        {category:"practice", content:"Forty-five Orrick lawyers are recognized as leaders across 14 practice areas in <em>Chambers USA</em> 2008.  Practice areas include litigation, projects and energy, capital markets, intellectual property, bankruptcy and employment law.", href:""},
				    {category:"practice", content:"Orrick has been ranked in <em>Fortune</em> magazine's &quot;100 Best Companies to Work For&quot; in 2009.  Orrick is ranked 87th on the top 100 list and 26th on the small companies list.", href:""},
					{category:"practice", content:"Orrick received a 100 percent rating in the 2009 Human Rights Campaign's Corporate Equality Index, a report card on gay, lesbian, bisexual and transgender equality in corporate America. This is the third consecutive year Orrick has received a perfect rating.", href:""},
					{category:"practice", content:"Orrick was recipient of the Minority Corporate Counsel Association's 2008 Thomas L. Sager Award, Western Region. The award recognizes law firms that have demonstrated a sustained commitment to improve the hiring, retention, and promotion of diverse attorneys.", href:""},
					{category:"practice", content:"Orrick is ranked fifth in the <em>The Minority Law Journal's</em> 2008 Diversity Scorecard, which lists the 20 firms with the highest minority percentage among U.S. lawyers.  Orrick ranked 12th in 2007.", href:""},
					{category:"practice", content:"For the fourth consecutive year, Orrick was recognized by <em>MultiCultural Law Magazine</em> as one of the &quot;Top 100 Law Firms for Diversity&quot; for the firm's commitment to advancing diversity at Orrick and within the profession. Orrick is ranked sixth on the magazine's 2009 list.", href:""},
					{category:"practice", content:"The <em>Vault Guide to the Top 100 Law Firms</em> for 2008-2009 ranks Orrick in the top 20 in four important quality-of-life and inclusion categories: associate-partner relations, pro bono, best in diversity and minorities.", href:""},
					{category:"practice", content:"Orrick was named to Work Life Matters magazine's 2008 &quot;Top Firms for Work Life&quot; list.", href:""},
					{category:"practice", content:"Sixty-two Orrick lawyers are recognized as leaders across 28 practice areas in <em>Chambers USA</em> 2009. Practice areas include litigation, projects and energy, capital markets, intellectual property, bankruptcy and employment law.", href:""},
					{category:"practice", content:"Orrick was named one of the Best Law Firms for Women in <em>Working Mother Magazine's</em> and Flex-Time Lawyers LLC's 2007 Survey of the 50 Best Law Firms for Women.", href:""}];

                  


// NEWS
var news = [    {category:"diversity", title:"Orrick Recognized as a Top Law Firm for Diversity", content:"Orrick has ranked among the top law firms for diversity in 2006 according to two leading legal publications, the <em>Minority Law Journal</em> and <em>MultiCultural Law</em>.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3274"},
				{category:"diversity", title:"Orrick Partner Named One of &quot;Top Asian Americans in Business&quot;", content:"George Wang, a corporate partner in Orrick’s New York office, was recognized as an outstanding Asian entrepreneur and winner of the &quot;2006 Outstanding 50 Asian Americans in Business&quot; award at an awards dinner on June 16.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3467"},
				{category:"diversity", title:"San Francisco litigation partner Melinda Haag and Silicon Valley employment law partner Lynne Hermle were named among the top women litigators in California.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3388"},
				{category:"diversity", title:"Renowned Radio Journalist Nina Totenberg Highlights Third Annual Orrick Women's Career Initiative Networking Event", content:"Nearly 125 women attended Orrick’s third annual Women’s Career Initiative networking event in San Francisco, including executives, investment bankers, in-house counsel and legal journalists, along with female lawyers from the firm’s Sacramento, San Francisco and Silicon Valley offices.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3269"},
				{category:"diversity", title:"Kai Tseng Named One of &quot;Top 20 Lawyers Under 40&quot; in California", content:"SSilicon Valley Intellectual Property partner Kai Tseng was named one of the top 20 lawyers in California under the age of 40 by the <em>San Francisco</em> and <em>Los Angeles Daily Journals</em>. This marks the second year in a row the <em>Daily Journals</em> named an IP lawyer from the Silicon Valley office to the list. Last year, Neel Chatterjee was selected.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=2856"},
				{category:"diversity", title:"Silicon Valley Employment Partner Lynne Hermle Named &quot;Woman of Distinction&quot;", content:"Silicon Valley-based employment partner and Orrick executive committee member Lynne Hermle has been named a &quot;Woman of Distinction&quot; by the <em>Silicon Valley/San Jose Business Journal</em> for her leadership and accomplishments in the legal profession.", href:"http://www.orrick.com/news_events/news/orrick_sv_business_052005.pdf"},
				{category:"community", title:"Orrick Supports Two Major Community Initiatives", content:"Orrick recently supported major initiatives for the San Francisco Museum of Modern Art and the National Brain Tumor Foundation. These efforts are part of the firm’s Community Responsibility Program, an ongoing commitment to strengthen and build better communities through a combination of volunteerism, financial contributions and pro bono legal services.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3348"},
				{category:"community", title:"San Francisco Honors Orrick for Commitment to Elementary School ", content:"San Francisco Mayor Gavin Newsom proclaimed April 26 &quot;Orrick Day&quot; in recognition of an after-school program created with the YMCA for Bessie Carmichael Elementary School, located in the South of Market neighborhood, eight blocks from the Orrick Building. The school serves a diverse community, including many students learning English as a second language.", href:"http://www.orrick.com/news_events/releases.asp?action=article&articleID=3240"},
				{category:"community", title:"Orrick Helps Reopen Landmark Bookstore", content:"Silicon Valley corporate associate Daniel Yost led pro bono work to help Menlo Park’s famed Kepler’s Books and Magazines reopen and stay open.", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=2614"},
				{category:"probono", title:"Orrick Sponsors Art Exhibit and Sale for The Children's Storefront School", content:"Orrick helped raise funds for The Children’s Storefront, an independent, tuition-free school in Harlem serving preschool through eighth grade, by sponsoring the third annual Men’s Mentoring Art Exhibit and Cocktail Reception. The exhibit was held December 8, 2005 at Orrick’s New York office, as part of the firm’s expanded commitment to help the communities in which it works. ", href:"http://www.orrick.com/news_events/releases.asp?action=article&articleID=2585"},
				{category:"probono", title:"Orrick Finalist in Two Categories in <em>The Lawyer</em> Awards", content:"Orrick was named a finalist for two awards in a prestigious survey by The Lawyer, a leading U.K. legal publication. <em>The Lawyer</em> Awards, presented in London in June, honor law firms from around the world. Orrick was a finalist for &quot;U.S. Law Firm of the Year&quot; and &quot;Pro Bono Activity of the Year.&quot;", href:"http://www.orrick.com/news_events/media.asp?action=article&articleID=3327"},
				{category:"probono", title:"Orrick Recognized for Distinguished Pro Bono Service", content:"The Law Foundation of Silicon Valley recently recognized Orrick with the prestigious &quot;Founder’s Award&quot; for its significant pro bono contributions to the Foundation’s Fair Housing Project. Twelve Orrick lawyers, as well as paralegals and support staff, have donated their services, worth more than $1.3 million.", href:"http://www.orrick.com/news_events/releases.asp?action=article&articleID=3315"}];


					
function getSnapshot(cat) {
	var arr = [];

	if (!cat) {
		arr = snapshots;
	} else {
		var i=0; while (i<snapshots.length) {
			if (snapshots[i].category == cat) {
				arr.push(snapshots[i]);
			}
			i++;
		}
	}

	var rnd = Math.round(Math.random()*(arr.length-1));
	var s = arr[rnd];
	var str = '<img src="' + path + s.src + '">';
	
	document.write(str);
}



function getOfficePhoto(office) {
	var arr = [];

	if (!office) {
		arr = officephotos;
	} else {
		var i=0; while (i<officephotos.length) {
			if (officephotos[i].office == office) {
				arr.push(officephotos[i]);
			}
			i++;
		}
	}

	var rnd = Math.round(Math.random()*(arr.length-1));
	var s = arr[rnd];
	var str = '<img src="/careers/images/officephotos/' + s.src + '">';
	document.write(str);
}

function getRankings(num, cat) {
	if (num == 0) num = rankings.length;
	var arr1 = [];
	if (!cat) {
		arr1 = rankings;
	} else {
		var i=0; while(i<rankings.length) {
			if (rankings[i].category == cat) {
				arr1.push(rankings[i]);
			}
			i++;
		}
		if (arr1.length == 0) return;
		if (arr1.length < num) num = arr1.length;
	}
	
	var arr2 = [];
	var generated = [];
	
	while (generated.length < num) {
		var rnd = Math.round(Math.random()*(arr1.length-1));
		var exists = false;
		var i=0; while (i<generated.length) {
			if (rnd == generated[i]) {
				exists = true; 
				break;
			}
			i++;
		}
		if (!exists) {
			generated.push(rnd);
			arr2.push(arr1[rnd]);
		}		
	}
	str = '<ul>';
	var i=0; while(i<arr2.length) {
		str += '<li class="ranking">';
		if (arr2[i].href != "") {
			str += '<a href="' + arr2[i].href + '">';
			str += arr2[i].content;
			str += '</a></li>';
		} else {
			str += arr2[i].content;
		}
		i++;
	}
	str += '</ul><p align="right"><a class="readmore" href="/news_events/awards/index.asp">More Honors and Awards </a></p>';
	document.write(str);
}


function getNews(num, cat) {
	if (num == 0) num = news.length;
	var arr1 = [];
	if (!cat) {
		arr1 = news;
	} else {
		var i=0; while(i<news.length) {
			if (news[i].category == cat) {
				arr1.push(news[i]);
			}
			i++;
		}
		if (arr1.length == 0) return;
		if (arr1.length < num) num = arr1.length;
	}
	
	var arr2 = [];
	var generated = [];
	
	while (generated.length < num) {
		var rnd = Math.round(Math.random()*(arr1.length-1));
		var exists = false;
		var i=0; while (i<generated.length) {
			if (rnd == generated[i]) {
				exists = true; 
				break;
			}
			i++;
		}
		if (!exists) {
			generated.push(rnd);
			arr2.push(arr1[rnd]);
		}		
	}
	str = '<ul>';
	var i=0; while(i<arr2.length) {
		str += '<li class="newsitem"><a href="' + arr2[i].href + '">';
		str += '<strong>' + arr2[i].title + '</strong><br/>' + arr2[i].content;
		str += '</a></li>';
		i++;
	}
	str += '</ul><p align="right"><a class="readmore" href="/news_events/releases.asp">More News </a></p>';
	document.write(str);
}
	
	
function getFacts(num, cat) {
	if (num == 0) num = facts.length;
	var arr1 = [];
	if (!cat) {
		arr1 = facts;
	} else {
		var i=0; while(i<facts.length) {
			if (facts[i].category == cat) {
				arr1.push(facts[i]);
			}
			i++;
		}
		if (arr1.length == 0) return;
		if (arr1.length < num) num = arr1.length;
	}
	
	var arr2 = [];
	var generated = [];
	
	while (generated.length < num) {
		var rnd = Math.round(Math.random()*(arr1.length-1));
		var exists = false;
		var i=0; while (i<generated.length) {
			if (rnd == generated[i]) {
				exists = true; 
				break;
			}
			i++;
		}
		if (!exists) {
			generated.push(rnd);
			arr2.push(arr1[rnd]);
		}		
	}
	str = '<ul>';
	var i=0; while(i<arr2.length) {
		str += '<li class="ranking">';
		if (arr2[i].href != "") {
			str += '<a href="' + arr2[i].href + '">';
			str += arr2[i].content;
			str += '</a></li>';
		} else {
			str += arr2[i].content;
		}
		i++;
	}
	
	str += '</ul>';
	document.write(str);
}



