function Reset(){window.setTimeout("document.getElementById('search').value = ''", 1);}
function BilderVorladen(){var def="fileadmin/images/all_pages/ajax-loader.gif";var b1="b_allg.jpg";var b2="b_can.jpg";var b3="b_can.jpg";/*var b3="b_diag.jpg";var b4="b_diag_ff.jpg";*/var b4="b_diag_pb.jpg";var b5="b_diag_pb.jpg";var b6="b_dnet.jpg";var b7="b_entwicklungsw.jpg";var b8="b_entwicklungsw_edd.jpg";var b9="b_entwicklungsw_fdt.jpg";var b10="b_entwicklungsw_opc.jpg";var b11="b_hart.jpg";var b12="b_kommunikat.jpg";var b13="b_pb.jpg";var b14="b_simba.jpg";var b15="b_softwarekomp.jpg";var b16="b_softwarekomp_fdt.jpg";var b17="b_softwarekomp_opc.jpg";var b18="b_verkehrstelematik.jpg";var path="fileadmin/images/banner_de/";var t=document.URL;var u="http://www.ifak-system.de/";var p="produkte/";var k="kommunikationsadapter/";var dw="diagnosewerkzeuge/";var s="softwarekomponenten/";var dt="entwicklungswerkzeuge/";var vt="verkehrstelematik/verkehrsmanagement";var can_i="can-anschaltungen";var pb_i="profibus-anschaltungen";var hart_i ="hart-anschaltungen";var pb_ff="profibusfoundation-fieldbus";var fdt_c="fdt-komponenten";var opc_c="opc-komponenten";var i="banner";switch(t){case u+"produkte.html":document.getElementById(i).src=path+b1;break;case u+p+"kommunikationsadapter.html": document.getElementById(i).src=path+b12;break;case u+p+k+can_i+".html":document.getElementById(i).src=path+b2;break;case u+p+k+can_i+"/iscan-usb.html":document.getElementById(i).src=path+b2;break;case u+p+k+can_i+"/iscan-pci.html":document.getElementById(i).src=path+b2;break;case u+p+k+can_i+"/isnet-cube.html":document.getElementById(i).src=path+b2;break;case u+p+k+"devicenet-anschaltungen.html":document.getElementById(i).src=path+b6;break;case u+p+k+"devicenet-anschaltungen/isdnet-usb.html":document.getElementById(i).src=path+b6;break;case u+p+k+hart_i+".html":document.getElementById(i).src=path+b11;break;case u+p+k+hart_i+"/ishrt-usb.html":document.getElementById(i).src=path+b11;break;case u+p+k+hart_i+"/ishrt-usbex.html":document.getElementById(i).src=path+b11;break;case u+p+k+pb_i+".html":document.getElementById(i).src=path+b13;break;case u+p+k+pb_i+"/ispro-usbx12.html":document.getElementById(i).src=path+b13;break;case u+p+k+pb_i+"/ispro-pcix12.html":document.getElementById(i).src=path+b13;break;case u+p+k+pb_i+"/ispro-gate.html":document.getElementById(i).src=path+b13;break;case u+p+k+pb_i+"/isnet-cube.html":document.getElementById(i).src=path+b13;break;case u+p+k+"profinet-io-interfaces.html":document.getElementById(i).src=path+b12;break;case u+p+"diagnosewerkzeuge.html":document.getElementById(i).src=path+b3;break;case u+p+dw+pb_ff+".html":document.getElementById(i).src=path+b3;break;case u+p+dw+pb_ff+"/ispa-bustester.html":document.getElementById(i).src=path+b5;break;case u+p+dw+pb_ff+"/diagnose-monitor-profibus.html":document.getElementById(i).src=path+b5;break;case u+p+dw+pb_ff+"/diagnose-monitor-foundation-fieldbus.html":document.getElementById(i).src=path+b4;break;case u+p+"softwarekomponenten.html":document.getElementById(i).src=path+b15;break;case u+p+s+fdt_c+".html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/ispro-fdt.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/ishrt-fdt.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/isff-fdt.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/iseddview-dtm.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/isdppa-link-dtm.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+"/issimocode-dtm.html":document.getElementById(i).src=path+b16;break;case u+p+s+fdt_c+".html":document.getElementById(i).src=path+b17;break;case u+p+s+fdt_c+"/ispro-multiserver.html":document.getElementById(i).src=path+b17;break;case u+p+s+fdt_c+"/iscan-serveriscanopen-server.html":document.getElementById(i).src=path+b17;break;case u+p+"entwicklungswerkzeuge.html":document.getElementById(i).src=path+b7;break;case u+p+dt+"edd-werkzeuge.html":document.getElementById(i).src=path+b8;break;case u+p+dt+"edd-werkzeuge/iseddworkbench.html":document.getElementById(i).src=path+b8;break;case u+p+dt+"fdt-werkzeuge.html":document.getElementById(i).src=path+b9;break;case u+p+dt+"fdt-werkzeuge/isdtmcreator-base.html":document.getElementById(i).src=path+b9;break;case u+p+dt+"fdt-werkzeuge/isdtmcreator-edd.html":document.getElementById(i).src=path+b9;break;case u+p+dt+"opc-werkzeuge.html":document.getElementById(i).src=path + b10;break;case u+p+dt+"opc-werkzeuge/isopc-toolkit.html":document.getElementById(i).src=path+b10;break;case u+p+"simulationssoftware.html":document.getElementById(i).src=path+b14;break;case u+p+"simulationssoftware/abwassersimulation.html":document.getElementById(i).src=path+b14;break;case u+p+"verkehrstelematik.html":document.getElementById(i).src=path+b18;break;case u+p+vt+"/mobs-mobiler-stausensor.html":document.getElementById(i).src=path+b18;break;case u+p+vt+"/dfi-dynamisches-fahrgastinformationssystem.html":document.getElementById(i).src=path+b18;break;case u+p+vt+"/elsa-verteiltes-monitoring-an-lichtsignalanlagen.html":document.getElementById(i).src=path+b18;break;case u+p+vt+".html":document.getElementById(i).src=path+b18;break;default:var min=1;var max=17;var rand=Math.floor(min+(max-min+1)*(Math.random()));document.getElementById(i).src=path+eval("b"+rand);break;}if(document.getElementById(i).className=="banner_img_ajax"){document.getElementById(i).className="banner_img";}}
var GLV_x=0;var GLV_y=0;var GLV_curLayerWidth=new Array();var GLV_curLayerHeight=new Array();var GLV_curLayerX=new Array();var GLV_curLayerY=new Array();var GLV_menuOn=new Array();var GLV_gap=new Array();var GLV_currentLayer=new Array();var GLV_currentROitem=new Array();var GLV_hasBeenOver=new Array();var GLV_doReset=new Array();var GLV_lastKey=new Array();var GLV_menuXY=new Array();var GLV_date=new Array();var GLV_timeout=new Array();var GLV_timeoutRef=new Array();var GLV_onlyOnLoad=new Array();var GLV_dontHideOnMouseUp=new Array();var GLV_date=new Date();var GLV_restoreMenu=new Array();var GLV_timeout_count=0;var GLV_timeout_pointers=new Array();var GLV_dontFollowMouse=new Array();
function GL_checkBrowser(){this.dom= (document.getElementById);if (op=(navigator.userAgent.indexOf("Opera")>-1)){switch(parseInt(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6))){case 5:case 6:this.op5= true;break;case 7:case 8:this.op7=true;break;default:this.op4= true;}}this.konq=(navigator.userAgent.indexOf("Konq")>-1);this.ie4=(document.all && !this.dom && !op && !this.konq);this.ie5=(document.all && this.dom && !op && !this.konq);this.ie6= (this.ie5);this.ns4=(document.layers && !this.dom && !this.konq);this.ns5=(!document.all && this.dom && !op && !this.konq);this.ns6=(this.ns5);this.bw=(this.ie4||this.ie5||this.ns4||this.ns6||this.konq||op);return this;}
bw=new GL_checkBrowser();if(document.layers){scrX= innerWidth; scrY=innerHeight;onresize= function(){if(scrX!= innerWidth||scrY!=innerHeight){history.go(0);}};}
function GL_getObjCss(obj){return bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;};
function GL_isObjCss(obj){flag=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;if(flag)return true;};
function GL_getObj(obj){nest="";this.el=bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document."+obj):document.getElementById(obj);this.css=bw.ns4?this.el:this.el.style;this.ref=bw.ns4?this.el.document:document;this.x=(bw.ns4||bw.op5)?this.css.left:this.el.offsetLeft;this.y= (bw.ns4||bw.op5)?this.css.top:this.el.offsetTop;this.height=(bw.ie4||bw.ie5||bw.ns6||bw.op7)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.op4?this.css.pixelHeight:0;this.width=(bw.ie4||bw.ie5||bw.ns6||bw.op7)?this.el.offsetWidth:bw.ns4?this.ref.width:bw.op4?this.css.pixelWidth:0;return this;}
function GL_initLayers(){if(bw.ns4)document.captureEvents(Event.MOUSEMOVE);GL_timeout_func();}
function GL_updateTime(WMid){GLV_date=new Date();GLV_timeout[WMid]=GLV_date.getTime();}
function GL_doResetAll(WMid){var resetSubMenus="";eval('resetSubMenus=GL'+WMid+'_resetSubMenus();');if(GLV_doReset[WMid]&&resetSubMenus){GLV_doReset[WMid]=false;GL_hideAll(WMid);if(GLV_onlyOnLoad[WMid])GL_restoreMenu(WMid);}}
function GL_timeout_func(){GLV_date=new Date();var stuff="";for(var a=0;a<GLV_timeout_count;a++){WMid=GLV_timeout_pointers[a];if(GLV_date.getTime()-GLV_timeout[WMid]>GLV_timeoutRef[WMid]){GL_doResetAll(WMid);}}
//window.status = GLV_date.getTime()-GLV_timeout[WMid]-GLV_timeoutRef[WMid]
window.setTimeout("GL_timeout_func();",200);}
function GL_resetAll(WMid){if (!GLV_doReset[WMid]){GL_updateTime(WMid);GLV_doReset[WMid]=true;}}
function GL_mouseUp(WMid,e){GLV_doReset[WMid]=false;if(!GLV_dontHideOnMouseUp[WMid]){GL_hideAll(WMid);if(GLV_onlyOnLoad[WMid])GL_restoreMenu(WMid);}}
function GL_stopMove(WMid){GLV_menuOn[WMid]=null;}
function GL_restoreMenu(WMid){eval('GL'+WMid+'_restoreMenu()');}
function GL_doTop(WMid,id){GL_hideAll(WMid);if (GL_isObjCss(id)){GLV_menuOn[WMid]=GL_getObjCss(id);GLV_menuOn[WMid].visibility="visible";eval('GL'+WMid+'_doTop(WMid,id)');var layerObj=GL_getObj(id);GLV_curLayerHeight[WMid]=layerObj.height;GLV_curLayerWidth[WMid]=layerObj.width;GLV_curLayerX[WMid]=layerObj.x;GLV_curLayerY[WMid]=layerObj.y;GLV_currentLayer[WMid]=id;GLV_hasBeenOver[WMid]=0;}}
function GL_getMouse(e){GLV_x= (bw.ns4||bw.ns5)?e.pageX:(bw.ie4||bw.op4)?event.x:(event.x-2)+document.body.scrollLeft;GLV_y=(bw.ns4||bw.ns5)?e.pageY:(bw.ie4||bw.op4)?event.y:(event.y-2)+document.body.scrollTop;}
function GL_mouseMoveEvaluate(WMid){if (GLV_gap[WMid]&&GLV_currentLayer[WMid]!=null){if(GLV_x+GLV_gap[WMid]-GLV_curLayerX[WMid] <0 || GLV_y+GLV_gap[WMid]-GLV_curLayerY[WMid] <0 ||GLV_curLayerX[WMid]+GLV_curLayerWidth[WMid]+GLV_gap[WMid]-GLV_x <0 || GLV_curLayerY[WMid]+GLV_curLayerHeight[WMid]+GLV_gap[WMid]-GLV_y <0){if(GLV_hasBeenOver[WMid]){GLV_doReset[WMid]=true;}}else{GL_updateTime(WMid);GLV_hasBeenOver[WMid]=1;GLV_doReset[WMid]=false;}}}
function GL_hideAll(WMid){GLV_doReset[WMid]=false;GLV_currentLayer[WMid]=null;if(GL_isObjCss(GLV_lastKey[WMid]) && GL_getObjCss(GLV_lastKey[WMid])){eval('GL'+WMid+'_hideCode()');}GLV_hasBeenOver[WMid]=0;}
function GL_iframer(WMid,id,state){if(bw.ie4||bw.ie5){ifrmObj=bw.ie4?document.all["Iframe"+WMid]:document.getElementById("Iframe"+WMid);if (state) {parentObj=bw.ie4?document.all[id]:document.getElementById(id);ifrmObj.style.filter='Alpha(opacity=0)';ifrmObj.style.width=parentObj.offsetWidth+"px";ifrmObj.style.height=parentObj.offsetHeight+"px";ifrmObj.style.left=parentObj.offsetLeft+"px";ifrmObj.style.top=parentObj.offsetTop + "px";ifrmObj.style.zIndex=parentObj.style.zIndex-1;ifrmObj.style.display="";}else ifrmObj.style.display="none";}}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/****************************************************************************************************************/
/* AJAX XML Request Methode                                                                                        */
/* Parameter:                                                                                                         */
/* url                ->        welche XML Datei soll aufgerufen werden                                                        */
/* action        ->        welcher action (siehe case Abfrage in alertContents) soll ausgef&#252;hrt werden        */
/* id                ->        */
/****************************************************************************************************************/

var httpRequest = new Array();
var i = 0;
httpRequest[0] = null;
var min = 0;
var max = 40;
var Ereignis;

var ch_flag = 0;

function makeRequest(url,action,id) {
ch_flag=0;



        if((url.search(/.\?./))!=-1)
        {
                var r=Math.random();
                //url=url + '&tbUid=' + (new Date()).getTime();
                url = url + '&rand=' + r + '&rand2=' +(r+i);
        }
        else
        {
                var r=Math.random();
                url=url + '?rand=' + r + '&rand2=' +(r+i);
        }
        //url = url +'?tbUid=' + (new Date()).getTime();
        //var random_int = Math.floor(min+(max-min+1)*(Math.random()));
        if(i==20){i=0;}else{i=i+1;}
        var random_int = i;
        httpRequest[random_int] = null;
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
                httpRequest[random_int] = new XMLHttpRequest();
                if (httpRequest.overrideMimeType) {
                        httpRequest.overrideMimeType('text/xml');
                        // See note below about this line
                }
        }
        else if (window.ActiveXObject) { // IE
                try {
                        httpRequest[random_int] = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e) {
                        try {
                                httpRequest[random_int] = new ActiveXObject("Microsoft.XMLHTTP");
                        }
                        catch (e) {}
                }
        }

        if (!httpRequest[random_int]) {
        alert('Giving up :( Cannot create an XMLHTTP instance');
        return false;
        }

        //httpRequest.onreadystatechange = function() { alertContents(httpRequest,action,id); };
        httpRequest[random_int].open('GET', url, true);
        //httpRequest.open('GET', url, true);
        httpRequest[random_int].onreadystatechange = function() { alertContents(action,id, random_int); };
        httpRequest[random_int].send('');
	
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function alertContents(action,id, random_int) {//alert("ACTION="+action);
//alert("test");        
if (httpRequest[random_int].readyState == 4) {//alert("laeuft");
        if (httpRequest[random_int].status == 200) {
                        var xmldoc = httpRequest[random_int].responseXML;
                        //alert(httpRequest.responseText);
			
                        var local_action = parseInt(action);//alert("la: "+local_action);
                        switch (local_action) {
                                case 1:
                                        // ajax test ob der xml request funktioniert
                                        alert("id: "+id);
                                        
                                        var anz = xmldoc.getElementsByTagName('anz').item(0);
                                        alert("anzahl="+anz.firstChild.data);
                                        //var anz = xmldoc.getElementsByTagName('anz_2').item(0);
                                        
                                        break;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                case 2://alert("case 2");
                                        var title;
                                        var id_a;
                                        var td;
                                        var zeile;
                                        var dummy;
                                        var anz;
                                        var id_tg ;
                                        var cb;
                                        var sub;
                                        var ul;
                                        var check;
                                        dummy = xmldoc.getElementsByTagName('anz').item(0);
                                        anz=dummy.firstChild.data;
                                        //alert("anzahl="+anz);
                                        dummy = xmldoc.getElementsByTagName('id_tg').item(0);
					id_tg=dummy.firstChild.data;
					//alert("id_tg="+id_tg); 
					var baum=document.getElementById('nf_ul');		
                                        //alert("ul="+baum.id);
                                        check=document.getElementById("n_"+id+"_cb").checked;
                                        ul=document.createElement('ul');
                                        ul.id=id_tg;
					ul.style.listStyle="none";
                                        ul.style.display="none";
					for(var i=0;i<anz;i++)
					{
					
					/////////////////////////////////////////////////////////////                                                    abt2=xmldoc.getElementsByTagName('bta_zeichen'+i).item(0);
                                                    zeile=document.createElement('li');
                                                    if(check==true)
                                                    {
                                                    zeile.id="st_r_"+id_tg+"_c";
                                                    }
                                                    else
                                                    {
                                                    zeile.id="st_r_"+id_tg;
                                                    }
                                                    //zeile.id=id_tg;
                                                    dummy=xmldoc.getElementsByTagName('sub_'+i).item(0);
                                                    sub=dummy.firstChild.data;
                                                    
                                                    //alert("sub: "+sub);
                                                    
                                                    td=document.createElement('span');
                                                    //td.style.width="30px";
                                                    //td.appendChild(document.createTextNode(" "));
                                                    //td.className="st";
                                                    //alert("dummy "+dummy.firstChild.data);
                                                    if(sub!="-")
                                                    {
                                                    //zeile.id="st_r_"+id_tg+"_s";
                                                    id_a=xmldoc.getElementsByTagName('id_a_'+i).item(0);
                                                    //alert(id_a.firstChild.data);
                                                    //id_a=id_a.firstChild.data;
                                                    td.id=id_a.firstChild.data+"_sh";
                                                    link=document.createElement('a');
                                                    
						    link.href="javascript:show_hide(1,"+id_a.firstChild.data+")";
					            img=document.createElement('img');
						    img.src="/fileadmin/images/newsflash/add.png";
						    img.width="15";
						    img.height="14";
						    img.border="0";
						    //img.title="Alternativ-Bauteile anzeigen";
						    link.appendChild(img);
                                                    td.appendChild(link);
                                                    
                                                    }
                                                    
                                                    zeile.appendChild(td);
						    
						    check=document.getElementById("n_"+id+"_cb").checked;
						    
						    td=document.createElement('span');
                                                    //td.id=level;
                                                    td.className="right";
						    //td.onclick=function(){themengruppe(this.firstChild.id);};
                                                    //td.onclick=function(){alert(this.firstChild.id);};
						    
						    if(sub=="-")
                                                    {
                                                    //td.className="einrueck";
                                                    }
						    
						    if(navigator.appName=="Microsoft Internet Explorer")
						    {
						    ///////////////////////////////IE//////////////////////////////////////
						    var sel = xmldoc.getElementsByTagName('selected_'+i).item(0);
                                                    id_a=xmldoc.getElementsByTagName('id_a_'+i).item(0);
						    
						    
						    if(sel.firstChild.data==1)
						    {
						    cb=document.createElement("<input type=\"checkbox\" name=\"themen[]\" value=\""+id_a.firstChild.data+"\" id=\""+i+"_st_c_"+id+"\" checked=\"checked\"  />");
						    }
						    else
						    {
						    cb=document.createElement("<input type=\"checkbox\" name=\"themen[]\" value=\""+id_a.firstChild.data+"\" id=\""+i+"_st_c_"+id+"\" />");
						    }
						    cb.onclick=function(){checked(this.id);};
						    
						    td.appendChild(cb);
						    ///////////////////////////////////////////////////////////////////////////
						    }
						    else
						    {
						    
                                                    ////////////////////////////FF///////////////////////////
						    cb=document.createElement('input');
                                                    
						    cb.type="checkbox";
                                                    cb.name="themen[]";
                                                    id_a=xmldoc.getElementsByTagName('id_a_'+i).item(0);
                                                    cb.value=id_a.firstChild.data;
						    
                                                    //cb.onclick=check(this.id);
                                                    if(sub!="-")
                                                    {
                                                    cb.onclick=function(){themengruppe(this.value);};
                                                    cb.id=id_a.firstChild.data+"_cb";
                                                    }
                                                    else
                                                    {//nur das trifft zu
                                                    //alert("bla");
						    cb.id=i+"_st_c_"+id;
						    //cb.onclick=function(){change();};
                                                    //cb.onchange=function(){checked(this.id);};
                                                    }
                                            	    
						    var sel = xmldoc.getElementsByTagName('selected_'+i).item(0);
						    //alert(sel.firstChild.data);
						    if(sel.firstChild.data==1)
						    {
						    cb.checked=true;
						    //cb.setAttribute("CHECKED","checked");
						    
						    }
						    
                                                    if(check==true)
                                                    {
                                                    cb.checked=true;
                                                    }
                                                    //cb.style.backgroundColor="#ff0000";
						    cb.onclick=function(){checked(this.id);change()};
                                                    //cb.onclick=function(){change();};
						    td.appendChild(cb);
						    //////////////////////////////////////////////////////////
						    }
						    if(cb.checked==true)
						    {
						    zeile.id="st_r_"+id+"_c";
						    }
						    zeile.appendChild(td);
						    
                                                    td=document.createElement('span');
                                                    //td.id="r_"+i;
                                                    title=xmldoc.getElementsByTagName('title_'+i).item(0);
                                                    td.appendChild(document.createTextNode(title.firstChild.data));
                                                    
                                                    zeile.appendChild(td);
                                                    
                                                    
                                                    
                                                    //alert("zeile.firstChild.id: "+zeile.firstChild.id);
                                                    //alert("tg_id: "+id_tg);
                                                    dummy=document.getElementById("n_"+id_tg+"_sh");
                                                    
                                                    ul.appendChild(zeile);
                                                    /////////////////////////////////////////////////////////////
                                    		    
                                    		    
                                        }
                                    	dummy=document.getElementById("n_"+id_tg+"_sh").parentNode;
                                    	dummy.appendChild(ul);
                                        
					//////////Themengruppe vorselektieren/////////
					dummy=xmldoc.getElementsByTagName('tg').item(0);
					//alert(dummy.firstChild.data);
					
					if(dummy.firstChild.data==1)
					{
					//alert("vorselektiert");
					document.getElementById("n_"+id+"_cb").checked=true;
					
					    //for(i=0;i<anz;i++)
					    //{
					    //alert(id_tg);
						while(document.getElementById("st_r_"+id_tg)!=null)
						{
						document.getElementById("st_r_"+id_tg).id="st_r_"+id_tg+"_c";
						}
					    //}
					}
					else if(dummy.firstChild.data==2)
					{
					document.getElementById("n_"+id+"_cb").checked=true;
					document.getElementById("n_"+id+"_cb").disabled=true;
					document.getElementById("n_"+id+"_hidd").style.left="38px";
					}					
					
					
					
					
					
                                        break;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                

                                default:
                                        alert(unescape("keine action %FCbergeben, bitte benachrichtigen Sie Ihren Administrator"));
                                        break;
                        }

        }
                else if (httpRequest.status == 404)
                {
                        alert(unescape("Site not found, bitte benachrichtigen Sie Ihren Administrator"));
                }
                else if (httpRequest.status == 500)
                {
                        alert(unescape("Server error, bitte benachrichtigen Sie Ihren Administrator"));
                }
                else
                {
                        alert(unescape('unbekanntes Problem beim ausf%FChren des Requests, bitte benachrichtigen Sie Ihren Administrator'));
                }
           }
}

//////////////////////////////////////////////
//////////////////////////////////////////////




function themengruppe(id)
{
//alert("funktion themengruppe aufgerufen");
var id;
var check;
var dummy;
var disable;
	check=document.getElementById("n_"+id+"_cb").checked;
	disable=document.getElementById("n_"+id+"_cb").disabled;
	
	if(disable==true)
	{
	document.getElementById("n_"+id+"_hidd").style.left="38px";
	}
	else
	{
	document.getElementById("n_"+id+"_hidd").style.left="338px";
	
	}
	
	
	if(check==true)
	{
	    //alert("checked");
	
	    while(document.getElementById("st_r_"+id)!=null)
	    {//alert("while schleife");
	    document.getElementById("st_r_"+id).firstChild.nextSibling.firstChild.checked=true;
		/////////////////////////////////
		if(document.getElementById("st_r_"+id).firstChild.id!=null)
		{
		//alert("hat sub: "+document.getElementById("st_r_"+id).firstChild.id);
		dummy=document.getElementById("st_r_"+id).firstChild.nextSibling.firstChild.value
		
		    while(document.getElementById("st_r_"+dummy)!=null)
		    {
		    document.getElementById("st_r_"+dummy).firstChild.nextSibling.firstChild.checked=true;
		    document.getElementById("st_r_"+dummy).id="st_r_"+dummy+"_c";
		    
		    }
		
		}
		/////////////////////////////////
	    document.getElementById("st_r_"+id).id="st_r_"+id+"_c";
	    }
	
	
	
	}
	else
	{
	
	    //alert("unchecked");
	    while(document.getElementById("st_r_"+id+"_c")!=null)
	    {
	    document.getElementById("st_r_"+id+"_c").firstChild.nextSibling.firstChild.checked=false;
	    document.getElementById("st_r_"+id+"_c").id="st_r_"+id;
	    }
	}
}


function hauptthema()
{
var count=1;
var cond=1;
while(cond==1)
{

	if(document.getElementById(count)==null)
	{
	cond=0;
	}
	else
	{
	    document.getElementById(count).checked=true;

	    //var test=document.getElementById(count+"_sub");
	    //alert("erg: "+test.checked+"|id: "+test.id);
	    if(document.getElementById(count+"_sub")!=null)
	    {
	    document.getElementById(count).checked=false;
	    }
	count++;
	}
//alert(count-1);
}    
    

}


function checked(id)
{
//alert("funktion checked startet");
var id;
var part;
var count;
var dummy;
var uncheck=0;
part=id.split("_");
//alert(part[3]);




    if(document.getElementById(id).checked==false)
    {
    dummy=document.getElementById(id).parentNode.parentNode;
    dummy.id="st_r_"+part[3];
    //document.getElementById("n_"+part[3]+"_cb").checked=false;
    document.getElementById("n_"+part[3]+"_cb").disabled=true;
    document.getElementById("n_"+part[3]+"_hidd").style.left="38px";
    
    
    /////////////////
    count=0;
	
	while(document.getElementById(count+"_st_c_"+part[3])!=null)
	{
	    if(document.getElementById(count+"_st_c_"+part[3]).checked==true)
	    {
	    uncheck++;	
	    }
	count++;
	}
	
    if(uncheck==0)
    {
    document.getElementById("n_"+part[3]+"_cb").disabled=false;
    document.getElementById("n_"+part[3]+"_hidd").style.left="338px";
    document.getElementById("n_"+part[3]+"_cb").checked=false;
    dummy=document.getElementById(id).parentNode.parentNode;
    dummy.id="st_r_"+part[3];
    }
    
    }
    else
    {
    dummy=document.getElementById(id).parentNode.parentNode;
	dummy.id="st_r_"+part[3]+"_c";
    
    document.getElementById("n_"+part[3]+"_cb").disabled=true;
    ///////////////////////////////////////////////////////////
    document.getElementById("n_"+part[3]+"_hidd").style.left="38px";
    //document.getElementById("n_"+part[3]+"_hidd").style.top="4px";
    ///////////////////////////////////////////////////////////
    
    document.getElementById("n_"+part[3]+"_cb").checked=true;
    
    count=0;
	
	while(document.getElementById(count+"_st_c_"+part[3])!=null)
	{
	    if(document.getElementById(count+"_st_c_"+part[3]).checked==false)
	    {
	    uncheck++;	
	    }
	count++;
	}
	
	if(uncheck==0)
	{
	document.getElementById("n_"+part[3]+"_cb").disabled=false;
	document.getElementById("n_"+part[3]+"_hidd").style.left="338px";
	document.getElementById("n_"+part[3]+"_cb").checked=true;
	dummy=document.getElementById(id).parentNode.parentNode;
	dummy.id="st_r_"+part[3]+"_c";
	}
    }
}

function show_hide(action,id)
{
var action;
var id;
var dummy;
var link;
var img;
var del;

if(action==1)
{

//makeRequest('/fileadmin/newsflash/ajax.php?id='+id,'2',id);//abfragen der Themen
	document.getElementById(id).style.display="block";
	dummy=document.getElementById("n_"+id+"_sh");//sh=show_hide		id für das +/- zum aus bzw. einklappen
	link=document.createElement('a');
	link.href="javascript:show_hide(2,"+id+")";
	img=document.createElement('img');
	img.src="/fileadmin/images/newsflash/del.gif";
	img.width="15";
	img.height="14";
	img.border="0";
	img.alt="";
	//img.title="Alternativ-Bauteile ausblenden";
	link.appendChild(img);
	dummy.replaceChild(link,dummy.firstChild);
	dummy.nextSibling.nextSibling.className="tg";
	
}
else if(action==2)
{

	dummy=document.getElementById("n_"+id+"_sh");
	link=document.createElement('a');
	link.href="javascript:show_hide(1,"+id+")";
	img=document.createElement('img');
	img.src="/fileadmin/images/newsflash/add.png";
	img.width="15";
	img.height="14";
	img.border="0";
	img.alt="";
	//img.title="Alternativ-Bauteile anzeigen";
	link.appendChild(img);
	dummy.replaceChild(link,dummy.firstChild);
	dummy.nextSibling.nextSibling.className="st";
	del=document.getElementById(id);
	del.style.display="none";
	//del.style.visibility="hidden";
	//dummy=document.getElementById(id).parentNode;
	//dummy.removeChild(del);
	

}
//makeRequest('/fileadmin/newsflash/ajax.php?id='+id,'2',id);//abfragen welche themen vorselektiert werden msen

}

function change()//Zaehlt hoch sobald im Auswahl-Formular(Newsflash) etwas geaendert wird
{
    if(ch_flag==0)
    {
    //alert(ch_flag);
    ch_flag=1;
    //document.getElementById("logout").disabled=true;
    document.getElementById("logout_warning").innerHTML=unescape("<font color=\"red\">Bitte Speichern Sie Ihre Abonnement-%C4nderungen bevor Sie sich abmelden!</font>");
    document.getElementById("abo_save").disabled=false;
    //alert(ch_flag);
    }
    
}

function logout_confirm()
{
    if(ch_flag==1)
    {
    var opt=confirm(unescape("Wollen Sie sich abmelden ohne Ihre Abonnement-%C4nderungen zu speichern?"));
	if(opt==false)
	{
	return false;
	}
    }
}

function disable_onsubmit()
{//alert(document.auswahl_form.onsubmit);
document.auswahl_form.onsubmit="";

}
