var newslist=[ //month, day, headline, link, fulldate, target
			["XENA Health is now using Twitter - click here to follow us!","http://twitter.com/xenahealth/","Added April 16 2010","_blank"],
			["XENA Health Partners With Office Ally to offer free claim clearinghouse services ","/news/Xena-Health-Partners-with-Office-Ally/","Added December 17 2009","_self"],
			["XENA Health integrates with Availity for real time and batch transactions","/news/Xena-Health-integrates-with-Availity-for-real-time-and-batch-transactions/","Added July 07 2009","_self"],
			["10 Amazing Advantages of Web Based Medical Billing Software","/news/10-Amazing-Advantages-of-Web-Based-Medical-Billing-Software.pdf","Added June 22 2009","_blank"],
			["XENA Health is attending the HBMA 2009 Spring Conference, Boca Raton, Florida","/news/#hbma09","Added April 3 2009","_self"],
			["XENA Health to launch web-enabled SaaS Medical Billing Solution at HIMSS09","/news/XENA-launch-web-enabled-SaaS-Medical-Billing-Solution-at-HIMSS09/","Added March 30 2009","_self"],
			["The Twelve Steps to Financial Recovery Press Release","/news/Twelve-Steps-to-Financial-Recovery/","Added November 25 2008","_self"]
			];

function writeLatestNews(number) {
	document.write('<ul>');
	for (var i=0; i<=number; i++) {
		document.write('<li>'+
					   '<div class="newsitem"><a href="'+newslist[i][1]+'" class="newslink" target="'+newslist[i][3]+'">'+newslist[i][0]+'</a><br />'+
					   '<span class="newsdate">'+newslist[i][2]+'</span></div>'+
					   '</li>');
	}
	document.write('</ul>');
}

function writeDemoForm() {
	document.write('<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="post" onsubmit="return validateFormOnSubmit(this)">'+
			'<input type="hidden" name="oid" value="00D30000000WEAv" />'+
			'<input type="hidden" name="retURL" value="http://www.xena-health.com/contact/thanks.html" />'+
			'<br />'+
			'<table cellpadding="0" cellspacing="4">'+
				'<tr><td colspan="2"><p>For more information, please fill in the form below and we&rsquo;ll contact you:</p></td></tr>'+
				'<tr><td class="formlabel"><label for="first_name">First name</label>:&nbsp;</td><td><input  id="first_name" maxlength="40" name="first_name" class="demorequestforminput" /> *</td></tr>'+
				'<tr><td class="formlabel"><label for="last_name">Last name</label>:&nbsp;</td><td><input  id="last_name" maxlength="80" name="last_name" class="demorequestforminput" /> *</td></tr>'+
				'<tr><td class="formlabel"><label for="email">Email</label>:&nbsp;</td><td><input  id="email" maxlength="80" name="email" class="demorequestforminput" /> *</td></tr>'+
				'<tr><td class="formlabel"><label for="phone">Phone</label>:&nbsp;</td><td><input  id="phone" maxlength="80" name="phone" class="demorequestforminput" /> *</td></tr>'+
				'<tr><td class="formlabel"><label for="company">Company</label>:&nbsp;</td><td><input  id="company" maxlength="40" name="company" class="demorequestforminput" /> *</td></tr>'+
				'<tr><td class="formlabel"><label for="company">Promo code</label>:&nbsp;</td><td><input  id="00N30000005CS6y" maxlength="20" name="00N30000005CS6y" size="20" class="demorequestforminput" /></td></tr>'+
				'<tr><td class="formlabel"><label for="lead_source">Referred by:&nbsp;</label></td><td><select id="lead_source" name="lead_source" class="demorequestdropdown">'+
							'<option value="">--Please select--</option>'+
							'<option value="Web Search">Web Search</option>'+
							'<option value="Advertisement">Advertisement</option>'+
							'<option value="Business Article">Business Article</option>'+
							'<option value="Solutions Medical Billing">Solutions Medical Billing</option>'+
							'<option value="Forum/Blog">Forum/Blog</option>'+
							'<option value="Trade Show">Trade Show</option>'+
							'<option value="Other">Other</option>'+
				'</select></td></tr>'+
				//'<tr><td class="formlabel"><label for="city">City</label>:&nbsp;</td><td><input  id="city" maxlength="40" name="city" class="demorequestforminput" /></td></tr>'+
				//'<tr><td class="formlabel"><label for="state">State</label>:&nbsp;</td><td><input  id="state" maxlength="20" name="state" class="demorequestforminput" /></td></tr>'+
				'<tr><td class="formlabel">Comment:&nbsp;</td><td><textarea  id="00N300000059qHQ" name="00N300000059qHQ" rows="5" cols="65" class="demorequestformtextarea"></textarea>'+
				'<textarea id="00N30000004zsCx" name="00N30000004zsCx" type="text" wrap="soft" style="display:none">Inquiry</textarea></td></tr>'+
				'<tr><td>&nbsp;</td><td><input type="submit" name="submit" class="submitbutton" onmouseover="this.className=\'submitbuttonon\'" onmouseout="this.className=\'submitbutton\'" /></td></tr>'+
				'<tr><td>&nbsp;</td><td id="formnote">*indicates required information</td></tr>'+
			'</table>'+
		'</form>');
}
function writeLeftAdverts() {
	document.write(	'<a href="http://www.surveymonkey.com/s.aspx?sm=QcC_2fW8cyyivacoyn4Dkv1Q_3d_3d" title="Managing the business of healthcare survey" target="_blank"><img src="/img/adsurvey.jpg" width="193" height="98" alt="" class="paddedimage" /></a>');
}