function showMeWhere()
{
	var longstring = this.href.split("#");
	document.getElementById(longstring[1]).style.border='1px green solid';
}

window.onload = function() {
	classItems = getElementsByClassName("pr_item");

	for (k=0; k<classItems.length; ++k)
	{
		classItems[k].onmouseover = showBorder;
		classItems[k].onmouseout = hideBorder;
		classItems[k].onclick = highlight;
	}

	classLinksItems = getElementsByClassName("link1");

	for (j=0; j<classLinksItems.length; ++j)
	{
		classLinksItems[j].onclick = showMeWhere;
	}
}

Array.prototype.exists = function(o) {
for(var i = 0; i < this.length; i++)
   if(this[i] === o)
     return i;
return false;
}

var arry = new Array();

function showBorder()
{
	this.style.border='1px #000 solid';
}

function hideBorder()
{
	this.style.border='1px #efefef solid';
}

function showNames()
{
	var showname = "";

	for(var i = 0; i < arry.length; i++)
	{
		if (arry[i] !== null)
		{
			showname += allindex[arry[i]]+"<br/>";
		}
	}

	return showname;
}


function highlight(obj)
{
	obj = this;
	id = this.id;
	getElement = "indx"+id;

	if (arry.exists(id) === false)
	{
		obj.style.background='#F9F9F9';
		arry.push(id);
		document.getElementById(getElement).style.backgroundColor = "yellow";
	}
	else
	{
		obj.style.background='#ffffff';
		t = arry.exists(id);
		arry.splice(t, 1);
		document.getElementById(getElement).style.backgroundColor = "#fff";
	}

}