/*******************************************************/
/******** Tooltip Funktion *****************************/
/*******************************************************/
mstip = null;

document.onmousemove = updateMSTIP; 

function updateMSTIP(e) {
  if (mstip != null) {
    x = (document.all) ? window.event.x + mstip.offsetParent.scrollLeft : e.pageX;
    y = (document.all) ? window.event.y + mstip.offsetParent.scrollTop  : e.pageY;
	//mstip.style.left = (x + 14) + "px";
    mstip.style.left = (x - 164) + "px";
    mstip.style.top   = (y + 0) + "px";
  }
} 
function showMSTIP(id) {
  mstip = document.getElementById(id);
  mstip.style.display = "block"
} 
function hideMSTIP() {
  mstip.style.display = "none";
}
/*******************************************************/
/******** tr oder div farben wechsel ****************************/
/*******************************************************/

var dom 	= document.getElementById ? 1 : 0;
	var ie		= document.all ? 1 : 0;
	var opera	= (navigator.userAgent.indexOf("Opera") > -1) ? 1 : 0;
	var opera7	= (navigator.userAgent.indexOf("Opera/7") > -1) ? 1 : 0;
	var opera8	= (navigator.userAgent.indexOf("Opera/8") > -1) ? 1 : 0;
	
	var szOldRowClassname		= '';

	function rowOver(oElement, szClassname) {
		szOldRowClassname = getCssClass(oElement);
		alterClass(oElement, szClassname);
		window.clearTimeout(timer); timer = null;
	}

	function rowOut(oElement, eleId) {
		alterClass(oElement, szOldRowClassname)
		szOldRowClassname = '';
		timer = window.setTimeout("hideLang('" + eleId + "')", 1000);
	}


	function getCssClass(oElement) {
		var result = '';
		do {
			if( !(dom || ie) || (opera && !(opera7 || opera8) ) ) break;
			if(oElement) result = oElement.className;
		} while(0);

		return result;
	}


	function alterClass(oElement, szClasses) {
		result = false;
		do {
			if( !(dom || ie) || (opera && !(opera7 || opera8) ) ) break;
			if(oElement) oElement.className = szClasses;

			result = true;
		} while(0);
		return result;
	}
/*******************************************************/

var timer = null;
function showLang(eleId) {
	obj = document.getElementById(eleId);
	obj.style.display = 'block';
	if (ie && !opera) {
		switch(eleId) {
			case 'countryLanguage':
			case 'country':
				obj.style.left = '0px';
				obj.style.top = '45px';
			break;
			default:
				obj.style.left = '0px';
				obj.style.top = '25px';
			break;
		}
	}
}
function hideLang(eleId) {
	obj = document.getElementById(eleId);
	obj.style.display = 'none';
}