var newslist=[ //month, day, headline, link, fulldate, target
			["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() {
	document.write('<ul>');
	for (var i=0; i<=3; 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 onsubmit="return validateFormOnSubmit(this)" action="https://www.ipower.com/scripts/formsender.html" enctype="application/x-www-form-urlencoded" method="post">'+
					'<table>'+
						'<tr><td colspan="2"><p>For more information, please fill in the form below and we’ll contact you:</p></td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Name:&nbsp;</td><td><input type="text" id="Name" name="Name" value="" maxlength="50" class="demorequestforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Email:&nbsp;</td><td><input type="text" id="Email" name="Email" value="" maxlength="50" class="demorequestforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Phone:&nbsp;</td><td><input type="text" id="Phone" name="Phone" value="" maxlength="25" class="demorequestforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Company:&nbsp;</td><td><input type="text" id="Company" name="Company" value="" maxlength="50" class="demorequestforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Referred by:</td><td><input type="text" id="Referred by" name="Referred by" value="" maxlength="50" class="demorequestforminput" /></td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Comment:&nbsp;</td><td><textarea name="Comment" rows="6" cols="30" maxlength="1024"  class="demorequestformtextarea"></textarea></td></tr>'+
						'<tr><td>&nbsp;</td><td><input type="submit" id="Form Submit" name="Form Submit" value="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>'+
					'<input id="form_id" type="hidden" name="form_id" value="146390"/>'+
				'</form>');
}
function gup( name )
	{  
		name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
		var regexS = "[\\?&]"+name+"=([^&#]*)";  
		var regex = new RegExp( regexS );  
		var results = regex.exec( window.location.href );  
		if( results == null )    
			return "";  
		else    
			return results[1];
}
function writeHomeDemoForm() {
	var referedby = gup( 'referer' );
	document.write('<form onsubmit="return validateFormOnSubmit(this)" action="https://www.ipower.com/scripts/formsender.html" enctype="application/x-www-form-urlencoded" method="post">'+
					'<table>'+
						'<tr><td style="vertical-align:top; text-align:right">Name:&nbsp;</td><td><input type="text" id="Name" name="Name" value="" maxlength="50" class="demoforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Email:&nbsp;</td><td><input type="text" id="Email" name="Email" value="" maxlength="50" class="demoforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Phone:&nbsp;</td><td><input type="text" id="Phone" name="Phone" value="" maxlength="25" class="demoforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Company:&nbsp;</td><td><input type="text" id="Company" name="Company" value="" maxlength="50" class="demoforminput" /> *</td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Referred by:</td><td><input type="text" id="Referred by" name="Referred by" value="'+referedby+'" maxlength="50" class="demoforminput" /></td></tr>'+
						'<tr><td style="vertical-align:top; text-align:right">Comment:&nbsp;</td><td><textarea name="Comment" rows="6" cols="30" maxlength="1024"  class="demoformtextarea"></textarea></td></tr>'+
						'<tr><td>&nbsp;</td><td><input type="submit" id="Form Submit" name="Form Submit" value="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>'+
					'<input id="form_id" type="hidden" name="form_id" value="146390"/>'+
				'</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>');
}