function getRandom(total) {
  var ranNum = Math.floor(Math.random()*total);
  return ranNum;
}

function randomTestimonial() {
	var quoteDiv  = document.getElementById('quote');
	var quotes    = new Array();


	quotes[0]  = '<br><b>What our clients are saying:</b><br><br><blockquote>I consider Rainier to be one of our most key strategic resources. No other agency has ever been able to so consistently help us create, capture and communicate our messaging. They bring new ideas to the table, they think outside the box, and they are consummate professionals. <b>These guys totally get it</b>.&#8221;</blockquote><p class="cite">&#8212; John Croteau, GM of the Convergent Platforms Group at Analog Devices</p>';
	quotes[1]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier&#8217;s strategic counsel and tactical PR execution was absolutely instrumental in securing the exact kind of coverage CogniScent needed to achieve commercial success. The agency&#8217;s work directly <b>resulted in numerous new business and investor leads</b>.&#8221;</blockquote><p class="cite">&#8212; Hugh Greville, CEO of CogniScent</p>';
	quotes[2]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier has consistently given us creative and practical advice, and helped us see beyond the technical specs of our products to <b>achieve influence</b> in an industry-wide context. Rainier has the right mix of media and analyst connections, industry insight and PR skills to get us magazine covers, loads of coverage and top industry awards.&#8221;</blockquote><p class="cite">&#8212; Mark Downing, former CEO of Enpirion</p>';
	quotes[3]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier was <b>incredibly effective in creating buzz</b> for Connect One at a time when we barely even had a product. They knew exactly how to position the company as a technology leader, and how to successfully pitch us to the media.&#8221;</blockquote><p class="cite">&#8212; Alan Singer, VP Sales and Marketing for Connect One Ltd.</p>';
	quotes[4]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Until Rainier, we went through agency after agency and kept being disappointed. The others were slow to act, or talked a good game but had no execution, or simply did not understand our technologies and markets.&#8221;</blockquote><p class="cite">&#8212; Pamela Sufi, former worldwide PR manager for Wind River</p>';
	quotes[5]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Steve is a forward thinking strategist who has put together a responsive and intelligent group of team players who use both sides of their brains to <b>get your company&#8217;s key messages known in the industry</b>.&#8221;</blockquote><p class="cite">&#8212; Eric Odell, Vice President of Marketing for SpiritSoft</p>';
	quotes[6]  = '<br><b>What our clients are saying:</b><br><br><blockquote>While most other Internet consulting companies struggled to get positive media attention in the &#8216;post dot-com&#8217; era, Primix secured upbeat ink through Rainier&#8217;s <b>strong media and analyst relationships</b>, and <b>incredible pitching skills</b>.&#8221;</blockquote><p class="cite">&#8212; James Monahan, Director of Corporate Communications for Primix</p>';
	quotes[7]  = '<br><b>What our clients are saying:</b><br><br><blockquote>We have worked with Rainier for years now. Their technology background enabled them to come up to speed with us very rapidly, and their professionalism, creativity and responsiveness have delivered <b>results which have consistently exceeded our expectations</b>. They are also, on a personal level, fun people to work with.&#8221;</blockquote><p class="cite">&#8212; Ian McMurray, Worldwide Media Relations Manager for the DLP Products at Texas Instruments</p>';
	quotes[8]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Enikia went from an unknown start-up company to a respected brand, thought leader and industry pioneer in 2 years; beating start-ups and established companies alike. Much of this long before we had a product! This simply would not have been possible without Rainier.&#8221;</blockquote><p class="cite">&#8212; Bob Dillon, Former CEO of Enikia</p>';
	quotes[9]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier has built relationships with analysts and the trade press which have now begun to pay off in <b>an unprecedented level of positive global coverage</b> for DataMirror and its technologies. We also appreciate the responsiveness and expertise of the Rainier team in helping DataMirror raise its profile within the market.&#8221;</blockquote><p class="cite">&#8212; Nigel Stokes, CEO of DataMirror</p>';
	quotes[01]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Since I&#8217;ve come on board at Sprint, I&#8217;ve had the pleasure of working with the Rainier team on a daily basis. I can honestly say I know that when there is a project to be done, they&#8217;ll do it right the first time, ahead of time, and with a good attitude.&#8221;</blockquote><p class="cite">&#8212; Teisha Van de Kop, Program Manager at Sprint Business</p>';
	quotes[02]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier created and executed a terrific campaign!!! The agency&#8217;s work helped H&J increase its brand recognition, and get more customer attention and sales, at a time when the noise and hype was deafening in the networking industry.&rdquo;<br><br>&ldquo;Rainier&#8217;s campaign was instrumental in helping make an industry leader out of a relatively unknown boutique business.  We were able to recognize <b>a positive return on the money we invested</b> with the agency.&#8221;</blockquote><p class="cite">&#8212; Ethan Harris, Cofounder and Former President of Harris & Jeffries, Inc.</p>';
    quotes[03]  = '<br><b>What our clients are saying:</b><br><br><blockquote>As a completely unknown startup, from a tiny country very far from the U.S. market, there was a lot at stake when we put ourselves in Rainier’s hands. Their understanding of our technology, and its potential impact on the network equipment market, was immediate, accurate and insightful.&rdquo;<br><br>&ldquo;Steve and his team helped us crystallize our go-to-market strategies and our messaging, and then they set about aggressively executing <b>an incredibly successful PR program</b> for us. The results, including a breakthrough cover story in Electronic Design magazine, were phenomenal.&#8221;</blockquote><p class="cite">&#8212; Kurt Busch, VP of Marketing for TeraCross & President of Switchcore Corporation</p>';
    quotes[04]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Having Rainier as our agency is <b>like having a secret advantage over the competition</b> &ndash; this team brings exceptional strategic thinking to every campaign they create and execute.&rdquo;<br><br>&ldquo;Beyond Rainier&#8217;s unique ability to comprehend technology is a fantastic knack for digging deeper, asking the right questions, and pushing harder to articulate exactly how a product brings real value to the overall market.&rdquo;<br><br>&ldquo;The results with Rainier are always <b>an incredible return on our investment</b>.&#8221;</blockquote><p class="cite">&#8212; Steve Curtin, Marketing Manager at Ariel</p>';
    quotes[05]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Insignia relied on Rainier as <b>a vital strategic partner</b> for our launch into the mobile provisioning space. They completely understood our technology and how it would affect the mobile market ecosystem.&rdquo;<br><br>&ldquo;Rainier solidified our positioning, key messages, and presentation materials and then executed <b>an exceptional PR campaign</b> that helped transform us from being completely unknown in the mobile industry into a recognized player.&rdquo;<br><br>&ldquo;The agency consistently, proactively and aggressively got us in front of the right analysts and editors, and I could always count on them to have every detail covered.&#8221;</blockquote><p class="cite">&#8212; Peter Bernard, Chief Product Officer at Insignia Solutions</p>';
	quotes[06]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier’s approach to high-tech PR reflects Steve’s unwavering <b>passion and enthusiasm for communicating technological innovation</b>.&rdquo;<br><br>&ldquo;Steve is an industry leader who brings clear, honest and creative thinking to every situation. He always seems to bring out the best in people, and his commitment to the success of every Rainier client is remarkably personal.&#8221;</blockquote><p class="cite">&#8212; Dr. Amnon Aliphas, CEO & Founder of VentureOnLine, TechOnLine, and GTC Conference</p>';
	quotes[07]  = '<br><b>What our clients are saying:</b><br><br><blockquote>This is the kind of surgically precise PR every technology company hopes for from an agency. By getting our key messages in front of design engineers through this kind of media coverage, Rainier <b>helps drive our business objectives</b> &ndash; new design wins &ndash; in today&#8217;s growth markets.&#8221;</blockquote><p class="cite">&#8212; Jerry McGuire, Vice President of the General Purpose DSP Group at Analog Devices</p>';
quotes[08]  = '<br><b>What our clients are saying:</b><br><br><blockquote>The value Rainier provides for Israeli technology companies is truly unique. Our startup company was completely unknown in the United States, and we had some very aggressive business goals in mind, including the need for high market value on Wall Street. Rainier&#8217;s deep experience in technology markets and strategic industry connections combined with their expert PR skills to give us exactly the articles, interviews, speaking opportunities and overall market presence we needed to become a driving force and eventually go public.&#8221;</blockquote><p class="cite">&#8212; Shalom Daskal, Chairman of VeNotion and former CEO of Jerusalem-based Emultek (e-Sim)</p>';
quotes[09]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier is an agency with extremely high expectations of itself and of its clients &ndash; as a senior high-tech marketing executive, I have brought them with me across four different companies.&rdquo;<br><br>&ldquo;We consistently rely on Rainier&#8217;s <b>industry expertise, strategic advice, and creative PR tactics that deliver results</b>. They continually push us to think beyond the product to really articulate the effect we would have on the entire telecom ecosystem and demonstrated this in their recent support of Fujitsu&#8217;s announcement of a new flagship product.&#8221;</blockquote><p class="cite">&#8212; Julia Pitlik, Senior Director of Marketing at Fujitsu Network Communications</p>';
quotes[001]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Rainier has helped tremendously in organizing, tracking, and pitching both speaking and editorial opportunities for Fujitsu Network Communications.  As the result of our work together, Fujitsu is regularly quoted in the relevant feature stories of <b>top tier publications</b> in our industry.&rdquo;<br><br>&ldquo;Rainier&#8217;s work has also contributed in speaker placements at the most important technical and executive conferences. I have come to rely on Rainier to help ensure that Fujitsu&#8217;s name is top of mind with editors and conference organizers alike, who in turn, communicate our messages to customers and prospects.&#8221;</blockquote><p class="cite">&#8212; Bob Laurent, Senior Manager of Media Relations at Fujitsu Network Communications</p>';
quotes[002]  = '<br><b>What our clients are saying:</b><br><br><blockquote>Our technology is quite complicated, but the team at Rainier was very decisive in helping us to <b>clarify our messaging</b> and solidify our communications strategy.&rdquo;<br><br>&ldquo;Their obsession with delivering precisely the right message to the right target audience not only helped us stay focused, but the <b>ROI</b> on our PR investment with Rainier was measurable.&rdquo;<br><br>&ldquo;When we analyzed our recent sales results through keyword tracking, we found that a significant portion of new <b>leads and sales conversions</b> were the direct result of the PR coverage generated by Rainier.&#8221;</blockquote><p class="cite">&#8212; Ze’ev Rivlin, VP Marketing and Business Development at Commex Technologies</p>';

	var getQuote = quotes[getRandom(quotes.length)];
	quoteDiv.innerHTML = getQuote;
}

