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 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', '../sys/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 loadAds(utype)
{
	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_ads.php?ads_id='+utype, true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) {
			 var data = xmlHttp1.responseText;
             document.getElementById("myproads_content").innerHTML = data;
		}
	};
     xmlHttp1.send(null);
	}
}

function clicklog(code)
{
	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/clicklog.php?code='+code, true);
		xmlHttp1.onreadystatechange = function () {
        if (xmlHttp1.readyState == 4) 
		{
		}
	};
     xmlHttp1.send(null);
	}
}

function loadTops(utype)
{
	var xmlHttp1 = false;
	set_toplist(utype);
	
    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 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 set_toplist(sex)
{
	document.getElementById("btn_m").className = "tabbutton";
	document.getElementById("btn_w").className = "tabbutton";
	document.getElementById("btn_p").className = "tabbutton";
	if (sex=='M')
		document.getElementById("btn_m").className = "tabbutton_selected";
	if (sex=='W')
		document.getElementById("btn_w").className = "tabbutton_selected";
	if (sex=='P')
		document.getElementById("btn_p").className = "tabbutton_selected";
}

