function runner(){window.status="" + js_standart_status + ""; return true;}
function noVal(){var noVal = null;}
//stopfollow + startfollow see see also common_dragdrop.js -> if function is not loaded the browser returns an JS error 
function stopfollow(){}function startfollow(){}
//add news to sidebar
function addToBar() {
	if(window.sidebar&&window.sidebar.addPanel)
	window.sidebar.addPanel(js_site_title,""+ js_self_main_path + "" + js_cmsroot + "sidebar.php","");
	else alert('This works for Mozilla an Compatible only.');
}
//START CHECK AND SWITCH TO FRAMESET - check this with diferent index_files (forum, show, client)
function checkFrameset(){
/*
	if(!parent.nav){
		location.href="index_frame.php?" + location.pathname + "?id=" + js_id + "&designChange=" + js_designChange + "&userview=" +  js_userview + "&checkframe=call";
}	}
if (js_designChange != null){
	if(!parent.nav){
		document.onLoad=checkFrameset() ;
}	}
if (js_start_design_switch_link != null){
	if(parent.nav){
		top.window.location.href = "../" + js_index_url + ".php?id=" + js_id + "&userview=" +  js_userview + "&designChange=" + js_profile_defaultDesignSelect + "";
	}
	else{
		window.location.href = "" + js_start_design_switch_link + "";
}	
*/	}
//END CHECK AND SWITCH TO FRAMESET
//START HIDE/SHOW DIV
var divId = null;
var div_mode = "hidden";
//get Div Id 
function getdiv(id) {
	if (document.all)
		return document.all(id);
	if (document.layers)
		return document.layers[id];
	if (document.getElementById)
		return document.getElementById(id);
}
//returns div style
function getdivStyle(id) {
	if (document.layers)
		return getdiv(id);
	if (document.all || document.getElementById)
		return getdiv(id).style;
}
// hide Div
function hidediv(id) {
	if (document.all){
		document.getElementById(id).style.visibility = "hidden";
		
	}
	else{
		getdivStyle(id).visibility = "hidden";
}	}
// get_actual opend div
function hidedivactual(){
	
	if (divId != null)
		hidediv(divId);
}
function hidethisdiv(getid){
	hidediv(getid);
}
//get div and show/hide div
function showdiv(id){
	if (document.all){
		div_mode = document.getElementById(id).style.visibility;
	}
	else{
		div_mode = getdivStyle(id).visibility;
	}
	if (div_mode == "visible"){
	
		if (document.all){
			document.getElementById(id).style.visibility = "hidden";
		}
		else{
			getdivStyle(id).visibility = "hidden";
		}
		divId = id;
	}
	else{
		hidedivactual();
		divId = id;
		if (document.all){
			document.getElementById(id).style.visibility = "visible";
			document.getElementById(id).style.zIndex = "1001";
		}
		else{
			getdivStyle(id).visibility = "visible";
			document.getElementById(id).style.zIndex = "1001";
}	}	}
//END HIDE/SHOW DIV
//START CHEAT FIEDLS
var trClick = false;
function cheatOver(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_cheatOver;
}
function cheatOut(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_cheatOut;
}
function cheatOverMarked(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_cheatOverMarked;
}
function cheatOutMarked(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_cheatOutMarked;
}
function cheatOutDbl(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_inputCollor;
}
function cheatOutlistRowHeader(num, xx, yy) {
	  if (!document.getElementById) return;
	  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	  td.style.backgroundColor = js_design_listRowHeader;
}
function cheatTrLightOver (num, xx, yy) {
  if (!document.getElementById) return;
  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
  td.style.backgroundColor = js_design_table_row_lightOver;
}
function cheatTrLightOut(num, xx, yy) {
  if (!document.getElementById) return;
  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
  td.style.backgroundColor = js_design_table_row_light;
}
function cheatTrUnLightOver (num, xx, yy) {
  if (!document.getElementById) return;
  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
  td.style.backgroundColor = js_design_table_row_unlightOver;
}
function cheatTrUnLightOut(num, xx, yy) {
  if (!document.getElementById) return;
  var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
  td.style.backgroundColor = js_design_table_row_unlight;
}
function cheatHeaderOver(num, xx, yy){
	if (!document.getElementById) return;
	var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	td.style.backgroundColor = js_design_cheatHeaderOver;
}
function cheatHeaderOut(num, xx, yy){
	if (!document.getElementById) return;
	var td = document.getElementById('cheatTd' + num + '_' + xx + '_' + yy);
	td.style.backgroundColor = js_design_cheatHeaderOut;
}
var act_id = js_id;
var high_id = null;
function unlightall(yy, get_id){
	var td_1 = document.getElementById('cheatTd1_1_' + yy);
	var td_2 = document.getElementById('cheatTd1_2_' + yy);
	var td_3 = document.getElementById('cheatTd1_3_' + yy);;
	td_1.style.backgroundColor = js_design_topnavBg;
	td_2.style.backgroundColor = js_design_topnavBg;
	td_3.style.backgroundColor = js_design_topnavBg;
	high_id = get_id;
}
if (!high_id){var high_id = act_id;}	
//END CHEAT FIELDS
/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var defaultMenuWidth="210" //set default menu width.
var linkset=new Array()
////No need to edit beyond here
var ie5=document.all && !window.opera
var ns6=document.getElementById

