var i = 1;




banner1 = new Image();
banner1.src = "../spon/acBanner_468-60.gif";

banner2 = new Image();
banner2.src = "../spon/acBanner_468-60.gif";









links = new Array



links[1] = "http://www.acadGraph.de"

links[2] = "http://www.acadGraph.de"







function startTime()
{
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=11; // Anzeigedauer (hier: 3 Sek. kann variiert werden)
        Timer();
}

function Timer()
{
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        curTime=hours*3600+mins*60+secs;
        if (curTime>=closeTime)
        {
                if (i < 2)   // Anzahl der Banner (hier: 3 Stck. zahl variabel,
                 // aber dann muessen auch die Links und Image Sources angepasst werden)
                {
                        i++;
                        document.banner.src = eval("banner" + i + ".src");
                }
                else
                {
                        i = 1;
                        document.banner.src = eval("banner" + i + ".src");
                }
                startTime();
        }
        else
        {
                window.setTimeout("Timer()",1000);
        }
}


function clickLink()
{
        top.location = links[i];
}




var s = 1;
bann1= new Image();
bann1.src = "../spon/ADSK_logo_150.gif";
bann2= new Image();
bann2.src = "../spon/Topcon-Logo.jpg";
bann3 = new Image();
bann3.src = "../spon/iac.gif";




link = new Array
link[1] = "http://www.autodesk.de"
link[2] = "http://www.topcon.de"
link[3] = "http://www.iac-leipzig.de"




function startTime1()
{
        var times= new Date();
        hours= times.getHours();
        mins= times.getMinutes();
        secs= times.getSeconds();
        closeTimes=hours*3600+mins*60+secs;
        closeTimes+=4; // Anzeigedauer
        Timer1();
}

function Timer1()
{
        var times= new Date();
        hours= times.getHours();
        mins= times.getMinutes();
        secs= times.getSeconds();
        curTimes=hours*3600+mins*60+secs;
        if (curTimes>=closeTimes)
        {
                if (s < 3)   // BannerZahl
                {
                        s++;
                        document.bann.src = eval("bann" + s + ".src");
                }
                else
                {
                        s = 1;
                        document.bann.src = eval("bann" + s + ".src");
                }
                startTime1();
        }
        else
        {
                window.setTimeout("Timer1()",2000);
        }
}


function clickLink2()
{
        top.location = link[s];
}



function infokasten(url1,fname,att)

{ var win;
  var url1;
  var fname;
  var att;
  win=window.open(url1,fname,att);
  win.moveTo(100,50);
  win.focus();
}

function fensterauf()

{ var win;

  win=window.open("http://www.business-geomatics.com/pages/probeexemplar.html","","width=800,height=800,resizable=no,screenX=50,screenY=50,scrollbars=yes,toolbar=no,location=no,titlebar=no,status=no");
  win.moveTo(50,50);
  win.focus();
 }

function fensterauf2()

{ var win2;

  win2=window.open("fenster2.html","","width=370,height=560,resizable=yes,screenX=20,screenY=20,scrollbars=no,toolbar=no,location=no,titlebar=no,status=no");
  win2.moveTo(20,20);
  win2.focus();
 }
function fensterauf3()

{ var win;

  win=window.open("http://www.business-geomatics.com/pages/eintrag_us.html","","width=800,height=800,resizable=no,screenX=50,screenY=50,scrollbars=yes,toolbar=no,location=no,titlebar=no,status=no");
  win.moveTo(50,50);
  win.focus();
 }



function printText(id_name){
  if (document.getElementById != null){

    //start HTML-page
    var create_html = '<HTML>\n';
    create_html += '<HEAD>\n';

    //fill HEAD-section
    if (document.getElementsByTagName != null){
       var headTags = document.getElementsByTagName("head");
       if (headTags.length > 0)create_html += headTags[0].innerHTML;}
    create_html += '\n</HEAD>\n';

    //fill BODY-section
    create_html += '<BODY>\n';
    var content = document.getElementById(id_name);
    if (content != null){create_html += content.innerHTML;}
    else {alert("Could not find the print section in the page. Please, contact the administrator."); return; }

    create_html += '\n<div align="left"><a class="print" href="javascript:window.close()">Fenster schließen</a></div>';
    create_html += '\n</BODY>\n</HTML>';

    //prepare print window
    var newWin = window.open("","printService","top=50,left=50,scrollbars=1,menubar=0,status=0");
    newWin.document.open();
    newWin.document.write(create_html);
    newWin.document.close();
    newWin.print();
  }
  else {alert("Sorry, the print ready feature is only available in modern browsers.\nPlease select File - Print from your browser menu options.");}
}






/*****************************************************
     Floater-Code (Javascript)

         Code kann frei verwendet werden, wenn der
         URHEBERHINWEIS NICHT ENTFERNT wird

     (c) Sandra Wiegard 2002
         www.Elfengleich.de
         www.Sandra-Wiegard.de

*****************************************************/
var floater;
var theTop = 0;
var old = theTop;


function init()
{
        floater = new getObj('floater');
        movefloater();
}


function getObj(name)
{
  if (document.getElementById)
  {
          this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
        this.obj = document.all[name];
        this.style = document.all[name].style;
  }
  else if (document.layers)
  {
        this.obj = getObjNN4(document,name);
        this.style = this.obj;
  }
}


function movefloater()
{
        /** Abstand zum Dokumentanfang ermitteln *********************************/
        if (window.innerHeight)                                        // Netscape 4.x
        {        pos = window.pageYOffset}

        else if (document.documentElement && document.documentElement.scrollTop)
        {        pos = document.documentElement.scrollTop}

        else if (document.body)                                        // IE
        {        pos = document.body.scrollTop}

        if (pos < theTop) pos = theTop;
        else pos += 0;

        if (pos != old)
        {
                /** Immer kleine werdende Schritte definieren **/
                pos = (.1 *(pos-old))+old;
                floater.style.top = pos +"px";
        }

        old = pos;
        temp = setTimeout('movefloater()',5);
}






function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		OhneTitel_1_01_over = newImage("http://www.business-geomatics.com/online/images/OhneTitel-1_01-over.gif");
		OhneTitel_1_02_over = newImage("http://www.business-geomatics.com/online/images/OhneTitel-1_02-over.gif");
		OhneTitel_1_03_over = newImage("http://www.business-geomatics.com/online/images/OhneTitel-1_03-over.gif");
		preloadFlag = true;
	}
}
