// Script File: weebly.js // copy right 2009 TimAlosi.com // // This script file contains useful scripts for use with Weebly. // Add this script file to the weebly Search Engine Optimization settings area in the footer script area. // // Usage in Weebly Footer // // //------------------------- // This section of code is always run //------------------------- // Add the request to load the Google Analytics Functions var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); // End of Common Code //------------------------- function addFavIcon(icoLink, pngLink) { // Function addFavIcon // copy right 2009 TimAlosi.com // // This function will add links into the element to cause the browser to display // a "favicon" for the page. // // Two icon files should be created. One with a .ico file type and one with a .png // file type. These types are prefered by different browsers. // // Usage // // // // Example // // // Replace the two links above with urls to your icon files (or use mine) // // //Debug Alerts //alert ("in call 1"); //alert (icoLink); //alert (pngLink); var ico_ie = document.createElement('link'); ico_ie.setAttribute('rel', 'shortcut icon'); ico_ie.setAttribute('type', 'image/x-icon'); ico_ie.setAttribute('href', icoLink); document.getElementsByTagName ('head')[0].appendChild(ico_ie); var ico_ff = document.createElement('link'); ico_ff.setAttribute('rel', 'icon'); ico_ff.setAttribute('type', 'image/png'); ico_ff.setAttribute('href', pngLink); document.getElementsByTagName ('head')[0].appendChild(ico_ff); var ico_ip = document.createElement('link'); ico_ip.setAttribute('rel', 'apple-touch-icon'); ico_ip.setAttribute('href', pngLink); document.getElementsByTagName ('head')[0].appendChild(ico_ip); //debug alerts //alert("exiting call"); } function remWeeblyFooter () { // Function remWeeblyFooter // copy right 2009 TimAlosi.com // // This function will remove the banner in the footer that states that the website was // created using weebly. // // // Usage // // // document.getElementById('weeblyFooter').innerHTML = '
'; } function googleAnalytics(sAnalyticsID) { // // Function googleAnalytics // copy right 2009 TimAlosi.com // // This function will execute the Google Analytics page tracking code. // parameter: sAnalyticsID is the tracking ID from your Google Analytics account // // Usage // // // // try { var pageTracker = _gat._getTracker(sAnalyticsID); pageTracker._trackPageview(); } catch(err){}; }