function NewsTicker(objectName,id){
	this.objectName = objectName;
	this.el = document.getElementById(id);
	this.links = new Array();
	this.index = 0;
	this.character = 0;
	this.currentLink = false;
	this.prefix = "";
}
NewsTicker.prototype.el;
NewsTicker.prototype.index;
NewsTicker.prototype.links;
NewsTicker.prototype.objectName;
NewsTicker.prototype.currentLink;
NewsTicker.prototype.prefix;
NewsTicker.prototype.character;
NewsTicker.prototype.add = function(href,body){
	a = document.createElement("A");
	a.href = href;
	a.innerHTML = body;
	this.links[this.links.length] = a;
}
NewsTicker.prototype.run = function(){
	if(this.links.length > 0){
		if(this.currentLink != false)this.el.removeChild(this.currentLink);
		this.currentLink = this.links[this.index].cloneNode(true);
		this.currentLink.innerHTML = this.prefix;
		this.el.appendChild(this.currentLink);
		this.type();
	}
}
NewsTicker.prototype.write = function(c){
	this.currentLink.innerHTML += c;
}
NewsTicker.prototype.overwrite = function(c){
	this.currentLink.innerHTML = this.currentLink.innerHTML.substr(0,this.currentLink.innerHTML.length-1)+c;
}
NewsTicker.prototype.type = function(){
	setTimeout(this.objectName+".write('_');",13);
	setTimeout(this.objectName+".overwrite('-');",25);
	setTimeout(this.objectName+".overwrite('"+this.links[this.index].innerHTML.replace("&amp;", "&").charAt(this.character).replace("'","&#039;").replace(" ", "&nbsp;")+"');",38);
	this.character++;
	if(this.character < this.links[this.index].innerHTML.length)
		setTimeout(this.objectName+".type()",50);
	else{
		this.character = 0;
		this.index++;
		if(this.index > (this.links.length-1))
			this.index = 0;
		setTimeout(this.objectName+".run()",2500);
	}
}
/* function ajaxEval(file){ */
/* 	var xmlObj = null; */
/* 	if(window.XMLHttpRequest){ */
/* 		xmlObj = new XMLHttpRequest(); */
/* 	} else if(window.ActiveXObject){ */
/* 		xmlObj = new ActiveXObject("Microsoft.XMLHTTP"); */
/* 	} else { */
/* 		return; */
/* 	} */
/* 	xmlObj.onreadystatechange = function(){ */
/* 		if(xmlObj.readyState == 4){ */
/* 			eval(xmlObj.responseText); */
/* 		} */
/* 	} */
/* 	xmlObj.open ('GET', file, true); */
/* 	xmlObj.send (''); */
/* } */
/*  */
/*  */
/* function ajaxRead(file, sendto){ */
/* 	var xmlObj = null; */
/* 	if(window.XMLHttpRequest){ */
/* 		xmlObj = new XMLHttpRequest(); */
/* 	} else if(window.ActiveXObject){ */
/* 		xmlObj = new ActiveXObject("Microsoft.XMLHTTP"); */
/* 	} else { */
/* 		return; */
/* 	} */
/* 	xmlObj.onreadystatechange = function(){ */
/* 		if(xmlObj.readyState == 4){ */
/* 			sendto.innerHTML=xmlObj.responseText; */
/* 		} */
/* 	} */
/* 	xmlObj.open ('GET', file, true); */
/* 	xmlObj.send (''); */
/* } */
/*  */
/*  */
/* function ajaxReadAdd(file, sendto){ */
/* 	var xmlObj = null; */
/* 	if(window.XMLHttpRequest){ */
/* 		xmlObj = new XMLHttpRequest(); */
/* 	} else if(window.ActiveXObject){ */
/* 		xmlObj = new ActiveXObject("Microsoft.XMLHTTP"); */
/* 	} else { */
/* 		return; */
/* 	} */
/* 	xmlObj.onreadystatechange = function(){ */
/* 		if(xmlObj.readyState == 4){ */
/* 			sendto.innerHTML+=xmlObj.responseText; */
/* 		} */
/* 	} */
/* 	xmlObj.open ('GET', file, true); */
/* 	xmlObj.send (''); */
/* } */
/* function popup(a, width, height){ */
/* 	if(width == null){ */
/* 		width=600; */
/* 	} */
/* 	if(height == null){ */
/* 		height=450; */
/* 	} */
/* 	window.open(a.href,"popupWindow","scrollbars=1,menubar=0,resizeable=1,width="+width+",height="+height); */
/* 	return false; */
/* } */
/*  */
/* function selector(tabsID,contentID,index){ */
/* 	el = document.getElementById(contentID); */
/* 	tabs = document.getElementById(tabsID); */
/* 	divIndex = 0; */
/* 	for(var i = 0; i < el.childNodes.length; i++){ */
/* 		if(el.childNodes[i].nodeName.toLowerCase()=="div"){ */
/* 			el.childNodes[i].style.display = divIndex==index ? "" : "none"; */
/* 			divIndex++; */
/* 		} */
/* 	} */
/* 	 */
/* 	tabIndex = 0; */
/* 	for(var i = 0; i < tabs.childNodes.length; i++){ */
/* 		if(tabs.childNodes[i].nodeName.toLowerCase()=="li"){ */
/* 			className = tabIndex==0 ? "first " : ""; */
/* 			className += tabIndex==index ? "on" : ""; */
/* 			className += (tabIndex==index && tabIndex==0) ? " firston" : ""; */
/* 			tabs.childNodes[i].className = className; */
/* 			tabIndex++; */
/* 		} */
/* 	} */
/* 	 */
/* 	return false; */
/* } */
