var xdoc = document;
var xmlhttp;
var params = "params=";
var trimc = true;
var nonews = true;
var validID = true;
var urls='';


function continueConf()
{
	document.getElementById('restof').style.display = "block";	
}
function validInp(obj)
{
	trimc = false;
	o = parseInt(obj.value);
	if(isNaN(o) || o<20)
		alert('Value must be numeric, and greater than 20!');
	else
		trimc = true;
	
}
function validInp2(obj)
{
	nonews = false;
	o = parseInt(obj.value);
	if(isNaN(o) || o<1)
		alert('Value must be numeric, and greater than 0!');
	else
		nonews = true;
}
function validIDi(obj)
{
	validID=false;
	if(obj.value.length>0)
		validID=true;
	else
		alert("Please fill the ID of your element!");
}

function displayCode()
{
	document.getElementById('code_').style.display = "block";
	urls = document.getElementById('urls').value;
	urls = urls.replace('http:\/\/', '');
	if(nonews == true && trimc == true && validID)
	{
		document.getElementById('getCode').value = "<script type='text/javascript'>"+
		"\nvar xElement='"+ document.getElementById('xElement').value+
		"';\nvar xLink='" + urls+
		"';\nvar xShowTitle="+ document.getElementById('xShowTitle').value+
		";\nvar xShowDescription="+ document.getElementById('xShowDescription').value+
		";\nvar xTrimDescription="+ document.getElementById('xTrimDescription').value+
		";\nvar xDescEndMarker='"+ document.getElementById('xDescEndMarker').value+
		"';\nvar xNumber="+ document.getElementById('xNumber').value+
		";\n</script><script type='text/javascript' src='http://www.codetale.com/rssfeed/js/?url="+urls+"'></script>";
	}
}