function mailThingy(lnk,mb){
	lnk.href="ma" + "ilto" + ":" + mb + String.fromCharCode(64)
		+ "hivandmore.de"
}



function mapHi(n){
	theImg=document.getElementById ? document.getElementById("deMap")
		: document.images ? document.images["deMap"] : false
	if(theImg) theImg.src="/images/map" + n + ".gif"
}

function mapLo(){
	theImg=document.getElementById ? document.getElementById("deMap")
		: document.images ? document.images["deMap"] : false
	if(theImg) theImg.src="/images/mapall.gif"
}


function loadMapImages(){
	mapImgLst=new Array()
	for(var i=0; i<10 ;i++){
		mapImgLst[i]=new Image()
		mapImgLst[i].src="/images/map" + i + ".gif"
	}
}


function popWin(loc,winName,w,h){
	dims="resizable=yes,scrollbars=yes"
	if(w)dims+=",width="+w
	if(h)dims+=",height="+h
	window.open(loc,winName,dims)
}



function _id(n){
	return document.getElementById(n)
}


function getElmLeft(elm){return elm ? elm.offsetLeft + getElmLeft(elm.offsetParent) : 0}
function getElmTop(elm){return elm ? elm.offsetTop + getElmTop(elm.offsetParent) : 0}
function getElmHeight(elm){	return elm.offsetHeight }
function getElmWidth(elm){return elm.offsetWidth}
function killBubble(e){
	if(!e)e=event
	if(!e)return false
	if(e.stopPropagation)e.stopPropagation()
	else e.cancelBubble=true
}
function getScrollY() {
  return typeof( window.pageYOffset ) == 'number' ? window.pageYOffset
    	: document.body && document.body.scrollTop ? document.body.scrollTop
    	: document.documentElement.scrollTop
}

function getEventTarget(e){
	return e.srcElement ? e.srcElement : e.target ? e.target : null
}





/*########### interview player popup ################*/


function playInterviewPopup(url,noSp, dims){
	if(!noSp) document.write("&nbsp;&nbsp;&nbsp;")
	document.write("<a href='javascript:void(0)' onclick='openInterview(\""
		+ url + "\"" 
		+(dims ? ",\"" + dims + "\"" : "")
		
		+ ")'><img src='/images/button_audio.gif' class='playAudio'>Interview abspielen</a>")
}

function closeIVWin(){
	if(window.ivWin && !window.ivWin.closed)window.ivWin.close()
}
function openInterview(url,dims){
	var tDims=dims ? dims : "width=350,height=250"
	closeIVWin()
	ivWin=window.open(url + ".htm", "ivWin", tDims)
}


/*########### etc, diagnostic ################*/

function showElm(e){
	e = e ? e : window.event
	trgt=getEventTarget(e)
	if(!trgt) return false
	var str =""
	var par=trgt 
	while (par && par.tagName!="BODY") {
		str +=	par.tagName 
			 + ( par.className ? " : (" + par.className + ") " : "" )
			 + (par.id? " [ #" + par.id + " ]" : "")
			 + " > "
		par=par.parentNode

	}
	
	window.defaultStatus=str
	return true
}
	


/* ####### COOKIES ######## */

function setCookie(name, value, expire, path){
	var str= name + "=" + escape(value)
	if(expire) str +="; EXPIRES=" + expire.toGMTString()
	var path=path?path:"/"
	str += "; PATH=" + path
	document.cookie = str
}

function getCookie(cname){
	var search = cname + "="
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) {
			offset += search.length
			end = document.cookie.indexOf(";", offset)
			if (end == -1) end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		}
	}
}


//document.write("<sc" + "ript type='text/javascript' src='/scripts/design_tools/include_designer.js'></sc" + "ript>")