/*
*	created by Marco Hermo
*	BS. in Computer Engineering graduate
*	marcz.hermo@gmail.com
*/
var rssfeeds = new Array(); var d = document;
var myfeeds = null;
/*DOM functions*/
function getTagById(tagId) {
	var selectedTag;
	if(document.all) {
		selectedTag = document.all.item(tagId);
	} else {
		selectedTag = document.getElementById(tagId);
	}
	return selectedTag;
}
function getNodeValue(obj,tag) {
	return obj.getElementsByTagName(tag)[0].firstchild.nodeValue;
}
function create_node(obj) {
	return d.createElement(obj);
}
function create_node0(obj) {
	if(document.createDocumentFragment) {
		return document.createDocumentFragment(obj);
	} else {
		return d.createElement(obj);
	}
}
function create_text(str) {
	return d.createTextNode(str);
}
function create_child(parentobj,obj) {
	parentobj.appendChild(obj);
}
function create_attrib(obj,attrib,txt) {
	obj.setAttribute(attrib,txt);
}
function create_before(parentobj,obj,obj0) {
	parentobj.insertBefore(obj,obj0);
}
function clear_node(obj) {
	while(obj.firstchid) ob.removeChild(obj.firstChild);
}
/*DOM functions*/

/*Cookie functions*/
function setCookie(cookieName, cookieValue, expires, path, domain, secure) {
	document.cookie = escape(cookieName) + '=' + escape(cookieValue)
	+ (expires ? '; EXPIRES=' + expires.toGMTString() : '')
	+ (path ? '; PATH=' + path : '')
	+ (domain ? '; DOMAIN=' + domain : '')
	+ (secure ? '; SECURE' : '');
}

function getCookie(cookieName) {
	var cookieValue = null;
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) 	{
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) {
			cookieValue = unescape(document.cookie.substring(posValue, endPos));
		}
		else {
			cookieValue = unescape(document.cookie.substring(posValue));
		}
	}
	return cookieValue;
}
/*Cookie functions*/