function SDMenu(id) {
  if (!document.getElementById || !document.getElementsByTagName)
		return false;
	this.menu = document.getElementById(id);
	this.submenus = this.menu.getElementsByTagName("div");
	this.remember = false;
	this.speed = 5;
	this.markCurrent = true;
	this.oneSmOnly = false;
}

SDMenu.prototype.init = function() {
	var mainInstance = this;
	for (var i = 0; i < this.submenus.length; i++)
		this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
			mainInstance.toggleMenu(this.parentNode);
		};

	if (this.markCurrent) {
		var links = this.menu.getElementsByTagName("a");
		for (var i = 0; i < links.length; i++)
			if (links[i].href == document.location.href) {
				links[i].className = "current";
				break;
			}
	}
	if (this.remember) {
		var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)");
		var match = regex.exec(document.cookie);
		if (match) {
			var states = match[1].split("");
			for (var i = 0; i < states.length; i++)
				this.submenus[i].className = (states[i] == 0 ? "collapsed" : "expanded");
		}
	}
};

SDMenu.prototype.toggleMenu = function(submenu) {
	if (submenu.className == "collapsed")
		this.expandMenu(submenu);
	else
		this.collapseMenu(submenu);
};

SDMenu.prototype.expandMenu = function(submenu) {
	var fullHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
	var links = submenu.getElementsByTagName("a");
	for (var i = 0; i < links.length; i++)
		fullHeight += links[i].offsetHeight;
	var moveBy = Math.round(this.speed * links.length);
	
	var mainInstance = this;
	var intId = setInterval(function() {
		var curHeight = submenu.offsetHeight;
		var newHeight = curHeight + moveBy;
		if (newHeight < fullHeight)
			submenu.style.height = newHeight + "px";
		else {
			clearInterval(intId);
			submenu.style.height = "";
			submenu.className = "expanded";
			mainInstance.memorize();
		}
	}, 30);
	this.collapseOthers(submenu);
};

