/**
 *
 * @access public
 * @return void
 **/
function showHelp(id, visible)
{
	if ( visible == 1 )
		document.getElementById(id).style.display = 'block';
	else
		document.getElementById(id).style.display = 'none';
}

function showcover(url)
{	fenster_c=window.open(url,"Titelseite","toolbar=no,menubar=no,location=no,scrollbar=no,height=560,width=420");
	fenster_c.focus();
	return false;
}

function popUpInfo(url, title, features)
{
	win = window.open(url, title, features);
	win.focus();
	return false;
}

var isIE = (navigator.appName.toLowerCase().indexOf('internet explorer')+1?1:0);

var fieldtip = {
	leftPos : 0,  /* used for the tip-field offset left */
	topPos : -4, /* used for the tip-field offset top */
	tipClass : 'hint', /* assumed classname for the tip, used to _find_ it */
	activeTip : null, /* used to store the active tip */
	get : function(parent) {
		for(var i = 0; i < parent.childNodes.length; i++){

			if(parent.childNodes[i].className && parent.childNodes[i].className.indexOf(this.tipClass) > -1 ){
				return parent.childNodes[i]; //found the tip, YAY!
			}//nope, keep looking then
		}
		return null;// didn't find the tip, BORK!
	},
	show : function(t){
		var _fieldTop = t.offsetTop;
		var _fieldLeft = t.offsetLeft;

		var _y = _fieldTop;
		var _x = _fieldLeft;

		this.activeTip = this.get(t.parentNode);
		var _tipHeight = this.activeTip.offsetHeight;

		var _tipCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];

		var _canvWidth = (_tipCanvas.clientWidth) ? _tipCanvas + _tipCanvas.scrollLeft : window.innerWidth + window.pageXOffset;
		var _canvHeight = (window.innerHeight) ? window.innerHeight + window.pageYOffset : _tipCanvas.clientHeight + _tipCanvas.scrollTop;

		//this.activeTip.style.width = ((this.activeTip.max_width) && (this.activeTip.offsetWidth > this.activeTip.max_width)) ? this.max_width + "px" : "auto";

		this.activeTip.style.left = (_x + this.leftPos) + "px";
		this.activeTip.style.top = (_y + this.topPos - _tipHeight) + "px";

		if (isIE) {
			this.activeTip.style.left = "0px";
		}

		/* check canvas bounds */
		if( _x + this.activeTip.offsetWidth > _canvWidth ){
			this.activeTip.style.left = (_canvWidth - this.activeTip.offsetWidth) + "px";
		}
		if( _y + this.activeTip.offsetHeight > _canvHeight ){
			this.activeTip.style.top = (_canvHeight - this.activeTip.offsetHeight) + "px";
		}

		this.activeTip.style.visibility = "visible";
	},
	hide : function(){
		if(this.activeTip != null){
			this.activeTip.style.visibility = "hidden";
			this.activeTip = null;
		}
	}

}
function redir(url)
{
	window.location.href=url;
}

function checkStatus(){
	value = window.document.getElementById("zahlungsart")[window.document.getElementById("zahlungsart").selectedIndex].value;
	if(value=="jährlicher Rechnung"){
		tb_show('Hinweis', 'http://www.intan.net/aboshop/tpl/neckermann/hinweis_rechnung.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=220&width=150', false);
	}
}

wmtt = null;

document.onmousemove = updateWMTT;

function updateWMTT(e) {
	if (document.documentElement && document.documentElement.scrollTop){
		x = (document.all) ? window.event.x + document.documentElement.scrollLeft : e.pageX;
		y = (document.all) ? window.event.y + document.documentElement.scrollTop : e.pageY;
	}else{
		x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
		y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
	}
	if (wmtt != null) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id,bild) {
	wmtt = document.getElementById(id);
	MM_swapImage(id + 'bild','',bild,1);
	wmtt.style.display = "block";
}

function hideWMTT() {
	wmtt.style.display = "none";
}

function MM_findObj(n, d) {
	var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){
		document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
	}
}