var graphicpath="/viomatrix/imgs";
var rows = 4;
var cols = 6;
var maxfelder = rows * cols;
var maxtime = "2000";
var maxheight = 0;
var pic;
var picx;
var picy;
var koordinate;
var zeit;
var b;
var p;
var atag;
var picstyle;
var mouseover;
var mouseover2;
var pic1;
var pic2;
var x = 0;
var contentx = 0;
var contenty = 0;
var testx = 0;
var y = 0;
var testy = 0;
var end_x = 0;
var end_y = 0;
var opacity = 0;
var go = 0;
var v = 10;
var l = 0;
var breakit = 0;
var box;
var font = 0;
var oldheight = 0;
var dimmid = 0;
var dimmlist = new Array();
var dimmmenge = 0;
var suborcount = 0;
var subortest = "";
var suborlistid = "";
var subortestpic = "";
var subortestpic_hover = "";
var suborsposition = "";
var suborlist = new Array();
var suborspositionid = "";
var suborlistpic = new Array();
var suborlistpic_hover = new Array();
var notdimmlist = new Array();
var position = "20px";
var suborclass = "";
var suborsposright = "";
var posright = "";
var classes;
var cssclass;
var testclass;
var classescount;
var dimmed = 0;
var lastdimmid = 0;
var kundenid = 0;
var starttime;
var vergangenezeit;
var sub;
var oldheightdetail = 0;
var links = new Array();
var sublinks = new Array();
var sublinkidlist = new Array();
links[0] = new Object();
links[0]["url"] = "agentur.html";
if(startseite == 1)
{
links[0]["pic1"] = "/agentur-icon.gif";
links[0]["pic2"] = "/agent.gif";
}
else
{
links[0]["pic1"] = "/agentur-icon.gif";
links[0]["pic2"] = "/agent.gif";
links[0]["pic3"] = "/agentur3.gif";
}
links[0]["id"] = "lx1y4";
links[0]["width"] = "";
links[0]["height"] = "";
links[0]["suborsposition"] = "left";
links[0]["suborspositionright"] = "0";
links[0]["subors"] += "|agentur_das_team.html";
links[0]["width"] += "|600";
links[0]["height"] += "|446";
links[0]["subors"] += "|agentur_unsere_vision.html";
links[0]["width"] += "|600";
links[0]["height"] += "|446";
links[0]["subors"] += "|agentur_mein_credo.html";
links[0]["width"] += "|600";
links[0]["height"] += "|446";
links[0]["suborsid"] = "|8|9|543747473";
links[0]["suborspic"] = "|team1.gif|vision2.gif|credo2.gif";
links[0]["suborspic_hover"] = "|tream2.gif|vision1.gif|credo1.gif";
links[0]["footer"] = "1";
links[1] = new Object();
links[1]["url"] = "news.html";
if(startseite == 1)
{
links[1]["pic1"] = "/news-icon.gif";
links[1]["pic2"] = "/news.jpg";
}
else
{
links[1]["pic1"] = "/news-icon.gif";
links[1]["pic2"] = "/news.jpg";
links[1]["pic3"] = "/news3.gif";
}
links[1]["id"] = "lx2y4";
links[1]["width"] = "";
links[1]["height"] = "";
links[1]["suborsposition"] = "left";
links[1]["suborspositionright"] = "1";
links[1]["suborsid"] = "";
links[1]["suborspic"] = "";
links[1]["suborspic_hover"] = "";
links[1]["footer"] = "1";
links[2] = new Object();
links[2]["url"] = "leistung_markenkommunikation.html";
if(startseite == 1)
{
links[2]["pic1"] = "/leistung-icon.gif";
links[2]["pic2"] = "/leistung.jpg";
}
else
{
links[2]["pic1"] = "/leistung-icon.gif";
links[2]["pic2"] = "/leistung.jpg";
links[2]["pic3"] = "/leistung3.gif";
}
links[2]["id"] = "lx3y4";
links[2]["width"] = "";
links[2]["height"] = "";
links[2]["suborsposition"] = "right";
links[2]["suborspositionright"] = "0";
links[2]["subors"] += "|leistung_markenkommunikation.html";
links[2]["width"] += "|600";
links[2]["height"] += "|446";
links[2]["subors"] += "|leistung_pr.html";
links[2]["width"] += "|600";
links[2]["height"] += "|446";
links[2]["subors"] += "|leistung_vertriebsaufbau.html";
links[2]["width"] += "|600";
links[2]["height"] += "|446";
links[2]["subors"] += "|leistung_internet.html";
links[2]["width"] += "|600";
links[2]["height"] += "|446";
links[2]["subors"] += "|leistung_event.html";
links[2]["width"] += "|600";
links[2]["height"] += "|446";
links[2]["suborsid"] = "|262808667|601639328|602581769|643300357|16";
links[2]["suborspic"] = "|mk2.gif|pr1.gif|vertrieb1.gif|internet2.gif|event1.gif";
links[2]["suborspic_hover"] = "|mk1.gif|pr2.gif|vertrieb2.gif|internet1.gif|event2.gif";
links[2]["footer"] = "1";
links[3] = new Object();
links[3]["url"] = "referenzen.html";
if(startseite == 1)
{
links[3]["pic1"] = "/refs-icon.gif";
links[3]["pic2"] = "/refs.jpg";
}
else
{
links[3]["pic1"] = "/refs-icon.gif";
links[3]["pic2"] = "/refs.jpg";
links[3]["pic3"] = "/referenzen3.gif";
}
links[3]["id"] = "lx4y4";
links[3]["width"] = "";
links[3]["height"] = "";
links[3]["subors"] = "";
links[4] = new Object();
links[4]["url"] = "kontakt.html";
if(startseite == 1)
{
links[4]["pic1"] = "/kontakt-icon.gif";
links[4]["pic2"] = "/kontakt.jpg";
}
else
{
links[4]["pic1"] = "/kontakt-icon.gif";
links[4]["pic2"] = "/kontakt.jpg";
links[4]["pic3"] = "/kontakt3.gif";
}
links[4]["id"] = "lx5y4";
links[4]["width"] = "";
links[4]["height"] = "";
links[4]["suborsposition"] = "right";
links[4]["suborspositionright"] = "0";
links[4]["subors"] += "|kontakt_karriere.html";
links[4]["width"] += "|600";
links[4]["height"] += "|446";
links[4]["subors"] += "|kontakt_unsere_partner.html";
links[4]["width"] += "|600";
links[4]["height"] += "|446";
links[4]["suborsid"] = "|18|326946804";
links[4]["suborspic"] = "|karriere-grau.gif|partner1.gif";
links[4]["suborspic_hover"] = "|karriere.gif|partner2.gif";
links[4]["footer"] = "1";
links[5] = new Object();
links[5]["url"] = "impressum_agb.html";
if(startseite == 1)
{
links[5]["pic1"] = "/agb-twokomlogo.gif";
links[5]["pic2"] = "/impr.jpg";
}
else
{
links[5]["pic1"] = "/agb-twokomlogo.gif";
links[5]["pic2"] = "/impr.jpg";
links[5]["pic3"] = "/impr3.gif";
}
links[5]["id"] = "lx6y4";
links[5]["width"] = "";
links[5]["height"] = "";
links[5]["subors"] = "";
var elementeliste = new Array();
for(var dx = 1;dx<=6;dx++)
{
for(var dy = 1;dy<=4;dy++)
{
elementeliste[elementeliste.length] = "lx" + dx + "y" + dy;
}
}
var browser = "";
var browserie = "";
if (navigator.appName.indexOf("Opera") != -1)
{
 browser = "opera";
}
else if (navigator.appName.indexOf("Explorer") != -1)
{
 if(window.XMLHttpRequest){browserie = "7";}else{browserie = "6";}
 browser = "ie";
}
else if (navigator.appName.indexOf("Netscape") != -1)
{
 browser = "netscape";
}
else
{
 browser = "anderer";
}
function setcontent() {
 var blacklist = new Array();
 if (document.cookie) {
 document.getElementById("popup").style.display = "none";
 } else {
 document.cookie = "layer=" + document.lastModified;
blacklist[0] = "lx4y2";
blacklist[1] = "lx5y2";
blacklist[2] = "lx4y3";
blacklist[3] = "lx5y3";
 }
 if(blacklist.length < maxfelder)
 {
for(coord = 0;coord < elementeliste.length;coord++)
{
var ruecksetzen = elementeliste[coord];
document.getElementById(ruecksetzen).innerHTML="&nbsp;";
document.getElementById(ruecksetzen).className="";
}
for(p = 0;p < 6;p++)
{
range = rows;
picy = Math.ceil(Math.random() * 1000) % range + 1;
range = cols;
picx = Math.ceil(Math.random() * 1000) % range + 1;
koordinate = "lx" + picx + "y" + picy;
for(b = 0;b <= blacklist.length;b++)
{
if(blacklist[b] == koordinate)
{
b = blacklist.length;
koordinate="";
}
}
if(koordinate)
{
var linkkoordinate = koordinate + "l";
document.getElementById(koordinate).innerHTML = "<a id=\"" + linkkoordinate + "\" h"+"ref=\"" + links[p]["url"] + "\" style=\"background-image: url(" + graphicpath + "/" + links[p]["pic1"] + ");\" onmouseover=\"picchange(this.id);\" onmouseout=\"picempty(this.id)\">&nbsp;</a>";
document.getElementById(koordinate).className = "aktiv";
pic1 = links[p]["pic1"];
pic2 = links[p]["pic2"];
links[p]["id"] = koordinate;
document.getElementById(linkkoordinate).onmouseover = function() { picchange(this.id); };
document.getElementById(linkkoordinate).onmouseout = function() { picempty(this.id); };
blacklist[blacklist.length] = koordinate;
}
else
{
p = p-1;
}
}
}
}
function hidemains() {
var hmy = 4;
for(hmx = 1;hmx <= cols;hmx++)
{
document.getElementById("lx" + hmx + "y" + hmy).onmouseover = "";
document.getElementById("lx" + hmx + "y" + hmy).onmouseout = "";
notdimmlist[notdimmlist.length] = "lx" + hmx + "y" + hmy;
}
}
function hidesubs() {
 if(notdimmlist.length > 0)
{
for(var count = 0;count < notdimmlist.length;count++)
{
var strtest = notdimmlist[count].split("x1");
var strtest2 = notdimmlist[count].split("x6");
var strtest3 = notdimmlist[count].split("y4");
if((strtest.length == 2 && strtest2.length == 1 && strtest3.length == 1) || (strtest.length == 1 && strtest2.length == 2 && strtest3.length == 1))
{
document.getElementById(notdimmlist[count]).innerHTML="";
document.getElementById(notdimmlist[count]).className = "";
}
document.getElementById(notdimmlist[count]).className = document.getElementById(notdimmlist[count]).className + " dimmmich";
setopacity(notdimmlist[count],100);
}
}
}
function setopacity(id,opacity) {
 var ffopacity = opacity / 100;
 document.getElementById(id).style.opacity = ffopacity;
 document.getElementById(id).style.filter = "alpha(opacity=" + opacity + ")";
}
function picempty (picid,picnew) {
 if(!picnew && picid)
 {
  for(p = 0;p < links.length;p++)
 {
var linkkoordinate = links[p]["id"] + "l";
 if(picid == linkkoordinate)
 {
 picnew = graphicpath + "/" + links[p]["pic1"];
 }
 }
 }
 document.getElementById(picid).style.backgroundImage = "url(" + picnew + ")";
}
function picchange (picid,picnew) {
 if(!picnew && picid)
 {
  for(p = 0;p < links.length;p++)
 {
var linkkoordinate = links[p]["id"] + "l";
 if(picid == linkkoordinate)
 {
 picnew = graphicpath + "/" + links[p]["pic2"];
 }
 }
 }
 document.getElementById(picid).style.backgroundImage = "url(" + picnew + ")";
}
function picchange2(fromid,useid,pic,width,height,thisid,picbig) {
document.getElementsByTagName("a").className = "";
var aelements = document.getElementsByTagName("a");
for(acount = 0;acount < aelements.length;acount++)
{
if(aelements[acount].className == "aktiv")
{
aelements[acount].className = "";
}
}
document.getElementById(useid).src = graphicpath + "/" + pic;
document.getElementById(thisid).className = "aktiv";
document.getElementById(useid).style.width = width + "px";
document.getElementById(useid).style.height = height + "px";
if(picbig)
{
var useidbig = useid + "b";
document.getElementById("piclink").href = graphicpath + "/" + picbig;
document.getElementById("piclink").rel = "lightbox";
}
else
{
document.getElementById("piclink").href = "";
document.getElementById("piclink").rel = "nothing";
document.getElementById("piclink").onclick = function () { return false; };
}
Lightbox.prototype.updateImageList();
}
function resetforms(aktuell) {
if(aktuell.id != "form1"){document.getElementById("form1").options[0].selected = "selected";}
if(aktuell.id != "form2"){document.getElementById("form2").options[0].selected = "selected";}
if(aktuell.id != "form3"){document.getElementById("form3").options[0].selected = "selected";}
if(aktuell.id != "form4"){document.getElementById("form4").options[0].selected = "selected";}
}
function fillforms(thiskundenid) {
for (var i=0;i<document.getElementById('form1').options.length;i++) {
if(document.getElementById('form1').options[i].value == kundenid)
{
document.getElementById('form1').options[i].selected = "selected";
break;
}
}
}
