/*
 * 
 * Revision History
 * 1/25/2010 - bpw - commented out function show_live_help_link() (no longer used)
 */

var do_switch  = 1;
	
	function switch_to(txt) {
		<!--- changes the text to the mouseover text --->
		do_switch = 0;
		if (document.getElementById('mouseover_text') != null) {
		document.getElementById('mouseover_text').innerHTML = "&nbsp;" + txt;
		}
	}
	
	function do_switch_back() {
		<!--- gets called to do the switch back to default text if not over another tab --->
		if (document.getElementById('mouseover_text') != null) {
		if (do_switch) {
			document.getElementById('mouseover_text').innerHTML = "&nbsp;" + default_text;
		}
		}
	}
	
	function switch_back() {
		if (document.getElementById('mouseover_text') != null) {
		<!--- sets a delay before switching back so that the text doesn't change back to default text if over another tab --->
		do_switch = 1;
		setTimeout('do_switch_back()', 50);
		}
	}
	
	<!--- function clears the text "Your Email" in the newsletter search box when clicked --->
	function ClearText(){
		form = window.news_login;
		if(window.news_login.emailaddr.value.indexOf("Email") != -1){
				form.emailaddr.value = '';
				form.emailaddr.focus();
		}
	}
	
	<!--- used for prod_display pet videos. t.d. 7.2.04 ---> 
	function open_window(fname) {
		var win_width, win_height, open_win;
		win_width = 475;
		win_height = 535;
		open_win = window.open (fname, "video", "width=" + win_width + ",height=" + win_height + ",left=" + ((screen.availWidth / 2) - (win_width / 2)) + ",top=" + ((screen.availHeight / 2) - (win_height / 2)));
		open_win.focus();
	}
	
	function add_to_favorites() {
		window.external.AddFavorite(location.href, document.title);
	}
	
	function show_add_favorites_link(link_text, link_class) {
		if (navigator.appName == "Microsoft Internet Explorer") {	
			if (link_class != null) {
				document.write('<a class="' + link_class + '" href="javascript:add_to_favorites();">' + link_text + '</a>');
			} else {
				document.write('<a href="javascript:add_to_favorites();">' + link_text + '</a>');
			}
		}	
	}
	
	function show_footer_add_favorites_link() {
		if (navigator.appName == "Microsoft Internet Explorer") {	
			document.write('<tr><td>');
			show_add_favorites_link('Add us to your Favorites', 'footer_link');
			document.write('</td></tr>');
		}	
	}
	
/*  bpw - 1/25/2010 - function not used
	function show_live_help_link() {
			document.write('<a class="footer_link" href="javascript:LiveHelp();">');
	}
*/
	
	function ShowElements (elements) {
		var element_list = elements.split(',');
		var p = '';
		
		for (i = 0; i < element_list.length; i++) {
			if (document.getElementById(element_list[i]) != null) {
				p = document.getElementById(element_list[i]).style.display;
				if (p == 'none') {
					document.getElementById(element_list[i]).style.display = '';
					document.getElementById('showhide').innerHTML = 'hide';
				} else {
					document.getElementById(element_list[i]).style.display = 'none';
					document.getElementById('showhide').innerHTML = 'show';
				}
			}
		}
	}
	
	function ConfirmAction(url) {
		if (confirm('Are you sure you want to do this?')) {
			window.location = url;
		}
		return;
	}	
	
	function OpenCustomWindow(url, winwidth, winheight, confirmaction) {
		var winhandle;
		var winleft = (screen.availWidth / 2) - (winwidth / 2);
		var wintop =  (screen.availHeight / 2) - (winheight / 2);
		
		if ((confrimaction = null) || ((confirmaction != null) && (confirm('Are you sure you want to do this?')))) {
			winhandle = window.open (url, "New Window", "width=" + winwidth + ",height=" + winheight + ",left=" + winleft + ",top=" + wintop);
			winhandle.focus();
		}
	}
	// PH: 03/29/2006
	// Pop up live help chat window.  Stolen from popupwin2 code used to send to a friend
	// PH: 05/30/2006 Renamed window name...  Was using the same window name as the more info window
	// when a customer would click on more info while in chat, it would overwrite the chat window
	function popupLiveHelpChat(options) 
	{
		var left = 80 ;
		var top = 40 ;
		var width = 419 ;
		var height = 320 ;
		var source = "/lh/livehelp.cfm";
		var options = "scrollbars=no" ;
		var windowproperties = options + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height ;
		popup = window.open(source,"PopupLiveChat",windowproperties) ;
		popup.focus() ;
	}
