function fixAnchors() {
	var nodes = document.getElementsByTagName("A");
	var url = new String(document.location);
	for (var i in nodes) {
		var node = nodes[i];
		if (!node || !node.getAttribute) {
			continue;
		}
		var href = node.getAttribute("href");
		if (href && href.indexOf('#') != -1) {
			var pos = href.indexOf('#');
			node.href = url + href.substr(pos);
		}
	}
}

function browser_class() {
	var b = navigator.appName
	this.b = (b=="Netscape")?"ns":(b=="Microsoft Internet Explorer")?"ie":b
	this.v = navigator.appVersion
	/*if (this.b=='ie') {
		var ve = this.version.indexOf("MSIE")
		this.v = parseInt(this.version.substr(ve+4))
	}else this.v = parseInt(this.version)*/
	this.opera = (navigator.userAgent.indexOf('Opera') != -1)?1:0	
	//this.ns4 = (document.layers)?1:0
	this.ns4 = (document.layers && !this.dom)?1:0;
	this.ns6 = (document.getElementById && !document.all && this.b == 'ns')?1:0
	this.ie = (document.all)?1:0
	this.ie4=(document.all && !this.dom && !this.opera)?1:0
	//this.ie4 = (document.all && !document.getElementById)?1:0
	this.ie5 = (document.all && document.getElementById)?1:0
	this.ie5mac = (navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1)
	this.ie55 = (this.ie5 &&  this.v.indexOf('MSIE 5.5')>0)?1:0
	this.ie6 = (this.ie5 &&  this.v.indexOf('MSIE 6.0')>0)?1:0
	this.dom = (document.getElementById)?1:0
	this.w3cdom = (!this.ie5mac && document.getElementsByTagName && document.createElement)?1:0
	this.newBrNotIE = (!this.ie && document.getElementById)?1:0
}

br = new browser_class()
//if (!(is.ie55 || is.ie6)) window.location.href = 'atnaujinkite.htm'


////
//
//		frame:		turi buti pilno "kelio" stringas, pvz.: 'top.frameTop'
//						arba gali buti nuoroda i freimo objekta
//
////
function findObj(id,frame) {
	var d; if (frame) d = typeof(frame)=='object' ? frame.document : eval(frame+'.document')
	else d = window.document
	if (document.getElementById) return d.getElementById(id)
	if (document.all) return d.all(id)
	return false
}

////
//
//		CSS
//
////
function classOver(obj,classOver)
{
	if (!br.dom) return;
	if (!obj.normal_class) obj.normal_class = obj.className
	obj.className = classOver
	//if (!obj.onmouseout) obj.onmouseout = classOut
}

function classOut(obj)
{
	if (!br.dom) return;
	obj.className = obj.normal_class
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

