<!--
//parts of the AJAX script are integrated into template.inc.php for language-support -smiley

// XMLHttpRequest global instance 
var xmlHttp = false; 
 
// create XMLHttpRequest
// ... for Internet Explorer 
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
 
// ... for Mozilla, Opera and Safari etc.
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}

//all purpose request-function by smiley (to be improved ;)
function loadData(load_param, div, guid) { 
if (xmlHttp) { 
xmlHttp.open('GET', 'index.php?' + load_param + guid, true); 
xmlHttp.onreadystatechange = function () { 
if (xmlHttp.readyState == 4) { 
document.getElementById(div + guid).style.display="block";
document.getElementById(div + guid).innerHTML = xmlHttp.responseText; } }; 
xmlHttp.send(null); } } 

//another all purpose request-function by smiley
function loadStuff(load_param, src_id, dst_id) { 
if (xmlHttp) { 
xmlHttp.open('GET', 'index.php?' + load_param + document.getElementById(src_id).value, true); 
xmlHttp.onreadystatechange = function () { 
if (xmlHttp.readyState == 4) { 
document.getElementById(dst_id).value = xmlHttp.responseText; } }; 
xmlHttp.send(null); } } 


//check server-function
function checkServer(ip,port,dns,response_div) { 
if (xmlHttp) { 
xmlHttp.open('GET', 'index.php?rpc=check_server&ip='+ document.getElementById(ip).value + '&port='+ document.getElementById(port).value + '&dns='+ document.getElementById(dns).value, true); 
xmlHttp.onreadystatechange = function () { 
if (xmlHttp.readyState == 4) { 
document.getElementById(response_div).value = xmlHttp.responseText; } }; 
xmlHttp.send(null); } } 

//select auto-jump
function Go(x){
	 url=x;
	 if(x != "") parent.location.href = url;
}

//clear text-inputs onclick - by MopAn
function settext(Feld,def_text){
	if(document.shoutbox.elements[Feld].value == def_text){
		document.shoutbox.elements[Feld].value = ''; 
	}
}
//slightly changed to get more flexible
function settextID(ID,def_text){
	if(document.getElementById(ID).value == def_text){
		document.getElementById(ID).value = ''; 
	}
}

//common hidebox-function
function hideBox(div, guid) { 
document.getElementById(div + guid).innerHTML = "";  
document.getElementById(div + guid).style.display="none";  
} 

//stuff for overlay-display
function showOverlay() { 
document.getElementById("overlay").style.display="block";  
document.getElementById("lightbox").style.display="block";  
} 

function hideOverlay() { 
document.getElementById("lightbox").innerHTML = "";  
document.getElementById("lightbox").style.display="none";  
document.getElementById("overlay").style.display="none";  
} 

/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos,resize){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable='+resize+'';
win=window.open(mypage,myname,settings);}

// -->