//

var InfoClass = {
	pX : -1,
    pY : -1,
    tm : false,
    op : 0,
    oStep : 10,
    browser : "",
	getX:function (obj,relative)
	{
		var x=0;
		if (typeof(relative) == "undefined") relative = false;
		if(typeof(obj)=="object" && document.getElementById)
		{
			x=obj.offsetLeft;
			if(obj.offsetParent && !relative)
			{
				x += InfoClass.getX(obj.offsetParent);
			}
			return x;
		}
		else return false;
	},

	getY:function(obj,relative)
	{
		var y=0;
		if (typeof(relative) == "undefined") relative = false;
		if(typeof(obj)=="object" && document.getElementById)
		{
			y=obj.offsetTop;
			if(obj.offsetParent && !relative)
			{
				y += InfoClass.getY(obj.offsetParent);
			}
			return y;
		} else return false;
	},

	getElementPosition:function(obj)
	{
		var x = InfoClass.getX(obj);
		var y = InfoClass.getY(obj);
		return {x:x, y:y};
	},

    opacity:function(obj,val)
    {
    	if (InfoClass.browser == "")
        {
        	var ag = navigator.userAgent.toLowerCase();
            if (ag.indexOf("msie") != -1) InfoClass.browser = "ie";
            else InfoClass.browser = "nie";
        }
        switch(InfoClass.browser)
        {
        	case "ie":
	        	if (val >= 95) obj.style.filter = "";
        		else obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + val.toString() + ",finishOpacity=0)";
                break;
            default:
            	obj.style.opacity = val < 100 ? "0." +  val.toString() : "1";
                break;
        }
    },

    showButtonInfo:function(nr)
    {
        if (typeof(nr) == "undefined") return;
        if (typeof(ktg_array[nr]) == "undefined") return;
        if (InfoClass.tm) clearTimeout(InfoClass.tm);
		if (InfoClass.pX == -1)
       {
            var pos = InfoClass.getElementPosition($("dCms"));
            InfoClass.pX = pos.x;
            InfoClass.pY = pos.y;
            $("bInfoLayer").style.top = InfoClass.pY.toString()+"px";
            $("bInfoLayer").style.left = InfoClass.pX.toString()+"px";
       }
       $("bInfoLayer").style.backgroundImage = "url(/images/"+ktg_array[nr].img+")";
       var transp = (InfoClass.browser == "ie") ? "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src='/navigation/w80.png',sizingMethod='scale')" : "background-image:url(/navigation/w80.png)";
       $("bInfoLayer").innerHTML = '<table cellpadding="0" cellspacing="0" border="0" style="width:235px;height:404px;margin-left:100px;' + transp + ';"><tr><td valign="top" style="padding:140px 10px 10px 10px;"><h1 style="font-size:36px;font-weight:normal;color:' +  ktg_array[nr].color + ';">' + ktg_array[nr].name + '</h1><p style="font-size:11px;line-height:120%;">' + ktg_array[nr].descr  + '</p></td></tr></table>';
       $("bInfoLayer").style.display = "";
       InfoClass.showOp();
    },

    showOp:function()
    {
        if (InfoClass.tm) clearTimeout(InfoClass.tm);
        if (InfoClass.op < 100)
        {
        	InfoClass.op += InfoClass.oStep;
            InfoClass.opacity($("bInfoLayer"),InfoClass.op);
            InfoClass.tm = window.setTimeout ("InfoClass.showOp()",1);
        }
        else
        {
            InfoClass.opacity($("bInfoLayer"),100);
	        InfoClass.op = 100;
            $("bInfoLayer").style.display = "";
        }
    },

    hideButtonInfo:function()
    {
        if (InfoClass.tm) clearTimeout(InfoClass.tm);
        if (InfoClass.op > InfoClass.oStep)
        {
        	InfoClass.op -= InfoClass.oStep;
            InfoClass.opacity($("bInfoLayer"),InfoClass.op);
            InfoClass.tm = window.setTimeout ("InfoClass.hideButtonInfo()",1);
        }
        else
        {
            $("bInfoLayer").style.display = "none";
        }
    },
    _usedFlash:function()
	{
		var FV=0;
		var n = navigator;
		if (n.plugins && n.plugins.length)
		{
			for (var i = 0; i < n.plugins.length; i++)
		 	{
				if (n.plugins[i].name.indexOf('Shockwave Flash') != -1)
				{
					FV = n.plugins[i].description.split('Shockwave Flash ')[1];
					break;
				}
			}
		}
		else if (window.ActiveXObject)
		{
			for (var i=16;i>=2;i--)
			{
				try
				{
					var isflash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+i+"');");
					if (isflash)
					{
						FV = i;
						break;
					}
				}
				catch(e) {}
			}
		}
		return parseInt(FV);
	},
    setButtonsEvent:function()
    {
        if (!$("dBnavig")) return;
        if ($("dBnavig") == null) return;
        if (!$("dBnavig").childNodes) return;

        for (var i = 0; i < $("dBnavig").childNodes.length; i++)
        {
            if (!$("dBnavig").childNodes[i].tagName) continue;
            if ($("dBnavig").childNodes[i].tagName.toLowerCase() != "a") continue;
            eval('addEvent($("dBnavig").childNodes[i],"mouseover",function() { InfoClass.showButtonInfo(' + $("dBnavig").childNodes[i].id.replace("e","","gi") + ') } );');
            addEvent($("dBnavig").childNodes[i],"mouseout",InfoClass.hideButtonInfo);
        }

        /// Neues Jahr
        var fv = InfoClass._usedFlash();
        var date = new Date();
		if (fv > 6 && $("ccMotiveImage") && date.getMonth() == 11 && date.getFullYear() == 2009)
		{
        	var fHtml = '<div id="ccFlashNN" style="display:;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="618" height="404" title="concept-computer GmbH">';
			fHtml += '<param name="movie" value="scripts/Weihnachten.swf"><param name="quality" value="high" />';
			fHtml += '<embed src="scripts/Weihnachten.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="618" height="404"></embed>';
			fHtml += '</object></div>';
			$("ccMotiveImage").innerHTML = fHtml;
			$("ccMotiveImage").style.width = "618px";
			$("ccMotiveImage").style.height = "404px";
        }

        $("bInfoLayer").innerHTML = preloadStr;
        InfoClass.opacity($("bInfoLayer"),0);
	}
};
addEvent(window,"load",InfoClass.setButtonsEvent);
var ktg_array = new Array();

