function popit(theURL,winName,features) { 
	window.open(theURL,winName,features);
}

function changevis(divid) {
	if(document.getElementById(divid).style.display == 'block') {
		document.getElementById(divid).style.display = 'none';
	} else {
		document.getElementById(divid).style.display = 'block';
	}
}

function makevis(divid) {
	document.getElementById(divid).style.display = 'block';
}

function closevis(divid) {
	document.getElementById(divid).style.display = 'none';
}

function changeImages(name,path) {
	window.document.images[name].src = path;
}

/* Gallery-Scroller */

scrollStep			= 2;
timerLeft			= "";
timerRight			= "";

function toLeft(id){
	document.getElementById(id).scrollLeft = 0;
}

function scrollDivLeft(id){
	clearTimeout(timerRight) 
	document.getElementById(id).scrollLeft+=scrollStep
	timerRight = setTimeout("scrollDivLeft('"+id+"')",5)
}

function scrollDivRight(id){
	clearTimeout(timerLeft)
	document.getElementById(id).scrollLeft-=scrollStep
	timerLeft = setTimeout("scrollDivRight('"+id+"')",5)
}

function toRight(id){
	document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
	clearTimeout(timerRight) 
	clearTimeout(timerLeft)
}

function findPosX(obj) {
	curleft			= document.getElementById(obj).offsetLeft;
	return curleft;
}

function findPosY(obj) {
	var isIE 		= (navigator.userAgent.indexOf("MSIE") != -1) ? true : false;		// TRUE wenn IE
	var isSafari	= (navigator.userAgent.indexOf("Safari") != -1) ? true : false;		// TRUE wenn Safari
	var isOpera		= (navigator.userAgent.indexOf("Opera") != -1) ? true : false;		// TRUE wenn Opera
	if((isIE==true)||(isOpera==true)) {
		curtop		= document.getElementById(obj).offsetTop + 140;
	} else {
		curtop		= document.getElementById(obj).offsetTop;
	}
	return curtop;
}

