function getElementsByBaseTagClass(base, tag, className) { 
    var classPat = new RegExp('\\b'+className+'\\b'); 
    var nodes = base.getElementsByTagName(tag); 
    var matching = []; 
    for (var i = 0; i < nodes.length; i++) { 
        if (classPat.test(nodes[i].className)) { 
            matching.push(nodes[i]); 
        } 
    } 
	return matching; 
}


function dropContent (id, curfaq) {
	
		for (i=0; i<curfaq.length; i++){
			if (i != id)
				curfaq[i].style.display = "none";
				curfaq[id].style.display="block";

		}
	
}

function highlight (id, curlink) {
		for (i=0; i < curlink.length; i++) {
			if (i!=id)
			curlink[i].className ="linkArr";
			curlink[id].className ="activeArr";
		}
}
function drop (id, curfaq) {
	
		for (i=0; i<curfaq.length; i++){
			if (i != id)
				curfaq[i].style.display = "none";
				curfaq[id].style.display="block";
		}
	
}
function high (id, curlink) {
		for (i=0; i < curlink.length; i++) {
			if (i!=id)
			curlink[i].className ="links";
			curlink[id].className ="act";
		}
}
function expand(divtag)	{
	if(document.getElementById(divtag).style.display)
		document.getElementById(divtag).style.display="block";
		
	else
		document.getElementById(divtag).style.display="none";
}
//Open normal popup
function showme(the_url, the_width, the_height, the_menu) {
	if ( the_width == 0 ){
		the_width	= screen.width;
	}
	if ( the_height == 0 ){
		the_height	= screen.height;
	}

	left_val	= (the_width > 0) ? (screen.width - the_width)/2 : 0;
	top_val		= (the_height > 0) ? (screen.height - the_height)/2 - 30 : 0;
	if (top_val < 0){ top_val	= 0; }
	if (the_menu == ""){ the_menu	= "no";	}

	window.open(the_url, "", "menubar="+ the_menu +", toolbar="+ the_menu +", scrollbars=yes, resizable=yes, width="+ the_width +", height="+ the_height +", top="+ top_val +", left="+ left_val);
}

var DHTML = (document.getElementById || document.all || document.layers);
function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function mOvr(src) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor 	= 'hand';
		//src.style.fontStyle = 'italic';
		src.style.color  = '#cc6666';
	}

}
function mOut(src) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		//src.style.fontStyle = 'normal';
		src.style.color  = '#0b305c';
	}
}

function showItem(id_show)
{
	if (!DHTML) return;
	var x = document.getElementsByTagName('div');
	var sobject = new getObj(id_show);
	var temp	= sobject.style.display;
	for (var i=0;i<x.length;i++)
	{

		if (x[i].className == 'mainText')
			x[i].style.display = 'none';
	}
	sobject.style.display = temp;
	var OStatus = (sobject.style.display == 'none') ? 'block' : 'none';
	sobject.style.display = OStatus;
}

