

// Jah stuff
function jah(url,target) {
	new Ajax.Updater(target, url, 
		{ method: 'get',
		  evalScripts: true }
		  );
}	

//******************************************************************************
// roberthilbe.com Basic Javascripts
// Author:   Robert Hilbe
// Version:  9 September 2005
//******************************************************************************/

/******************************************************************************
 showandhide: Shows or Hides an Element
******************************************************************************/

function showandhide(Id) {
	if (document.getElementById) {
		target = document.getElementById(Id);
		if (target.style.display == "none" || target.style.display == "") {
			target.style.display = "block";
		} else {
			target.style.display = "none";
		}
	}
}

/******************************************************************************
 show: Zeigt ein Element
******************************************************************************/

function show(Id) {
	if (document.getElementById) {
		target = document.getElementById(Id);
		target.style.display = "block";
	}
}

/******************************************************************************
 hide: Verbirgt ein Element
******************************************************************************/

function hide(Id) {
	if (document.getElementById) {
		target = document.getElementById(Id);
		target.style.display = "none";
	}
}

/******************************************************************************
 setStyle: Setzt eine bestimmte CSS-Eigenschaft eines Elements fest
******************************************************************************/

function setStyle(id, property, value) {
	var object = document.getElementById(id);
	if(object != null) {
		var styleObject = object.style;
		if(styleObject[property] = value) return true;
	}
	else return false;
}

/******************************************************************************
 move: Positioniert einen div neu
******************************************************************************/

function move(id,top,left) {
	styleObject = document.getElementById(id).style;
	if(styleObject) {
		if (!isNaN(top))
			top = top + 'px';
		styleObject.top = top;
		if (!isNaN(left))
			left = left + 'px';
		styleObject.left = left;
		}
	}


/******************************************************************************
 targetId: sends a target div the content to an ID div
******************************************************************************/

function targetId(Target,Id){
	document.getElementById(Target).innerHTML = document.getElementById(Id).innerHTML;
}