//onMouseout="dynamichide(event)"
if (ie5||ns6){
	document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onClick="dynamichide(event)" style="z-index:100;"></div>')
}
function iecompattest(){
	return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}
var clickmode = 1;
var isclicked = 0;
var deakt_divhide = '0';
function showmenu(e, which, optWidth, nodivclick){
	
	if (nodivclick == 1 && nodivclick != ''){
		deakt_divhide = 1;
	}
	else{
		deakt_divhide = 0;
	}
	if (clickmode == 1){
	
	if (!document.all&&!document.getElementById)
	return
	clearhidemenu()
	menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
	menuobj.innerHTML=which
	menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
	menuobj.contentwidth=menuobj.offsetWidth
	menuobj.contentheight=menuobj.offsetHeight
	eventX=ie5? event.clientX : e.clientX+10
	eventY=ie5? event.clientY : e.clientY+10
	//Find out how close the mouse is to the corner of the window
	var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
	var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
	//if the horizontal distance isn't enough to accomodate the width of the context menu
	if (rightedge<menuobj.contentwidth)
		//move the horizontal position of the menu to the left by it's width
		menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
	else
	//position the horizontal position of the menu where the mouse was clicked
		menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
	//same concept with the vertical position
	if (bottomedge<menuobj.contentheight)
		menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
	else
		menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
		menuobj.style.visibility="visible"
	//return false
	clickmode = 0;
	isclicked = 1;

	}
	else{
		if (clickmode == 0){
		clickmode = 1;
		isclicked = 0;
		hideusermenu()
		}
	}
}
function showmenus(ev, which, optWidth){
setTimeout("showmenu(ev, which, optWidth)",100000)
}
function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
	while (b.parentNode)
	if ((b = b.parentNode) == a)
	return true;
	return false;
}
function hideusermenu(){
	clickmode = 1;
	if (window.menuobj)
	menuobj.style.visibility="hidden"
}
function hideusermenu_click(){
	clickmode = 1;
	if (window.menuobj){
	//delayhide=setTimeout("hideusermenu()",3000)
	//menuobj.style.visibility="hidden"
	}
}
function dynamichide(e){
	clickmode = 1;
	if (deakt_divhide != '1'){
	hideusermenu()
	if (ie5&&!menuobj.contains(e.toElement))
	setTimeout("hideusermenu()",2500)
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
	setTimeout("hideusermenu()",2500)
	}
	//
}
function delayhidemenu(){
	clickmode = 1;
	
	//if (window.menuobj){
	//delayhide=;
	//}
	//delayhide=setTimeout("hideusermenu()",2500)
}
function clearhidemenu(){
	clickmode = 1;
	if (window.delayhide)
	clearTimeout(delayhide)
}
//	if (ie5||ns6)
//document.onClick=hideusermenu

