// return TRUE if browser is IE, else return FALSE
function isIE() {
	var av = navigator.appVersion;
	var idxMSIE = av.indexOf("MSIE");
	return (idxMSIE >= 1);
}

// display catvaccines.com headers
function displayHeaders() {
	document.write("<CENTER>");
	// header
	document.write("<a href='/default.html'><img src='images/catvaccines6.gif' width='270px' height='34px' border='0'/></a>");
	// subheader
	document.write("<BR><SPAN style='line-height:13px'>&nbsp</SPAN>");
	document.write("<BR><SPAN class='subheader'>Your online resource for understanding the benefits, risks, and research pertaining to feline vaccines</SPAN>");
	document.write("</CENTER>");
	// divider bar
	document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>");
	document.write("<TR height='4px'><TD></TD></TR>");
	document.write("<TR valign='top'>");
	document.write("<TD valign='top' background='images/divider3.gif'><SPAN style='font-size:8px'>&nbsp;</SPAN></TD>");
	document.write("</TR>");
	document.write("<TR height='14px'><TD valign='center' align='right'' class='siteowner'>Christianne Schelling, DVM</TD></TR>");
	document.write("</TABLE>");
}

// display catvaccines.com left menu
function displayLeftMenu() {
	var IE = isIE();
	var strBorderColorSpec = " bordercolor = '#BBBBDD'";
	var strColorSpec = " color = '#BBBBDD'";
	document.write("<TD width='20%' valign='top'>");
	if (IE) {
		document.write("<TABLE width='91%' height='100%' border='1' cellpadding='0' cellspacing='0' bgcolor='#E6E6F0'" +  strBorderColorSpec + ">");
	}
	else {
		document.write("<TABLE width='91%' height='500px' border='1' cellpadding='0' cellspacing='0'" + strBorderColorSpec + ">");
	}

	document.write("<TR valign='top'>");
	document.write("<TD>");
	if (IE) {
		document.write("<TABLE width='100%' height='100%'  border='0' cellpadding='4' cellspacing='0' bordercolor='#6D8CCC'>");
	}
	else {
		document.write("<TABLE width='100%' height='500px' border='0' cellpadding='4' cellspacing='0' bordercolor='#6D8CCC'>");
	}
	document.write("<TR valign='top' height='110px'>");
	document.write("<TD align='center'>");
	document.write("<a href='/default.html'><img src='images/veterinary_symbol.jpg' width='66px' height='99px' vspace='7px' border='0' alt='CatVaccines.com' /></a>");
	document.write("</TD>");
	document.write("</TR>");
	if (IE) {
		document.write("<TR height='3px'>");
		document.write("<TD> </TD>");
		document.write("</TR>");
	}
	document.write("<tr valign='top'>");
	document.write("<td>");
	document.write("<hr width='100%' size='1' NOSHADE" + strColorSpec + "/>");
	document.write("<div class='left-menu-header'>");
	document.write("ARTICLES");
	document.write("</div>");
	document.write("<hr width='100%' size='1' noshade" + strColorSpec + "/>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<TR height='18px'>");
	document.write("<TD class='leftmenuitem'>");
	document.write("<A href='feline_vaccination_guidelines.htm'>Feline Vaccination Guidelines</A>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR height='14px'>");
	document.write("<TD class='leftmenuitem'>");
	document.write("<A href='chart_of_vaccine_recommendations.htm'>Recommended Vaccines&#151;Quick Guide</A>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR height='18px'>");
	document.write("<TD class='leftmenuitem'>");
	document.write("<A href='sarcomas.htm'>Vaccine-Associated Sarcomas</A>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR height='4px'><TD> </TD></TR>");
	document.write("<tr valign='top'>");
	document.write("<td>");
	document.write("<hr width='100%' size='1' NOSHADE" + strColorSpec + "/>");
	document.write("<div class='left-menu-header'>");
	document.write("<a href='links.html' style='color:#664770'>LINKS</a>");
	document.write("</div>");
	document.write("<hr width='100%' size='1' NOSHADE" + strColorSpec + "/>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr valign='top' align='middle'>");
	document.write("<td>");
//	document.write("<div class='left-menu-link-desc'>Cat scratching problems?</div>");
	document.write("<div style='margin-top:4px; margin-bottom:2px;'><a href='http://www.softpaws.com' target='_blank'><img src='images/soft_paws_2.jpg' width='160px' height='39px' border='0' alt='Soft Paws nail caps for cats'/></a></div>");
	document.write("<div class='left-menu-link-desc'>A humane, proven solution to scratching problems.</div>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr height='7px' valign='top'><td> </td></tr>");
	document.write("<tr align='middle' valign='top'>");
	document.write("<td>");
//	document.write("<div class='left-menu-link-desc'>Looking for the best scratching post for your cat?</div>");
	document.write("<div style='margin-top:2px; margin-bottom:2px'><a href='http://www.purrfectpost.com' target='_blank'><img src='images/purrfect_scratching_post.jpg' width='160px' height='35px' border='0' alt='Purrfect Post - the scratching post cats love to use'/></a></div>");
	document.write("<div class='left-menu-link-desc'>Veterinarian developed &#151; cat approved.</div>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<TR height='6px' valign='top'><TD> </TD></TR>");
	document.write("<tr valign='top'>");
	document.write("<td class='leftmenuitem'>");
//	document.write("<hr width='100%' size='1' NOSHADE" + strColorSpec + "/>");
	document.write("<div style='margin-top:2px'><a href='links.html'>Vaccine and Cat Health Links&nbsp;&raquo;</a></div>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<TR height='4px' valign='top'><TD> </TD></TR>");
	document.write("<tr valign='top'>");
	document.write("<td>");
	document.write("<hr width='100%' size='1' NOSHADE" + strColorSpec + "/>");
	document.write("<div class='left-menu-header'>");
	document.write("SITE INFO");
	document.write("</div>");
	document.write("<hr width='100%' size='1' noshade" + strColorSpec + "/>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<TR height='18px' valign='top'>");
	document.write("<TD class='leftmenuitem' style='line-height:11px'>");
	document.write("<a href='mailto:vet@catvaccines.com'>Contact Us</a>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR height='18px' valign='top'>");
	document.write("<TD class='leftmenuitem' style='line-height:11px'>");
	document.write("<a href='terms_of_use.htm'>Terms of Use</a>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("<TR height='4px' valign='top'><TD> </TD></TR>");
	document.write("<TR height='99%' xvalign='top'><TD> </TD></TR>");
	document.write("<TR valign='bottom'>");
	document.write("<TD align='center' valign='bottom'>");
	document.write("<IMG src='images/vetwithcat.jpg'' width='113px' height='171px' vspace='4' alt='Remember to take your cat in for regular veterinary checkups'>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	document.write("</TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	document.write("</TD>");
}

// display link to "top of page"
function displayTopLink() {
	document.write("<DIV align='right' class='articletext'>");
	document.write("<a href='#top' class='article-link'>Top of page</a>");
	document.write("</DIV>");
}

// display copyright and stuff at bottom of page
function displayBottom(boolCopyrightOnly) {
	var copyrightMarginTop = "5px";
	var copyrightOnly = 0;
	if (arguments[0] != null) {
		copyrightOnly = arguments[0];
	}
	document.write("<HR color='#666666'>");
	if (copyrightOnly == 0) {
	   document.write("<DIV style='font-family:arial, verdana, helvetica; font-size:11px; line-height:13px'>");
	   document.write("Note: CatVaccines.com is an educational service for persons who live with or take care of cats. It is not a replacement for qualified veterinary care. Please discuss your cat's specific vaccination protocol and other health concerns with your veterinarian. (View <a href='terms_of_use.htm' class='article-link'>full terms of use</a>.)");
	   document.write("</DIV>");
	}
	else {
	   copyrightMarginTop = "0px";
	}
	document.write("<DIV style='font-family:arial, verdana, helvetica; font-size:11px; margin-top:" + copyrightMarginTop + "; text-align:center'>");
	var now = new Date;
	var date = now.getDate();
	var year = now.getFullYear();
	document.write("<center>Copyright &copy; 2002-" + year + ", Dr. Christianne Schelling &nbsp;&nbsp; All Rights Reserved</center>");
	document.write("</DIV>");
}

// "Email to a friend" form
function emailToFriend(strTitle, strSummary) {
	document.write("<HR color='#0000A9'>");
	document.write("<SPAN class='emailformheader'>Email this article to a friend:</SPAN>");
	var strCleanSummary = strSummary.replace(/'/g, "&#39;");
	document.write("<FORM name='emailform' method='post' action='send_email.asp' target='SendEmailWin' onSubmit='javascript:initMail(this," + "\"" + strTitle + "\",\""+ strCleanSummary + "\");'>");
	document.write("<INPUT type='hidden' name='subject' value='Fw: " + strTitle + " (from http://www.cattraining.com)'>");
	document.write("<INPUT type='hidden' name='message' value=''>");
	document.write("<TABLE border='0' width='480px'>");
	document.write("<TR><TD class='emailform' width='90px'>*Send to:</TD><TD><INPUT type='text' name='toemail' size=50></TD></TR>");
	document.write("<TR><TD></TD><TD class='emailform' valign='top'>(Enter as many email addresses as you like, separated by commas or semicolons.)</TD></TR>");
	document.write("<TR height='8px'><TD></TD></TR>");
	document.write("<TR><TD class='emailform' width='90px'>*Your Name:</TD><TD><INPUT type='text' name='fromname' size=50></TD></TR>");
	document.write("<TR><TD class='emailform' width='90px'>*Your Email:</TD><TD><INPUT type='text' name='fromemail' size=50></TD></TR>");
	document.write("<TR><TD><INPUT type='submit' value='Send It' onclick='javascript:somewin=window.open(\"send_email.asp\", \"SendEmailWin\",\"scrollbars,width=540,height=270,top=40,left=25\");somewin.focus()'>");
	document.write("<TR><TD></TD><TD class='emailfieldsreqd'>*All fields are required.</TD></TR>");
	document.write("</TD></TR>");
	document.write("</TABLE>");
	document.write("</FORM>");
}

function initMail(theForm, strTitle, strSummary) {
   var strFrom = "From: " + theForm.fromname.value + " (" + theForm.fromemail.value + ")\n\n";
   var strPreface = "I'm auto-recommending this article through <a href='http://www.cattraining.com'>http://www.cattraining.com</a> ---\n\n";
   var strURL = window.location + "";
   // we don't want to include anchors in the URL
   var intAnchorPos = strURL.indexOf("#");
   if (intAnchorPos >= 0) {
	strURL = strURL.substr(0, intAnchorPos);
   }
   var strLink = "URL (address): <a href='" + strURL + "'>" + strURL + "</a>\n\n";
   var strTitle = "Title: " + strTitle + "\n\n";
   var strSummary = "Summary: " + strSummary;
   theForm.message.value = strFrom + strPreface + strLink + strTitle + strSummary;
}