ktg_array[1] = new Object({
	name : 'Internet Agentur',
	descr : 'Unsere Internet-Spezialisten realisieren Ihren Internetauftritt, Ihr Intranet, Ihren Online-Shop oder spezielle Lösungen für Sie.',
	img : 'Portale/portal-internet.jpg',
	color: '#0080c6'
});

ktg_array[2] = new Object({
	name : 'Multimedia Agentur',
	descr : 'Durch den Einsatz von Multimedia-Techniken werden Kataloge und Broschüren spannender und informativer. Denn elektronische Medien können zu geringeren Kosten deutlich mehr Informationen aufnehmen und darstellen als Printmedien.',
	img : 'Portale/portal-multimedia.jpg',
	color: '#e43133'
});

ktg_array[8] = new Object({
	name : 'Seminar Center',
	descr : 'Um mit moderner, leistungsstarker Software effizient arbeiten zu können, sind unsere Seminare optimal auf die Bedürfnisse der Anwender abgestimmt.',
	img : 'Portale/portal-seminar.jpg',
	color: '#09894e'
});

ktg_array[9] = new Object({
	name : 'Wir über uns',
	descr : 'concept-computer wurde 1989 als EDV-Systemhaus gegründet.',
	img : 'Portale/portal-wir.jpg',
	color: '#ad007c'
});

ktg_array[51] = new Object({
	name : 'Diverse Dateien',
	descr : '',
	img : '',
	color: ''
});

ktg_array[158] = new Object({
	name : 'Werbe Agentur',
	descr : 'Als Full-Service Werbeagentur bieten wir mit Klassischer Werbung, Internetlösungen, Multimedia, Design und Direktmarketing das gesamte Spektrum der wichtigsten Werbemaßnahmen.',
	img : 'Portale/portal-werbe.jpg',
	color: '#eb6909'
});

ktg_array[289] = new Object({
	name : 'EDV Systemhaus',
	descr : 'Als Fullservice-Systemhaus stehen wir Ihnen bei der EDV-Ausstattung Ihres  Unternehmens hilfreich zur Seite. ',
	img : 'Portale/portal-edv.jpg',
	color: '#7a8d8e'
});

ktg_array[486] = new Object({
	name : 'AGB',
	descr : '',
	img : '',
	color: ''
});
var preloadStr = '<img src="/images/Portale/portal-internet.jpg" width="1" height="1" alt="bild"><img src="/images/Portale/portal-multimedia.jpg" width="1" height="1" alt="bild"><img src="/images/Portale/portal-seminar.jpg" width="1" height="1" alt="bild"><img src="/images/Portale/portal-wir.jpg" width="1" height="1" alt="bild"><img src="/images/Portale/portal-werbe.jpg" width="1" height="1" alt="bild"><img src="/images/Portale/portal-edv.jpg" width="1" height="1" alt="bild">';
document.writeln('<div id="bInfoLayer" style="position:absolute;display:none;z-index:100;width:618px;height:404px;top:0;left:0;text-align:left;"></div>');
