////////////////////////////////////////////////////////////////////////
//
//   NET Orga Haupt JS Funktionen
//   (c)NetOrga.de
//
//
////////////////////////////////////////////////////////////////////////

function clan_info(id){
    clan = window.open('/party/clan_details.php?clan='+id,'clandetails','width=750, height=300, scrollbars=yes, resizable=yes');
}

function ask_before_forward(question, location) {
       Check = confirm(question);
       if (Check == true) {
              window.location.href = location;
       }
} // end func ask_before_forward

function show_banner_example(id,w,h){
  	
	 example = window.open('/orga/banner_example.php?id='+id,'example','width='+w+', height='+h);	
}

function show_foren_mods(id){
  	
	 mods = window.open('/board/list_mod.php?id='+id,'example','width=500, height=400');	
}

function PopupBeforeForward(team,mirror){
   
    pop = window.open('/party/download_popup.php?team='+team+'&mirror='+mirror,'pop','width=480, height=70');	
}


var aktiv = Array();

var bName=navigator.appName;
var bVer=parseInt(navigator.appVersion);
var NS4=(bName=="Netscape" && bVer>=4);
var IE4=(bName=="Microsoft Internet Explorer" && bVer>=4);
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
var LS_UserValid = 0;

function add_text(element_name , wert) {
	document.getElementsByName(""+element_name)[0].focus();
	if (win_ie_ver >= 5.5) {
		sel = document.selection.createRange();
		sel.text = wert;
	} else {
		document.getElementsByName(""+element_name)[0].value += wert;
	}
}

function show_board_list_layer(num) {
	el = document.getElementById("board_list_layer_"+num);
	if (aktiv[num]) window.clearTimeout(aktiv[num]);
	if (el) {
		el.style.display = '';
	}
}

function hide_board_list_layer(num) {
	el = document.getElementById("board_list_layer_"+num);
	if (el) {
		el.style.display = 'none';
	}
}

function set_board_list_layer_timeout(num) {
	aktiv[num] = window.setTimeout("hide_board_list_layer("+num+")", 3000);
}

function disable_submit_button(counter) {
	document.getElementsByName("submit_button")[counter].disabled = true;
}

function enable_submit_button(counter) {
	document.getElementsByName("submit_button")[counter].disabled = false;
}

function SmallWindow(url) {
	window.open(url, "phpinc_small_window", "scrollbars=yes,toolbar=no,width=710,height=400,resize=no,menubar=no, left=10,top=10")
}

function show_members_at_lan(party,clan){
		window.open('http://www.netorga.de/party/clanlist_members_at_lan.php?party=' + party + '&clan='+clan, "members_at_lan", "scrollbars=yes,toolbar=no,resize=no,menubar=no")
}

  function contact_user_id(id){
       user = window.open('http://www.netorga.de/party/user_detail.php?uid='+id,'contact','width=600, height=500, scrollbars=yes, resizable=yes');
  }

    function contact_gast_id(id){
       user = window.open('http://www.netorga.de/party/user_detail.php?gid='+id,'contact','width=600, height=500, scrollbars=yes, resizable=yes');
  }

function switch_news(id){

    if (document.getElementById("news_" + id).style.display == 'none')
    {
    document.getElementById("news_" + id).style.display = "";
    document.getElementById("news_pic_" + id).src = "http://www.netorga.de/images/minus.gif";
    }
    else
    {
    document.getElementById("news_" + id).style.display = "none";
    document.getElementById("news_pic_" + id).src = "http://www.netorga.de/images/plus.gif";

    } // bedinung
  } // function
  
function insert_cms_content(inhalt){
   cmsBrowser =  window.open('http://www.netorga.de/orga/cms_media_browser.php?sentback='+inhalt,'cmsBrowser','width=300, height=600, scrollbars=yes, resizable=yes, dependent=yes');
}

function reload_captcha(){
  document.getElementById('captcha_element').src='/captcha.php?random='+Math.random();

}