//eyegix corescripts
var infoToggleDuration = 400;
function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Sorry! This website requires a modern web browser like Firefox, Safari or IE6.");
    location.href = "100.htm";
  }
};

var infoPanes = function() {	
	document.getElementsByClassName('subcat').each( 
		function(element){ 	
			element.fx = new fx.Height(element, {duration: 400, onComplete: function(){
			if (element.offsetHeight > 0) element.style.height = "auto";}});
			element.fx.hide();			
		}
	);

		document.getElementsByClassName('maincat2end').each(
		function(element){ 
			element.onclick = function() {
				Element.find(element, 'nextSibling').fx.toggle();
				if(element.style.backgroundImage == 'url(../images/nav_subcat_end_m.gif)')
					{
					element.style.backgroundImage = 'url(../images/nav_subcat_ende.gif)';
					}
				else
					{
					element.style.backgroundImage = 'url(../images/nav_subcat_end_m.gif)';
					}
              }
		}	
    );

		document.getElementsByClassName('maincat2').each(
		function(element){ 
			element.onclick = function() {
				Element.find(element, 'nextSibling').fx.toggle();
				if(element.style.backgroundImage == 'url(../images/nav_subcat_m.gif)')
					{
					element.style.backgroundImage = 'url(../images/nav_subcat.gif)';
					}
				else
					{
					element.style.backgroundImage = 'url(../images/nav_subcat_m.gif)';
					}
              }
		}	
    );
    
	
	document.getElementsByClassName('maincat').each(
		function(element){ 
			element.onclick = function() {
				Element.find(element, 'nextSibling').fx.toggle();
				if(element.style.backgroundImage == 'url(../images/nav_maincat_m.gif)')
					{
					element.style.backgroundImage = 'url(../images/nav_maincat.gif)';
					}
				else
					{
					element.style.backgroundImage = 'url(../images/nav_maincat_m.gif)';
					}					
			}
		}
	);
 
};

var supaInit = function() {
	infoPanes();
};
addEvent(window, 'load', supaInit, false);

//eyegix ahah-calling
function swap_rs(rs) { 
callAHAH('raumstoff.php?content= '+rs, 'raumstoff', 'loading...', 'Error!'); 
} 
function swap_tm(tm) { 
callAHAH('transmit.php?content= '+tm, 'transmit', 'loading...', 'Error!'); 
}
function swap_pl(pl) { 
callAHAH('paullouise.php?content= '+pl, 'paullouise', 'loading...', 'Error!'); 
}
function swap_ws(ws) { 
callAHAH('workspace.php?content= '+ws, 'workspace', 'loading...', 'Error!'); 
}
function swap_rt(rt) { 
callAHAH('righttype.php?content= '+rt, 'righttype', 'loading...', 'Error!'); 
}
function swap_tf(tf) { 
callAHAH('testform.php?content= '+tf, 'testform', 'loading...', 'Error!'); 
}
function swap_bv(bv) { 
callAHAH('beachvolleyball.php?content= '+bv, 'beachvolleyball', 'loading...', 'Error!'); 
}
function swap_rb(rb) { 
callAHAH('rotebuehl.php?content= '+rb, 'rotebuehl', 'loading...', 'Error!'); 
}
function swap_sl(sl) { 
callAHAH('screenloft8.php?content= '+sl, 'screenloft8', 'loading...', 'Error!'); 
}
function swap_bm(bm) { 
callAHAH('bmen.php?content= '+bm, 'bmen', 'loading...', 'Error!'); 
}
function swap_nt(nt) { 
callAHAH('novatero.php?content= '+nt, 'novatero', 'loading...', 'Error!'); 
}
function swap_wp(wp) { 
callAHAH('wallpaper.php?content= '+wp, 'wallpaper', 'loading...', 'Error!'); 
}
function swap_sys(sys) { 
callAHAH('system.php?content= '+sys, 'system', 'loading...', 'Error!'); 
}

//eyegix hello
function helloeyegix(name,domain) {
document.location = "mailto:" + name + "@" + domain;
}
