function updateUserData(parameter) {
this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("content").innerHTML = req.responseText;
		}
		else
		{

			document.getElementById("content").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
	}).bind(this);
	this.req.open('POST', '/typo3conf/ext/ppw_meinkonto/pi1/class.tx_ppwmeinkonto_pi1.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
	
	this.req.send('para='+parameter);   

}

function reloadAbo(formname, name, display, uid, parent_id)
{

	//document.getElementById(actPage).className = 'fett';
	this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("selectboxen").innerHTML = req.responseText;
			 
		}
		else
		{

			document.getElementById("selectboxen").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
	}).bind(this);
	this.req.open('POST', '/fileadmin/php/abo_sbm.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
    
  if (formname == "LEVEL1"){  
    for (i = 0; i < document.LEVEL1.L1.length; ++i){
        if (document.LEVEL1.L1.options[i].selected == true) {
            uid = document.LEVEL1.L1.options[i].value;
        }
    }    
  }  
  else if (formname == "LEVEL2"){
    for (i = 0; i < document.LEVEL2.L2.length; ++i){
        if (document.LEVEL2.L2.options[i].selected == true)
            uid = document.LEVEL2.L2.options[i].value;
    }    
  }
  else if (formname == "LEVEL3"){  
    for (i = 0; i < document.LEVEL3.L3.length; ++i){
        if (document.LEVEL3.L3.options[i].selected == true)
            uid = document.LEVEL3.L3.options[i].value;
    }    
  }
  
  else if (formname == "initial2"){  
    for (i = 0; i < document.initial2.L2.length; ++i){
        if (document.initial2.L2.options[i].selected == true)
            uidparentid = document.initial2.L2.options[i].value;
    }    
    up = uidparentid.split ("x",2)
    uid =up[0];
    parent_id = up[1];
  }
  
  else if (formname == "initial3"){  
    for (i = 0; i < document.initial3.L3.length; ++i){
        if (document.initial3.L3.options[i].selected == true)
            uidparentid = document.initial3.L3.options[i].value;
	}    
	up = uidparentid.split ("x",2)
	uid =up[0];
	parent_id = up[1];
  }
  else if (formname == "archiv"){  
	for (i = 0; i < document.archiv.ausgaben.length; ++i){
		if (document.archiv.ausgaben.options[i].selected == true)
			uid = document.archiv.ausgaben.options[i].value;
	}    
  }  
  
	this.req.send('formname='+formname+'&name='+name+'&display='+display+'&uid='+uid+'&parent_id='+parent_id);    
}



// ERSTER AUFRUF
function loadRatgeber (formname,produkt,top_parent) {
this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("selectboxen").innerHTML = req.responseText;
		}
		else
		{

			document.getElementById("selectboxen").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
	}).bind(this);
	this.req.open('POST', '/fileadmin/php/selectboxen.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
	
	this.req.send('formname='+formname+'&produkt='+produkt+'&top_parent='+top_parent);   

		this.req2 = createRequestObject();
			this.cb2 = (function() {
				var req2 = this.req2;
				if(req2.readyState == 4)
				{
					document.getElementById("content").innerHTML = req2.responseText;
				}
				else
				{

					document.getElementById("content").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
				}
			}).bind(this);
			this.req2.open('POST', '/fileadmin/php/dateiliste.php');
			this.req2.setRequestHeader(
			  "Content-Type",
			  "application/x-www-form-urlencoded");
			this.req2.onreadystatechange = this.cb2;
			uid="";
			this.req2.send('formname='+formname+'&uid='+uid+'&produkt='+produkt+'&top_parent='+top_parent);    	

}	


//RELOAD
function reloadRatgeber (formname, uid,produkt,top_parent) {
this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("content").innerHTML = req.responseText;
			 
		}
		else
		{

			document.getElementById("content").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
		
	}).bind(this);
	this.req.open('POST', '/fileadmin/php/dateiliste.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
	if (formname=="Kategorien") {
		document.Ausgabenarchiv.Ausgabenarchiv.selectedIndex = 0;
		document.Alphabet.Alphabet.selectedIndex = 0;
			for (i = 0; i < document.Kategorien.Kategorien.length; ++i){
				if (document.Kategorien.Kategorien.options[i].selected == true)
					uid = document.Kategorien.Kategorien.options[i].value;
			}

    }
	else if (formname=="Ausgabenarchiv") {
		document.Kategorien.Kategorien.selectedIndex = 0;
		document.Alphabet.Alphabet.selectedIndex = 0;
			for (i = 0; i < document.Ausgabenarchiv.Ausgabenarchiv.length; ++i){
				if (document.Ausgabenarchiv.Ausgabenarchiv.options[i].selected == true)
					uid = document.Ausgabenarchiv.Ausgabenarchiv.options[i].value;
			}   				
    }	

else if (formname=="Alphabet") {
		document.Kategorien.Kategorien.selectedIndex = 0;
		document.Ausgabenarchiv.Ausgabenarchiv.selectedIndex = 0;
			for (i = 0; i < document.Alphabet.Alphabet.length; ++i){
				if (document.Alphabet.Alphabet.options[i].selected == true)
					uid = document.Alphabet.Alphabet.options[i].value;
			}   				
    }
else if (formname=="pagination") {
		document.Kategorien.Kategorien.selectedIndex = 0;
		document.Ausgabenarchiv.Ausgabenarchiv.selectedIndex = 0;
		document.Alphabet.Alphabet.selectedIndex = 0;
}
	this.req.send('formname='+formname+'&uid='+uid+'&produkt='+produkt+'&top_parent='+top_parent);    	
}	


