function check_ip(page)
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'sys/check_ip.php?sp='+page, true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
			 if(data=="FAIL")
				top.location.href="protection.php";
		}
	};
     xmlHttp1.send(null);
	}
}

function loadFB()
{
    document.getElementById("fbsample").innerHTML = '<center><img src="http://sys.damdoo.de/images/indicator.gif"></center>';
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_fb.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			var data = eval('(' + xmlHttp1.responseText + ')');
            document.getElementById("fbsample_title").innerHTML = "Feedback unseres Mitglieds '"+data.unick+"':";
            document.getElementById("fbsample").innerHTML = data.msg+'      <a href="http://www.damdoo.de/feedback.htm" style="font-Family:Verdana;font-size:8pt;">( mehr... )</a>';
		}
	};
     xmlHttp1.send(null);
	}
}

function loadVisits()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_guests.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("visits").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function ScamCounter()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'sys/monthly_scam.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("scamcounter").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadTops(utype)
{
	var xmlHttp1 = false;
    document.getElementById("tops").innerHTML = '<center>&nbsp;<BR>&nbsp;<BR><img src="http://sys.damdoo.de/images/indicator.gif"></center>';
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'sys/tops_'+utype+'.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("tops").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadMembers(utype)
{
	var xmlHttp1 = false;
    document.getElementById("members").innerHTML = '<center>&nbsp;<BR>&nbsp;<BR><img src="http://sys.damdoo.de/images/indicator.gif"></center>';
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'sys/members.php?ut='+utype, true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("members").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadNewMembers()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_newmembers.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("new_members").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadPartners()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_partners.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("partners").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadNews()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_news.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("news").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function loadFeedback()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'load_feedback.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("feedback").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function initpage(pagename,jsref)
{
	var iH = screen.height;
	var iW = screen.width;
	var iC = screen.pixelDepth;
	var iR = document.referrer;
	var iI = window.location.search;
	var iF = window.location.href;
	var iT = top.location.href;
	//var iI = '';
	//var iF = '';
	//var iT = '';
	//var iR = '';
	
	var params = '?w='+iW+'&h='+iH+'&c='+iC+'&pn='+pagename+'&ptitle='+pagename+'&r='+iR+'&i='+iI+'&href='+iF+'&top='+iT;
	if(jsref==null)
		jsref = '?';
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) 
	{
		xmlHttp1.open('GET', 'track.php'+params, true);
	}
    xmlHttp1.send(null);
}

function filedbg(msg)
{
	var params = '?txt='+msg;
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
	// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) 
	{
		xmlHttp1.open('GET', 'filedbg.php'+params, true);
	}
    xmlHttp1.send(null);
}

function show_matmsg()
{
	var xmlHttp1 = false;
	try {
    xmlHttp1  = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
	    try {
	        xmlHttp1  = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch(e) {
	        xmlHttp1  = false;
	    }
		}
// ... für Mozilla, Opera und Safari
	if (!xmlHttp1  && typeof XMLHttpRequest != 'undefined') {
		xmlHttp1 = new XMLHttpRequest();
	}
	if (xmlHttp1) {
		xmlHttp1.open('GET', 'sys/load_matmsg.php', true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("mat_msg").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function load_toplist(id,sex)
{
	loadTops(sex);	
	document.getElementById("btn_m").className = "tabbutton";
	document.getElementById("btn_w").className = "tabbutton";
	document.getElementById("btn_p").className = "tabbutton";
	id.className = "tabbutton_selected";
}

function load_members(id,sex)
{
	loadMembers(sex);	
	document.getElementById("btn2_m").className = "tabbutton";
	document.getElementById("btn2_w").className = "tabbutton";
	document.getElementById("btn2_p").className = "tabbutton";
	id.className = "tabbutton_selected";
}
