function open_livechat (h) {
	window.open('./livechat/livechat.php?h='+h,'Live-Chat','width=660,height=420,dependent=yes,hotkeys=no,location=no,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no');
}

function open_popup (t) {
	window.open('/'+t+'.php',t,'width=400,height=400,dependent=yes,hotkeys=no,location=no,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no');
}

function open_agb () {
	window.open('/agb.php','AGB','width=420,height=400,dependent=yes,hotkeys=no,location=no,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no');	
}

function open_admininterface (pid) {
	window.open ('/admin.php?pid=' + pid,'Admininterface','width=819,height=579,dependent=yes,hotkeys=yes,location=no,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no');
}

function open_rateform(id,s) {
	window.open ('/rate.php?id=' + id + '&s='+s,'Bewerten','width=400,height=150,dependent=yes,hotkeys=yes,location=no,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no');
}

function open_pms(empf,pmid) {
	window.open ('/send_pm.php?rid=' + empf + '&pmid='+pmid,'PM','width=420,height=380,dependent=yes,hotkeys=yes,location=no,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no');	
}

function show_id (id) {
	sie = document.getElementById(id);
	sie.style.visibility = 'visible';
	sie.style.display = '';
}

function hide_id (id) {
	sie = document.getElementById(id);
	sie.style.visibility = 'hidden';
	sie.style.display = 'none';
}

function j_tf() {
	args = j_tf.arguments;
	if (args.length==0)
		return "";
	text = args[0];
	for(i=1;i<args.length;i+=2) {
		searchs = "%"+args[i]+"%"; replaces = args[i+1];
		text = text.replace(searchs,replaces);		
	}
	return text;
}

function show_set(set_id) {
	i=0;
	do {
		if (i!=0) {
			e.style.visibility = 'visible';
			e.style.display = '';
		}
		e = document.getElementById(set_id+'_'+i);
		i++;
	} while (e != null);	
}

function hide_set(set_id) {
	i=0;
	do {
		if (i!=0) {
			e.style.visibility = 'hidden';
			e.style.display = 'none';			
		}
		e = document.getElementById(set_id+'_'+i);
		i++;
	} while (e != null);
}

