//Funktion zum Testen von Frameseiten damit sie nicht alleine geoeffnet werden koennen.

function frameTest(){

  if(top == self) {

    var home = "index.html";

    var imMoment = unescape(window.location.pathname);

    var neueURL = home + "?u=" + imMoment;



    var appVer = navigator.appVersion;

    var NS = (navigator.appName == 'Netscape') && ((appVer.indexOf('3') != -1) || (appVer.indexOf('4') != -1));

    var MSIE = (appVer.indexOf('MSIE 4') != -1);

    if (NS || MSIE)

      location.replace(neueURL);

    else

      location.href = neueURL;

    }

}







function showinfo (num){

        parent.frames[2].location.href="http://www.gkk.net/beschreib.htm#" + num

}







function nav(){

        //Diese Funktion darf nur auf der Startseite verwendet werden!

        navigatorfile="list.htm"

        params = "width=270,height=552,resizable=0,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0"

        newwin = window.open( navigatorfile , "navigator", params)





   if (window.newwin && newwin.moveTo)  

    newwin.moveTo(0, 0);    

   

   if (window.newwin && newwin.focus)

    newwin.focus();



}









//Funktion zum Verlinken von Pulldown Menues 

function GMForm20ad5b2Link(){

 if(document.GMForm20ad5b2.GoMenu.options[document.GMForm20ad5b2.GoMenu.selectedIndex].value != ''){parent.top.location.href = document.GMForm20ad5b2.GoMenu.options[document.GMForm20ad5b2.GoMenu.selectedIndex].value; document.GMForm20ad5b2.GoMenu.selectedIndex=0; 

}

 }

 
 

// Funktion zur Berechnung der Kuehllast

function calculer(temp,besoin)



{ with(document.service){



if (temp.value=="31") {F60.value=-((besoin.value/100)*12)}



if (temp.value=="32") {F60.value=-((besoin.value/100)*9)}



if (temp.value=="33") {F60.value=-((besoin.value/100)*6)}



if (temp.value=="34") {F60.value=-((besoin.value/100)*3)}



if (temp.value=="35") {F60.value="0"}



if (temp.value=="36") {F60.value=-(-(besoin.value/100)*3)}



if (temp.value=="37") {F60.value=-(-(besoin.value/100)*6)}



if (temp.value=="38") {F60.value=-(-(besoin.value/100)*9)}



if (temp.value=="39") {F60.value=-(-(besoin.value/100)*12)}



if (temp.value=="40") {F60.value=-(-(besoin.value/100)*15)}



if (temp.value=="41") {F60.value=-(-(besoin.value/100)*18)}



 



F70.value=-(-besoin.value-F60.value)



 }



} 



function test()



{ with(document.service){



if (T1.value<31|T1.value>41) {alert("The value must be included between 31 and 41")}



 }



}







function affich(mesure,dest,coef)



{



dest.value=mesure.value*coef



with(document.service){



total.value=-(-F21.value-F22.value-F23.value-F24.value-F25.value-F26.value-F27.value-F28.value-F29.value-F30.value-F31.value-F32.value-F33.value-F34.value-F35.value-F36.value)



besoin.value=total.value*2.5



}



}













//Funktion zum &Ouml;ffnen eines neuen mittleren Fensters mit dem Aufruf --- openpopup('Pfad + Dateiname', 'Name des Fensters', 'Breite des Fensters', 'H&ouml;he des Fensters') ---

var temp;

function openpopup (myfile, myname, breite, hoehe)

{

        if((navigator.appName.indexOf("Explorer")!=-1)&&(parseInt(navigator.appVersion.substring(0,1))<4))

                {

                params = "width=" + breite + ",height=" + hoehe + ",resizable=1,status=1,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=0,left=50";

        newwin = window.open( myfile , myname , params) ;

                }

        else

                {

                        if(temp)

                        {

                                if(!temp.closed)

                                        {

                                        temp.close();temp="";

                                        }

                        }

                

        params = "width=" + breite + ",height=" + hoehe + ",resizable=1,status=1,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=0,left=50";

        newwin = window.open( myfile , myname , params) ;

                temp = newwin;

                temp.name = "temp";

                newwin="";

                }

}







//Funktion zum &Ouml;ffnen eines neuen kleinen Fensters mit dem Aufruf --- openpopup_klein('Pfad + Dateiname', 'Name des Fensters', 'Breite des Fensters', 'H&ouml;he des Fensters') ---

var temp;

function openpopup_klein (myfile, myname, breite, hoehe)

{

        if((navigator.appName.indexOf("Explorer")!=-1)&&(parseInt(navigator.appVersion.substring(0,1))<4))

                {

                params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=100,left=100";

        newwin = window.open( myfile , myname , params) ;

                }

        else

                {

                        if(temp)

                        {

                                if(!temp.closed)

                                        {

                                        temp.close();temp="";

                                        }

                        }

                

        params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=100,left=100";

        newwin = window.open( myfile , myname , params) ;

                temp = newwin;

                temp.name = "temp";

                newwin="";

                }

}



//Funktion zum &Ouml;ffnen eines neuen grossen Fensters mit dem Aufruf --- openpopup_gross('Pfad + Dateiname', 'Name des Fensters', 'Breite des Fensters', 'H&ouml;he des Fensters') ---

var temp;

function openpopup_gross (myfile, myname, breite, hoehe)

{

        if((navigator.appName.indexOf("Explorer")!=-1)&&(parseInt(navigator.appVersion.substring(0,1))<4))

                {

                params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=1,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=0,left=0";

        newwin = window.open( myfile , myname , params) ;

                }

        else

                {

                        if(temp)

                        {

                                if(!temp.closed)

                                        {

                                        temp.close();temp="";

                                        }

                        }

                

        params = "width=" + breite + ",height=" + hoehe + ",resizable=0,status=1,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,top=0,left=0";

        newwin = window.open( myfile , myname , params) ;

                temp = newwin;

                temp.name = "temp";

                newwin="";

                }

}



//Funktion zum Wechseln von 2 Frames



     function ZweiFrames(URL1,F1,URL2,F2)

     {  

      parent.frames[F1].location.href=URL1;

      parent.frames[F2].location.href=URL2;

     }

    