function post_view_old(feed_id) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	var strURL = "http://www.feedage.com/myfeedage/feedstat.php?f="+feed_id;
	//alert(strURL);
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {  
	}
    self.xmlHttpReq.send();
}



function post_view(feed_id) {
	var xmlHttp;
	try
	{  // Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest(); 
	}
	catch (e)
	{  // Internet Explorer  
		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)
	  {
	  //	alert('loaded');  
	  }
	}
	 
	var strURL = 'http://www.feedage.com/myfeedage/feedstat.php?f='+feed_id;
	xmlHttp.open('GET',strURL,true);
	//xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	
	
    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';
			} else {
				document.getElementById(starid).src='http://www.feedage.com/images/greystar.gif';
			}	
		}
	
}
function rating()
{
	document.getElementById('rateit').style.display ='none';
	document.getElementById('rating').style.display ='block';
}

function xmlhttpPost(strURL)
{
	var xmlHttp;
	try
	{  // Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest(); 
	}
	catch (e)
	{  // Internet Explorer  
		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) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else
		cntfield.value = maxlimit - field.value.length;
}
