/* popup noscroll*/
function pop(url, widthp, heightp) {
		myrand = (""+Math.random()); len = myrand.length; adnr = myrand.substr(len-10,166); 
		window.open('/netforge/ne?tmpl=' + url + sessionidfull, adnr,'width=' + widthp + ',height=' + heightp + ',scrollbars=no,resizable=no');
}
/* popup noscroll*/

/* popup croll*/
function pops(url, widthp, heightp) {
		myrand = (""+Math.random()); len = myrand.length; adnr = myrand.substr(len-10,166); 
		window.open('/netforge/ne?tmpl=' + url + sessionidfull, adnr,'width=' + widthp + ',height=' + heightp + ',scrollbars=yes,resizable=yes');
}
/* popup scroll*/

/* suche extende profisuche */
imgtoggle = "";
function toggleSEARCH(name){
	divshow(name);
	if (name == imgtoggle){
		document.images['pfeil_' + name].src = staticurl + '/grafik/pfeil1.gif';
		imgtoggle = "";
		return false;
	}
	document.images['pfeil_' + name].src = staticurl + '/grafik/pfeil2.gif';
	imgtoggle = name;
}
/* suche extende profisuche */

/* div show and hide */
divoff = "";

function divshow(name){
	if (name == divoff){
		document.getElementById(divoff).style.display = "none";
		divoff = "";
		return false;
	}
	document.getElementById(name).style.display = "block";
	divoff = name;
}
/* div show and hide */

/*url load */
function url(url) {
		location.href = '/netforge/ne?tmpl=' + url + sessionidfull;
}
/*url load */

/* trash */
function trash_show () {
	keycap_disabled = 1;
	document.getElementById('trash').style.display = "none";
	document.getElementById('trashsubmit').style.display = "block";
}

function trash_submit (url) {
	var typ = "";
	var zusatz = "";
	for (i = 1; i <= 4; i++) { if (document.getElementById('vm_typ' + i).checked == true) { typ = i; } }			
	zusatz = document.getElementById('vm_zusatz').value;
	if (zusatz == "") { document.getElementById('zusatz').style.display = "block"; return false; }
	if (typ == "") { document.getElementById('typ').style.display = "block";return false; }
	loadURL(url + "&profil=" + profilabuse + "&typ=" + typ + "&zusatz=" + zusatz);
	document.getElementById('trashsubmit').style.display = "none";
	document.getElementById('trashsubmitok').style.display = "block";
	keycap_disabled = 0;
}

function trash_close () {
	document.getElementById('trashsubmit').style.display = "none";
	document.getElementById('trashsubmitok').style.display = "none";
	document.getElementById('trash').style.display = "block";
}

function loadURL (url) {
	if (window.XMLHttpRequest) {
		request = new XMLHttpRequest();
		request.open("GET", url, true);
		request.send(null);
	} else if (window.ActiveXObject) {
		request = new ActiveXObject("Microsoft.XMLHTTP");
		if (request) {
			request.open("GET", url, true);
			request.send();
		}
	}
}
/* trash */

/* favoriten ajax add */
function favoriten(url, id) {
	if (window.XMLHttpRequest) {
		request = new XMLHttpRequest();
		request.open("GET", url, true);
		request.send(null);

	} else if (window.ActiveXObject) {
		request = new ActiveXObject("Microsoft.XMLHTTP");
		if (request) {
			request.open("GET", url, true);
			request.send();
		}
	}
	Zweitbild = new Image(15, 13);
	Zweitbild.src = staticurl + "/grafik/fav_ok.gif";
	document.images[id].src = Zweitbild.src;
}
/* favoriten ajax add */

/* checkbox select */
function ALLDELETE() {
	for(var x=0;x<document.Postfach.elements.length;x++) { 
		var y=document.Postfach.elements[x]; 
		if(y.name!='ALLENEWS') y.checked=document.Postfach.ALLENEWS.checked;
	}
}
/* checkbox select */

/* set cookie */
function SetCookie (key, value, expire) {
  var now = new Date();
  var expires = new Date(now.getTime() + expire);
  document.cookie = key + "=" + value + "; domain="  + cookiedomain + "; path=/; expires=" + expires.toGMTString() + ";";
}
/* set cookie */

/* freunde online */
function fon() {
	var myfriend=document.Fonline.freunde.selectedIndex; 

	if (document.Fonline.freunde.options[myfriend].value == 1 ) {
			url('mmf_freund');
	} else {
			profil(document.Fonline.freunde.options[myfriend].value);
	}
}
/* freunde online */

/* profil */
function profil(profil) {
		myrand = (""+Math.random()); len = myrand.length; adnr = myrand.substr(len-10,166); 
		window.open('/netforge/ne?tmpl=profil_index&profil=' + profil + '' + sessionidfull, adnr ,'width=830,height=680,scrollbars=yes,resizable=yes');
}
/* profil */
