//--built 07---------------------------------------------------------------------------//
//--by      martin hein  www.digitale-mehrwerte.eu  (hein@digitale-mehrwerte.eu)-------//
//alert("init.js");

function addLoadEvent (func) 
                     {//alert("addLoadEvent"+func);
																				  var oldonload = window.onload;
																				  if (typeof window.onload != 'function') 
																						  {
																				     window.onload = func;
																				    } 
																					 else 
																					      {
																				        window.onload = function() {oldonload();func();}
																				       }
                     }
																					
function addFocusEvent (func, object) 
                     {
																				  var oldonfocus = object.onfocus;
																				  if (typeof object.onfocus != 'function') 
																						  {
																				     object.onfocus = func;
																				    } 
																					 else 
																					      {
																				        object.onfocus = function() {oldonfocus();func();}
																				       }
                     }


// iemenuhover			
//if(browser=="iexplore")addLoadEvent(iemenuhover);										
function iemenuhover ()
                    {
																				 mainmenu_ulOjb = document.getElementById("mainmenu_ul");
																					if (mainmenu_ulOjb)
																					  {
																								mainmenu_liA = mainmenu_ulOjb.getElementsByTagName("li");
																								for (i=0; i<mainmenu_liA.length; i++)
																								   {
																											 mainmenu_liA[i].onmouseover = hover;
																												mainmenu_liA[i].onmouseout = unhover;
																											}
																								}
																				}
																														
var lastobj;
var lastobj_className;
function hover ()
              {//alert("hover()");
               if (this.className.indexOf("hilite")==-1)
                 {
                  lastobj_className = this.className;
                  lastobj = this;
                  this.className = this.className+"hilite";
                 }
               return true;
              }
              
 function unhover ()
              {//alert("unhover()");
               if (lastobj) lastobj.className = lastobj_className;
               return true;
              }
             
// ieinputonfocus: input:focus für ineternetexplorer
if(browser=="iexplore")addLoadEvent(ieinputfocus);													
function ieinputfocus ()
                    {//alert("ieinputfocus()");
																					inputA = document.getElementsByTagName("input");
																					for (i=0; i<inputA.length ; i++)
																					   {
																								 inputA[i].onfocus = ieinputonfocus;
																									inputA[i].onblur = ieinputonblur;
																								}
																				}

function ieinputonfocus	()
                       {
																							 if (this.type != "checkbox" && this.type != "radio") 
																							 this.className = this.className+" input_focus";
																							}			
																																							
function ieinputonblur	()
                       {
																							 this.className = this.className.replace(" input_focus","");
																							}
																							
// ietrhover: wird auf der tasklste im admin verwendet			
if(browser=="iexplore")addLoadEvent(ietrhover);										
function ietrhover ()
                    {
																				 structureTableOjb = document.getElementById("structureTable");
																					if(!structureTableOjb) structureTableOjb = document.getElementById("taskTable");
																					if (structureTableOjb)
																					  {
																								structureTable_trA = structureTableOjb.getElementsByTagName("tr");
																								for (i=1; i<structureTable_trA.length; i++)
																								   {
																											 structureTable_trA[i].onmouseover = hover;
																												structureTable_trA[i].onmouseout = unhover;
																											}
																								}
																				}
																				


