function popupOpen() {		// parameter.reihenfolge: URL, WIDTH, HEIGHT
	var w,h,url,aw,ah;
	var a=popupOpen.arguments;
	if (a.length==0) return;
	url=a[0];
	if (a.length>1) {
		w=a[1]; h=a[2];
	}
	else {
		w=500; h=400
	}
	win=window.open(url,'win_front','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+w+',height='+h);
	if (screen) {
		aw=screen.availWidth;
		ah=screen.availHeight;
		win.moveTo(((aw/2)-(w/2)),((ah/2)-(h/2)));
	}
	win.focus();
}

function openPicture() {		// parameter.reihenfolge: URL, WIDTH, HEIGHT
	var w,h,url,aw,ah;
	var a=openPicture.arguments;
	if (a.length==0) return;
	url=a[0];
	if (a.length>1) {
		w=a[1]; h=a[2];
	}
	else {
		w=500; h=400
	}
	win_pic=window.open(url,'win_pic','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+w+',height='+h);
	if (screen) {
		aw=screen.availWidth;
		ah=screen.availHeight;
		win_pic.moveTo(((aw/2)-(w/2)),((ah/2)-(h/2)));
	}
	win_pic.focus();
}

function detectIframe() {
	result = parent.length ? true : false;
	parent.scrollTo(0,0);
	var url= document.URL;
	var index= url.indexOf('index.php5') != -1 ? 'index.php5' : 'index.php';
	var base= url.substr(0,url.indexOf('index.php'))
	if (!result) location.href= base+index+"?iframe="+escape(url);
	else parent.document.title=document.title;
}

var obj_to_hide=new Array();
var hids=new Array();
Array.prototype.in_array=function(s) {
	for (var i=0; i<this.length; i++) {
		if (s==this[i]) return i;
	}
	return -1;
}

function show(obj) {
	var op=obj_to_hide.in_array(obj);
	if (op != -1) {
		clearTimeout(hids[op]);
		obj_to_hide[op]=false;
	}
	else {
		if (obj.className.indexOf('over') == -1) {
			obj.className+=' over';
		}
	}
}

function hide(obj) {
	obj_to_hide[obj_to_hide.length]=obj;
	hids[hids.length]=setTimeout('exec_hide('+(obj_to_hide.length-1)+')',200);
}

function exec_hide(i) {
	obj_to_hide[i].className=obj_to_hide[i].className.replace(' over', '');
	obj_to_hide[i]=false;
	clearTimeout(hids[i]);
}
