var hrefs=document.getElementsByTagName("a");var link_path="";for(var l=0;l<hrefs.length;l++){try{var link_path=hrefs[l].pathname;var link_location=String(hrefs[l]);if(link_location.match(/^mailto:/i)){addmailtotrackerlistener(hrefs[l]);}else if(location.host==hrefs[l].hostname){if(link_path.match(/\.(doc|pdf|xls|ppt|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3|flv|f4v|docx)$/)){addtrackerlistener(hrefs[l]);}}else
{addtrackerlistener(hrefs[l]);}}catch(err){}}function addtrackerlistener(obj){if(obj.addEventListener){obj.addEventListener('click',trackfiles,true);}else if(obj.attachEvent){obj.attachEvent("on"+'click',trackfiles);}}function addmailtotrackerlistener(obj){if(obj.addEventListener){obj.addEventListener('click',trackmailto,true);}else if(obj.attachEvent){obj.attachEvent("on"+'click',trackmailto);}}function trackfiles(array_element){var file_path="";var destination_host=(array_element.srcElement)?array_element.srcElement.hostname:this.hostname;if(location.host!=destination_host){file_path="/virtual/exlink/"+cleanURL(window.location,true)+'/'+((array_element.srcElement)?array_element.srcElement.hostname:this.hostname);file_path=file_path+((array_element.srcElement)?"/"+cleanURL(array_element.srcElement.pathname,false):this.pathname);}else{file_path=((array_element.srcElement)?"/"+array_element.srcElement.pathname:this.pathname);var file_details=file_path.split('/');file_path=cleanURL(window.location,true)+'/'+file_details[(file_details.length-1)];file_path=(("/virtual/download/")+file_path);} _gaq.push(['_trackEvent', 'Download', 'click', file_path]); /*pageTracker._trackPageview(file_path);*/ }function trackmailto(array_element){var email=((array_element.srcElement)?array_element.srcElement.href:this.href).substring(7);var url=cleanURL(window.location,true);var mail_path='/virtual/mailto/'+url+'/'+email; _gaq.push(['_trackEvent', 'MailTo', 'click', mail_path]); /*pageTracker._trackPageview(mail_path);*/}function cleanURL(url,end){var url=url.toString();var urlLen=url.length;if(end){if(url.charAt((urlLen-1))=='/')url=url.substring(0,(urlLen-1));}else{if(url.charAt(0)=='/')url=url.substring(1,urlLen);}return url;}

try{
$("#rpFAP").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Find A Physician']);});
$("#rpBillPay").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Bill Pay']);});
$("#rpClasses").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Classes and Events']);});
$("#rpFC").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Financial Counseling']);});
$("#rpPFB").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Patient Friendly Billing']);});
$("#rpPre").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Pre-Registration']);});
$("#rpMaps").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'ForPatients', 'Maps and Directions']);});
$("#rp1001Text").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Publications', '1001']);});
$("#rpAH").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Publications', 'Advancing Health']);});
$("#rpEH").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Publications', 'E-Health']);});
$("#rpDirections").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Ads', 'Maps and Directions']);});
$("#rp1001").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Ads', '1001']);});
$("#rpLawson").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Ads', 'Lawson']);});
$("#rpHealthFair").click(function() {_gaq.push(['_trackEvent', 'ResourceButton', 'Ads', 'Health Fair']);});
}catch(e){}