//END USER_OPTIONS POP MENU
//START WORD COUNTER
//used in a lot of docs with limited word entrys in textfields
var submitcount=0;
function checkSubmit() {
	if (submitcount == 0){
		submitcount++;
		document.updaten.submit();
}	}
function wordCounter(field, countfield, maxlimit) {
	wordcounter=0;
	for (x=0;x<field.value.length;x++) {
		if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ")  {wordcounter++}  // Counts the spaces while ignoring double spaces, usually one in between each word.
		if (wordcounter > 250) {field.value = field.value.substring(0, x);}
		else {countfield.value = maxlimit - wordcounter;}
}	}
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit){
		field.value = field.value.substring(0, maxlimit);
		//field.value = field.value.substring(0);
	}
	else{
	countfield.value = maxlimit - field.value.length;
	//countfield.value = field.value.length;
}	}
//END WORD COUNTER
//START ROLL IMAGE
var wechsel1;
var newname;
var oldname;
function rollImage (name){
	oldname = name.src;
	newname = oldname.replace(/_hover.gif/,"_click.gif");
	name.src = newname;
	wechsel3 = true;
}
var wechsel2;
function unrollImage (name){
	oldname = name.src;
	newname = oldname.replace(/_click.gif/,".gif");
	name.src = newname;
	wechsel2 = true;
}	
var wechsel3;
function hoverImage (name){		
	oldname = name.src;
	newname = oldname.replace(/.gif/,"_hover.gif");
	name.src = newname;
	wechsel3 = true;
}
var wechsel4;
function unhoverImage (name){
	oldname = name.src;
	newname = oldname.replace(/_hover.gif/,".gif");
	name.src = newname;
	wechsel4 = true;
}	 
var wechsel5;
function rollActiveImage (name){
	oldname = name.src;
	newname = oldname.replace(/.gif/,"_click.gif");
	name.src = newname;
	wechsel5 = true;
}
var wechsel6;
function unrollActiveImage (name){
	oldname = name.src;
	newname = oldname.replace(/_click.gif/,".gif");
	name.src = newname;
	wechsel6 = true;
}	
var wechsel7;
function hoverActiveImage (name){		
	oldname = name.src;
	newname = oldname.replace(/_active.gif/,".gif");
	name.src = newname;
	wechsel7 = true;		
}
var wechsel8;
function unhoverActiveImage (name){
	oldname = name.src;
	newname = oldname.replace(/.gif/,"_active.gif");
	name.src = newname;
	wechsel8 = true;
}
//END ROLL IMAGE
//START POP UPS - SEE jscripts/awf_emit_js.inc for global vars in following functions
function view(site, winnames, widthf, heightf, avaril){
	if (!widthf){widthf = 750;}
	if (!heightf){heightf = 400;}
	if (!winnames){winnames = 'elvis';}
	var helpWin;
	if (!avaril){avaril = 'yes'}
  	helpWin = window.open(site, winnames, 'resizable=yes,dependent=' + avaril + ',scrollbars=yes,menubar=no,location=no,status=yes,width='+ widthf +',height='+ heightf);
  	x = + 20;
	y = + 245;
  	helpWin.moveTo(x,y);
  	helpWin.self.focus();
}
// -->
//Layer Bild
function viewPop(site, widthf, heightf, winnames){
	if (!widthf){widthf = 750;}
	if (!heightf){heightf = 400;}
	if (!winnames){winnames = 'elvis';}
	var popWin;
	popWin = window.open(site, winnames, 'location=no,status=yes,dependent=yes,resizable=yes,scrollbars=yes,menubar=yes,width='+ widthf +',height='+ heightf);
   	var w;
   	var h;
   	w = widthf;
   	h = heightf;
   	popWin.resizeTo(w, h);
   	x = + 215;
	y = + 255;
	popWin.moveTo(x,y);
	popWin.self.focus();
}
function viewUserdata(user_id, subject, project_id){
	var messageWin;
	if (subject && subject != 0){
		messageWin = window.open("root_doc.php?target=message&docinput[lang]=" + js_lang + "&session_passwd=" + js_session_passwd +"&session_userid=" + js_session_userid + "&send_message=" + user_id +"&subject=AW: " + subject,  "SendInstantMessage", "width=500,height=320,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no");
	}
	else{
		if (!project_id){project_id = '-1';}
		messageWin = window.open("root_doc.php?target=message&docinput[lang]=" + js_lang + "&session_passwd=" + js_session_passwd +"&session_userid=" + js_session_userid + "&userview=userdata&search=&user=" + user_id + "&projectkey=" + project_id,  "SendInstantMessage", "width=500,height=320,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no");
	}
	x = + 215;
	y = + 245;
	messageWin.moveTo(x,y);
}
function sendmessage(user_id, subject, aw){
	var messageWin;
	if (subject && !aw){
		subject = "AW: " + subject;
	}
	if (subject && aw){
		subject = aw + ": " + subject;
	}
	if (subject){
		messageWin = window.open("root_doc.php?target=message&docinput[lang]=" + js_lang + "&session_passwd=" + js_session_passwd +"&session_userid=" + js_session_userid + "&send_message=" + user_id +"&subject=" + subject,  "SendInstantMessage", "width=500,height=320,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no");
	}
	else{
		messageWin = window.open("root_doc.php?target=message&docinput[lang]=" + js_lang + "&session_passwd=" + js_session_passwd +"&session_userid=" + js_session_userid + "&send_message=" + user_id,  "SendInstantMessage", "width=500,height=320,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no");
	}
	x = + 215;
	y = + 245;
	messageWin.moveTo(x,y);
}
function sendicqmessage(user_id){
	icqWin = window.open("root_doc.php?target=message&session_passwd=" + js_session_passwd +"&session_userid=" + js_session_userid + "&type=icq&send_message=" + user_id, "SendInstantMessage", "width=500,height=300,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no");
	x = + 215;	
	y = + 245;
	icqWin.moveTo(x,y);
}

