function getElementsByClass(searchClass) {
var classElements = new Array();
var els = document.getElementsByTagName('a'); // use "*" for all elements
var elsLen = els.length;
var pattern = new RegExp("\\b"+searchClass+"\\b");
for (i = 0, j = 0; i < elsLen; i++) {
 if ( pattern.test(els[i].className) ) {
 classElements[j] = els[i];
 j++;
 }
}



return classElements;
}





startList = function() {

	// code for IE
	if(!document.body.currentStyle) return;
	/*var subs = document.getElementsByName('submenu');*/
	
	var subs = getElementsByClass('submenu');
	
	for(var i=0; i<subs.length; i++) {
		var li = subs[i].parentNode;
		if(li && li.lastChild.style) {

if(li.className!="no-submenu"){
			li.onmouseover = function() {
				this.lastChild.style.visibility = 'visible';
			}
			li.onmouseout = function() {
				this.lastChild.style.visibility = 'hidden';
			}
}


		}
	}
}

window.onload=startList;

function whichElement(e) {
		if (!e)
		  {
		  var e=window.event;
		  }
		if (e.target)
		  {
		  targ=e.target;
		  }
		else if (e.srcElement)
		  {
		  targ=e.srcElement;
		  }
		if (targ.nodeType==3) // defeat Safari bug
		  {
		  targ = targ.parentNode;
		  }
		var tname;
		tname=targ.tagName;
		cname=targ.className;
		if (tname=="A") linkmodosito(targ)
		else tname=tname;
}

function linkmodosito(ezt){
	if (ezt.href.indexOf(".htm")>0 && ezt.href.indexOf(".html")<0) ezt.target="_blank"
	else ezt=ezt;
}