function post_view(feed_id){var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');}
catch(e)
{try
{xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');}
catch(e)
{alert('our browser does not support AJAX!');return false;}}}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)
{}}
var strURL='http://www.feedage.com/myfeedage/feedstat.php?f='+feed_id;xmlHttp.open('GET',strURL,true);xmlHttp.send(null);}
function post_subscribe(feed_id,reader){var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');}
catch(e)
{try
{xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');}
catch(e)
{alert('our browser does not support AJAX!');return false;}}}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)
{}}
var strURL='http://www.feedage.com/myfeedage/subscribestat.php?f='+feed_id+'&s='+reader;xmlHttp.open('GET',strURL,false);xmlHttp.send(null);}
function rateit(rating)
{document.getElementById('rating').style.display='none';document.getElementById('rateit').style.display='block';for(i=1;i<=5;i++){starid='star'+i;if(i<=(rating)){document.getElementById(starid).src='http://www.feedage.com/images/bluestar.gif';document.getElementById(starid).width='13';document.getElementById(starid).height='12';}else{document.getElementById(starid).src='http://www.feedage.com/images/greystar.gif';document.getElementById(starid).width='13';document.getElementById(starid).height='12';}}}
function rating()
{document.getElementById('rateit').style.display='none';document.getElementById('rating').style.display='block';}
function xmlhttpPost(strURL)
{var xmlHttp;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');}
catch(e)
{try
{xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');}
catch(e)
{alert('our browser does not support AJAX!');return false;}}}
xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{updatepage(xmlHttp.responseText);}}
xmlHttp.open('GET',strURL,true);xmlHttp.send(null);document.getElementById('rating').style.display='block';document.getElementById('rateit').style.display='none';}
function updatepage(rating){for(i=1;i<=5;i++){rstarid='rstar'+i;if(i<=rating){document.getElementById(rstarid).src="http://www.feedage.com/images/orangestar.gif";}else{document.getElementById(rstarid).src="http://www.feedage.com/images/greystar.gif";}}
document.getElementById('rating').style.display='block';document.getElementById('rateit').style.display='none';}
function emailafriend(){sendurl=window.location.href;url='http://www.feedage.com/myfeedage/emailfriend.php?url='+sendurl;popupWin=window.open(url,'open_window','menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, dependent, width=400, height=350, left=50, top=50')}
function textCounter(field,cntfield,maxlimit){if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit);else
cntfield.value=maxlimit-field.value.length;}

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1446125-1']);
_gaq.push(['_trackPageview']);

(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

//Cross-browser implementation of element.addEventListener()
function addListener(element, type, expression, bubbling) {
    bubbling = bubbling || false;

    if (window.addEventListener) { // Standard
        element.addEventListener(type, expression, bubbling);
        return true;
    } else if (window.attachEvent) { // IE
        element.attachEvent('on' + type, expression);
        return true;
    } else return false;
}

function chitika_click() {
	_gaq.push(['_trackEvent', 'chitika', 'click']);
}

function addListener1(element, type, expression) {
	
	var elements;
	if(document.getElementsByTagName) {
	    elements = document.getElementsByTagName("IFRAME");
	} else if (document.body.all) {
	    elements = document.body.all.tags("IFRAME");
	} else {
	    elements = Array();
	}
	    
	for(var i = 0; i < elements.length; i++) {
	    if(elements[i].src.indexOf('mm.chitika.net') > -1) {
	        elements[i].onfocus = chitika_click;
	    } 
	}
}

//This is what i want to do whenever someone clicks on the page
function itHappened(evt) {

    //Get the clicket element
    var tg = (window.event) ? evt.srcElement : evt.target;
    //If it is an A element
    if (tg.nodeName == 'A') {
        //And it is not an internal link
        if (tg.href.indexOf(location.host) == -1) {
            //Replace all odd characters, so that it works with Analytics Niavgation analysis
            var url = tg.href.replace(/[^a-z|A-Z]/g, "_");

            var txt = tg.innerHTML.replace(/[^a-z|A-Z]/g, "_");
            var str = '/outgoinglink/-' + txt + '-' + url;
            try {
                //Track it
            	//_gaq._trackPageview(str); 
            	//_gaq._trackEvent("outgoing", "click", str);
            	_gaq.push(['_trackEvent', 'outgoing', 'click', str]);
            }
            catch (err) {
                //alert('error: ' + err);
            }
        }
    }
}
//Add the click listener to the document
addListener(document, 'click', itHappened);
