function showMe(id)
{
	ele=document.getElementById("inhalt"+id);

	if(ele.style.display=="none")
		ele.style.display="inline";
	else
		ele.style.display="none";
}
function $(id){
if (document.getElementById(id)==null)
	return document.getElementsByName(id)[0];
else
	return document.getElementById(id);}
function $Ta(id,t)
{$(id).innerHTML+=t;}

function getStyle(sel,attr)
{
    if(!document.styleSheets) return null;
    var ret = "";
    attr=attr.toLowerCase();
    for(var i = 0; i < document.styleSheets.length; i++)
    {
        var rules = document.styleSheets[i].rules ? document.styleSheets[i].rules : document.styleSheets[i].cssRules;
        for(var j = 0; j < rules.length; j++) 
        {
        	if (rules[j].selectorText.search(sel)!=-1)
        	{
	         	cssText=rules[j].style.cssText;
	        	cssText=cssText.split(";");
	        	var cssRules={};
	        	for(var k=0;k<cssText.length;k++)
	        	{
	        		rul=cssText[k].split(":");
	        		cssRules[rul[0].toLowerCase()]=rul[1];
	        	}       	
        		for (rul in cssRules)
	        		if(rul.search(attr)!=-1)
	        			ret=cssRules[rul];
        	}
		}
    }
    if(ret!="") 
		return ret; 
	else
		return false;
}

String.prototype.ltrim = function (atr) {
  if (atr)
    return this.replace(new RegExp('^['+atr+']+'),'');
  return this.replace(/^\s+/,'');
}
String.prototype.rtrim = function (atr) {
  if (atr)
    return this.replace(new RegExp('['+atr+']+$'),'');
  return this.replace(/\s+$/,'');
}
String.prototype.trim = function (atr) {
  if (atr)
    return this.ltrim(atr).rtrim (atr);
  return this.ltrim().rtrim();
};
function strCount(hayst,needl)
{
	var ret=hayst.split(needl);
	ret=ret.length;
	return ret;
}
Array.prototype.remove = function(pos) {
	for (var x = 0; x < this.length; ++x) {
		if (x >= pos) 
			this[x] = this[x + 1];
	} this.pop();
};