SDMenu.prototype.collapseMenu = function(submenu) {
	var minHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
	var moveBy = Math.round(this.speed * submenu.getElementsByTagName("a").length);
	var mainInstance = this;
	var intId = setInterval(function() {
		var curHeight = submenu.offsetHeight;
		var newHeight = curHeight - moveBy;
		if (newHeight > minHeight)
			submenu.style.height = newHeight + "px";
		else {
			clearInterval(intId);
			submenu.style.height = "";
			submenu.className = "collapsed";
			mainInstance.memorize();
		}
	}, 30);
};

SDMenu.prototype.collapseOthers = function(submenu) {
	if (this.oneSmOnly) {
		for (var i = 0; i < this.submenus.length; i++)
			if (this.submenus[i] != submenu && this.submenus[i].className != "collapsed")
				this.collapseMenu(this.submenus[i]);
	}
};

SDMenu.prototype.expandAll = function() {
	var oldOneSmOnly = this.oneSmOnly;
	this.oneSmOnly = false;
	for (var i = 0; i < this.submenus.length; i++)
		if (this.submenus[i].className == "collapsed")
			this.expandMenu(this.submenus[i]);
	this.oneSmOnly = oldOneSmOnly;
};

SDMenu.prototype.collapseAll = function() {
	for (var i = 0; i < this.submenus.length; i++)
		if (this.submenus[i].className != "collapsed")
			this.collapseMenu(this.submenus[i]);
};

SDMenu.prototype.memorize = function() {
	if (this.remember) {
		var states = new Array();
		for (var i = 0; i < this.submenus.length; i++)
			states.push(this.submenus[i].className == "collapsed" ? 0 : 1);
		var d = new Date();
		d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));
		document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/";
	}
};

var myMenu;
window.onload = function() {
	myMenu = new SDMenu("navigation");
	myMenu.init();
  randomTestimonial();
};
