function is_number(a_string)
{
	l = a_string.length;
	isnum = true;
	for(i=0;i<l;i++)
	{
		c = a_string.charAt(i);
		if (c == "0" || c == "1" || c == "2" || c == "3" ||	c == "4" || c == "5" || c == "6" || c == "7" || c == "8" || c == "9")
		{
		}else {
			isnum = false;
		}
		if (!isnum) break;
	}
	return isnum;
}

function setCookie (name, value, expires, path, domain, secure)
{
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name)
{
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}
function showUrlEnterForm()
{
	document.getElementById('urlEnterForm').style.display = 'block';
	document.getElementById('urlEnterForm').style.visibility = 'visible';
}
function hideUrlEnterForm()
{
	document.getElementById('urlEnterForm').style.display = 'none';
	document.getElementById('urlEnterForm').style.visibility = 'hidden';
}
function showEmailEnterForm()
{
	document.getElementById('emailEnterForm').style.display = 'block';
	document.getElementById('emailEnterForm').style.visibility = 'visible';
}
function hideEmailEnterForm()
{
	document.getElementById('emailEnterForm').style.display = 'none';
	document.getElementById('emailEnterForm').style.visibility = 'hidden';
}
function showAdvancedEnterForm()
{
	document.getElementById('advancedEnterForm').style.display = 'block';
	document.getElementById('advancedEnterForm').style.visibility = 'visible';
}
function hideAdvancedEnterForm()
{
	document.getElementById('advancedEnterForm').style.display = 'none';
	document.getElementById('advancedEnterForm').style.visibility = 'hidden';
}
function showSetOptionContent()
{
	document.getElementById('setoptioncontent').style.display = 'block';
	document.getElementById('setoptioncontent').style.visibility = 'visible';
}
function hideSetOptionContent()
{
	document.getElementById('setoptioncontent').style.display = 'none';
	document.getElementById('setoptioncontent').style.visibility = 'hidden';
}
function showRssContent()
{
	document.getElementById('rsscontent').style.display = 'block';
	document.getElementById('rsscontent').style.visibility = 'visible';
}
function hideRssContent()
{
	document.getElementById('rsscontent').style.display = 'none';
	document.getElementById('rsscontent').style.visibility = 'hidden';
}

function showHideEmailEnterForm()
{
	if (document.getElementById('emailEnterForm').style.display == 'none')
	{
		showEmailEnterForm();
	} else
	{
		hideEmailEnterForm();
	}
}
function showhideAdvancedEnterForm()
{
	if (document.getElementById('advancedEnterForm').style.display == 'none')
	{
		showAdvancedEnterForm();
	} else
	{
		hideAdvancedEnterForm();
	}
}

function showhideSetOptionContent()
{
	if (document.getElementById('setoptioncontent').style.display == 'none')
	{
		showSetOptionContent();
	} else
	{
		hideSetOptionContent();
	}	
}
function showhideRssContent()
{
	if (document.getElementById('rsscontent').style.display == 'none')
	{
		showRssContent();
	} else
	{
		hideRssContent();
	}	
}

function goGround() {

	if (confirm('The functionality of this free service is limited. Please sign up for www.RssGround.com membership to use all the features with no limits.')) 
		window.open('http://www.rssground.com', 'windowName'); 
	return false;
}