function view_dir(site, name, wi, hi, men, avarel, res){
	var dirWin;
	if (!avarel){avarel = 'no';}
	if (!res){res = 'yes';}
	if (js_admin_pop_editmode == '1'){
		var locutus = 'yes';
		var weareborg = 'yes';
	}
	else{
		var locutus = 'no';
		var weareborg = 'no';
	}
  	dirWin = window.open(site, name, 'resizable=' + res + ',dependent=' + avarel +',scrollbars=yes,menubar=' + men +',location='+ locutus +',status='+ weareborg +',width=' + wi + ',height=' + hi +'');
  	x = + 200;
	y = + 220;
  	dirWin.moveTo(x,y);
  	dirWin.self.focus();
}

function view_modal_dir(site, name, wi, hi, men, avarel, res){
	var dirWin;
	if (!avarel){avarel = 'no';}
	if (!res){res = 'yes';}
	if (js_admin_pop_editmode == '1'){
		var locutus = 'yes';
		var weareborg = 'yes';
	}
	else{
		var locutus = 'no';
		var weareborg = 'no';
	}
	var porgramm_modal_bg = document.getElementById('porgramm_modal_bg');
	var programm_modal_div = document.getElementById('programm_modal_div');
	var programm_modal_frame = document.getElementById('programm_modal_frame');
	porgramm_modal_bg.style.display = 'block';
	programm_modal_div.style.display  = 'block';
	programm_modal_frame.style.display  = 'block';
	

	programm_modal_frame.style.width = wi;
	programm_modal_frame.style.height = wi;
	
	programm_modal_frame.src=site;
  	/*dirWin = window.open(site, name, 'resizable=' + res + ',dependent=' + avarel +',scrollbars=yes,menubar=' + men +',location='+ locutus +',status='+ weareborg +',width=' + wi + ',height=' + hi +'');
  	x = + 200;
	y = + 220;
  	dirWin.moveTo(x,y);
  	dirWin.self.focus();
	*/
}
function open_mail_window(){
	var mailWin;
	mailWin = window.open("root_doc.php?target=mailsite&id=" + js_mail_id + "&docinput[lang]=" + js_lang + "&action=send_email&index_mode=" + js_index_mode + "",  "SendSite", "width=620,height=450,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no");
	x = + 215;
	y = + 245;
	mailWin.moveTo(x,y);
}
function viewGroupdata(group_id){
	if (js_multi_session_status == 'ok'){
		group_win = window.open("root_doc.php?target=group_profile&group_id=" + group_id + "",  "Groupprofile", "width=620,height=450,dependent=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no");
		x = + 215;
		y = + 245;
		group_win.moveTo(x,y);
}	}
function open_print_window(node_id, params){
	var printableWin; 
	if (!node_id){
		printableWin = window.open("" + js_print_link + "", "print","width=800,height=400,dependent=yes,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes,status=yes,location=no");
	}
	else{
		printableWin = window.open(""+ js_index_url +".php?id=" + node_id +"&" + params + "&docinput[design]=" + js_design_theme + "_printable" + js_and_first_item + "", "print","width=800,height=400,dependent=yes,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes,status=yes,location=no");
	}
   	x = + 0;
	y = + 245;
	printableWin.moveTo(x,y);
}
function open_pdf_window(id){
	var get_p; 
	scrW = screen.width-100;
	scrH = screen.height-200;
	get_p = window.open("root_doc.php?target=index_pdf&id=" + id + "&mode=" + js_index_mode + "", "pdf","width=" + scrW + ",height=" + scrH + ",dependent=yes,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes,status=yes,location=no");
	x = + 0;
	y = + 245;
	get_p.moveTo(x,y);
}
//END POPUPS
//start popup for language layer
    var zindex=1000;
	var ns4=document.layers;
	var ns6=document.getElementById&&!document.all;
	var ie4=document.all;
	var opr=navigator.userAgent.indexOf("Opera");
	var run='go';
	var i;
	var themenuStyle;
	var themenuoffsetX;
	var themenuoffsetY;
	var hiddenconst;
	var themenu;
	var curmenuID;
	function dropit(e,whichone,pos, pos_y){
		if (!pos_y){pos_y = 13;}
		curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
		if (window.themenu&&themenu.id!=curmenuID)
		themenuStyle.visibility=ns4?"hide" : "hidden"
		themenu=ns6? document.getElementById(whichone): eval(whichone)
		themenuStyle=(ns6||ie4)? themenu.style : themenu
		themenuoffsetX=(ie4&&opr==-400)? document.body.scrollLeft : -pos
		themenuoffsetY=(ie4&&opr==-15)? document.body.scrollTop : 15
		themenuStyle.left=ns6||ns4? e.pageX-e.layerX-pos : themenuoffsetX+event.clientX-event.offsetX+420
		themenuStyle.top=ns6||ns4? e.pageY-e.layerY+pos_y : themenuoffsetY+event.clientY-event.offsetY+3
		hiddenconst=(ns6||ie4)? "hidden" : "hide";
		if (themenuStyle.visibility==hiddenconst){
			themenuStyle.visibility=(ns6||ie4)? "visible" : "show";
			themenuStyle.zIndex=zindex++;
		}
		else{
			hidemenu()
			//return false
	}	}
	function hidemenu(){
		if ((ie4||ns6)&&window.themenu)
		themenuStyle.visibility="hidden"
		else if (ns4)
		themenu.visibility="hide"
	}
	if (ie4||ns6)
	document.onclick=hidemenu;
	//end popup for language layer

