var id = "";
var info_txt = new Array("kontakt","notiz");
var tmp = "";
var tmp2 = "";
var show = false;

function getObject(obj) {
	if(document.all) {
		if(typeof obj=="string") {
			return document.all(obj);
		} else {
			return obj.style;
		}
	} 
	if(document.getElementById) {
		if(typeof obj=="string") {
			return document.getElementById(obj);
		} else {
			return obj.style;
		}
	}
	return null;
}

function count(obj, maxlength, counterobj)
{
	var a=getObject(obj).value.length;
	var b=maxlength-a;
	if (b<0)
	{
		b=0;
		getObject(obj).value=getObject(obj).value.substr(0, maxlength);
	}
	getObject(counterobj).innerHTML=b + "/" + maxlength + " Zeichen";
}
function show_info_txt(id)
{
	document.getElementById("info_txt").style.display = "none";
	for(i=0;i<info_txt.length;++i)
	{
		tmp = "info_txt_" + info_txt[i];
		tmp2 = info_txt[i];
		if (info_txt[i] == id)
		{
			self.document.images[tmp2].src="http://bilder.webpool.de/_img/agentur/all_" + info_txt[i] + "p.gif";
			document.getElementById("info_txt").style.display = "block";
			document.getElementById(tmp).style.display = "block";
		}else
		{
			self.document.images[tmp2].src="http://bilder.webpool.de/_img/agentur/all_" + info_txt[i] + ".gif";
			document.getElementById(tmp).style.display = "none";
		}
	}
}
function show_msg_wdw(id,show)
{
	if(show)
		tmp = "block";
	else
		tmp = "none";
	document.getElementById(id).style.display = tmp;
}
function finfo(id,show)
{
	if(show == 1)
		tmp = "block";
	else
		tmp = "none";
		
	document.getElementById(id).style.display = tmp;
}

var xmlHttp = null;
// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}
if (!xmlHttp) {
    // Internet Explorer 6 und älter
    try {
        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
        try {
            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(e) {
            xmlHttp  = null;
        }
    }
}
function OpenWindow(URL,wdwName,w,h,x,y) 
{
	if (!wdwName) {wdwName = "msgWindow";}
	if (!x) {x = 10;}
	if (!y) {y = 10;}
	if (!w) {w = 475;}
	if (!h) {h = 440;}
	var param = "screenX=" +x+ ",screenY=" +y+ ",width=" +w+ ",height=" +h+ ",resizable=yes,scrollbars=yes";
	var myWindow = window.open(URL,wdwName,param);
	if (!myWindow.opener) myWindow.opener = self;		
	if (myWindow.focus != null) myWindow.focus();
}