// SEK
function reloadSEK(formname, name, display, uid, parent_id)
{

	//document.getElementById(actPage).className = 'fett';
	this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("selectboxen").innerHTML = req.responseText;
			 
		}
		else
		{

			document.getElementById("selectboxen").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
	}).bind(this);
	this.req.open('POST', '/fileadmin/php/abo_sek.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
    
  if (formname == "LEVEL1"){  
    for (i = 0; i < document.LEVEL1.L1.length; ++i){
        if (document.LEVEL1.L1.options[i].selected == true)
            uid = document.LEVEL1.L1.options[i].value;
    }    
  }  
  else if (formname == "LEVEL2"){
    for (i = 0; i < document.LEVEL2.L2.length; ++i){
        if (document.LEVEL2.L2.options[i].selected == true)
            uid = document.LEVEL2.L2.options[i].value;
    }    
  }
  else if (formname == "LEVEL3"){  
    for (i = 0; i < document.LEVEL3.L3.length; ++i){
        if (document.LEVEL3.L3.options[i].selected == true)
            uid = document.LEVEL3.L3.options[i].value;
    }    
  }
  
  else if (formname == "initial2"){  
    for (i = 0; i < document.initial2.L2.length; ++i){
        if (document.initial2.L2.options[i].selected == true)
            uidparentid = document.initial2.L2.options[i].value;
    }    
    up = uidparentid.split ("x",2)
    uid =up[0];
    parent_id = up[1];
  }
  
  else if (formname == "initial3"){  
    for (i = 0; i < document.initial3.L3.length; ++i){
        if (document.initial3.L3.options[i].selected == true)
            uidparentid = document.initial3.L3.options[i].value;
    }    
    up = uidparentid.split ("x",2)
    uid =up[0];
    parent_id = up[1];
  }
  else if (formname == "archiv"){  
    for (i = 0; i < document.archiv.ausgaben.length; ++i){
        if (document.archiv.ausgaben.options[i].selected == true)
            uid = document.archiv.ausgaben.options[i].value;
    }    
  }  
  
	this.req.send('formname='+formname+'&name='+name+'&display='+display+'&uid='+uid+'&parent_id='+parent_id);    
}


function reloadMSO(formname, name, display, uid, parent_id)
{

	//document.getElementById(actPage).className = 'fett';
	this.req = createRequestObject();
	this.cb = (function() {
		var req = this.req;
		if(req.readyState == 4)
		{
			document.getElementById("selectboxen").innerHTML = req.responseText;
			 
		}
		else
		{

			document.getElementById("selectboxen").innerHTML = '<img src="/images/sanduhr.gif" alt="waiting" title="waiting"/>';
		}
	}).bind(this);
	this.req.open('POST', '/fileadmin/php/abo_mso.php');
	this.req.setRequestHeader(
	  "Content-Type",
	  "application/x-www-form-urlencoded");
	this.req.onreadystatechange = this.cb;
    
  if (formname == "LEVEL1"){  
    for (i = 0; i < document.LEVEL1.L1.length; ++i){
        if (document.LEVEL1.L1.options[i].selected == true)
            uid = document.LEVEL1.L1.options[i].value;
    }    
  }  
  else if (formname == "LEVEL2"){
    for (i = 0; i < document.LEVEL2.L2.length; ++i){
        if (document.LEVEL2.L2.options[i].selected == true)
            uid = document.LEVEL2.L2.options[i].value;
    }    
  }
  else if (formname == "LEVEL3"){  
    for (i = 0; i < document.LEVEL3.L3.length; ++i){
        if (document.LEVEL3.L3.options[i].selected == true)
            uid = document.LEVEL3.L3.options[i].value;
    }    
  }
  
  else if (formname == "initial2"){  
    for (i = 0; i < document.initial2.L2.length; ++i){
        if (document.initial2.L2.options[i].selected == true)
            uidparentid = document.initial2.L2.options[i].value;
    }    
    up = uidparentid.split ("x",2)
    uid =up[0];
    parent_id = up[1];
  }
  
  else if (formname == "initial3"){  
    for (i = 0; i < document.initial3.L3.length; ++i){
        if (document.initial3.L3.options[i].selected == true)
            uidparentid = document.initial3.L3.options[i].value;
    }    
    up = uidparentid.split ("x",2)
    uid =up[0];
    parent_id = up[1];
  }
  else if (formname == "archiv"){  
    for (i = 0; i < document.archiv.ausgaben.length; ++i){
        if (document.archiv.ausgaben.options[i].selected == true)
            uid = document.archiv.ausgaben.options[i].value;
    }    
  }  
  
	this.req.send('formname='+formname+'&name='+name+'&display='+display+'&uid='+uid+'&parent_id='+parent_id);    
}
