function TurnOff(sectionName, imgName, imgNo, activeNo)
{
        imgOff = new Image();
        if (activeNo==imgNo) imgOff.src = "/images/"+imgName+"_a.gif";
        else imgOff.src = "/images/"+imgName+"_na.gif";
        document[sectionName+imgName+imgNo].src = imgOff.src;
}

function TurnOn(sectionName, imgName, imgNo)
{
        imgOn = new Image();
        imgOn.src =  "/images/"+imgName+"_h.gif";
        document[sectionName+imgName+imgNo].src = imgOn.src;
}

function OpenPic(url, wi, he, title) {
         var he1=he+15+20;
         var leftPos=(screen.availWidth/2)-(wi/2);
         var topPos=(screen.availHeight/2)-(he1/2);
         var url;
         var win=open("","",'left='+leftPos+',top='+topPos+',scrollbars=no,resizable=no,width='+wi+',height='+he1);
         var pic = '<HEAD><TITLE>' + title + '</TITLE></HEAD>'
                 + '<BODY leftMargin=0 topMargin=0 marginWidth=0 marginHeight=0>'
                 + '<table border=0 cellspacing=0 cellpadding=0>'
                 + '<tr>'
                 + '<td valign="top" align="left"><img border="0" src="/images/1x1_trans.gif" width="15" height="5"></td>'
                 + '</tr>'
                 + '<tr>'
                 + '<td width="100%" background="/images/lohmedialogo_line.gif" valign="top" align="right"><img border="0" src="/images/lohmedialogo_bw.gif" width="120" height="15"><img border="0" src="/images/1x1_trans.gif" width="15" height="1"></td>'
                 + '</tr>'
                 + '<tr>'
                 + '<td valign="top" align="left"><img border="0" src="/images/1x1_trans.gif" width="15" height="15"></td>'
                 + '</tr>'
                 + '<tr>'
                 + '<td><img src="' + url + '" width=' + wi + ' height=' + he + '></td>'
                 + '</tr>'
                 + '</table>'
                 + '</body>';
         win.document.write(pic);
         }

function OpenPage(target, resize, full) {
         var leftPos;
         var screenHeight;
         if (resize=='yes');
         else {resize='no';}
         if (full=='yes');
         else {full='no';}
         screenHeight = screen.availHeight - 100;
         leftPos = screen.availWidth - 640;
         NewWin = this.open("", target, 'left=' + leftPos + ',top=0,location=' + full + ',toolbar=' + full + ',directories=' + full + ',menubar=yes,scrollbars=yes,resizable=' + resize + ',width=' + 630 + ',height=' + screenHeight);
         NewWin.focus();
         }

function OpenURL(targeturl, resize, full) {
         var leftPos;
         var screenHeight;
         if (resize=='yes');
         else {resize='no';}
         if (full=='yes');
         else {full='no';}
         screenHeight = screen.availHeight - 100;
         leftPos = screen.availWidth - 640;
         NewWin = this.open(targeturl, "_blank", 'left=' + leftPos + ',top=0,location=' + full + ',toolbar=' + full + ',directories=' + full + ',menubar=yes,scrollbars=yes,resizable=' + resize + ',width=' + 630 + ',height=' + screenHeight);
         NewWin.focus();
         }         

function OpenForm(linkLocation, target) {
         var wi = 600;
         var he = 360; //420;
         var leftPos=(screen.availWidth/2)-(wi/2);
         var topPos=(screen.availHeight/2)-(he/2)-20;
         if (linkLocation=="NULL") {linkLocation==''}
         NewWin = this.open(linkLocation, target, 'left=' + leftPos + ',top=' + topPos + ',location=no,toolbar=yes,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=' + wi + ',height=' + he);
         NewWin.focus();
         }

function OpenWindow(wi, he, target) {
         var he1=he+15+20;
         var leftPos=(screen.availWidth/2)-(wi/2);
         var topPos=(screen.availHeight/2)-(he/2);
         NewWin = this.open("", target, 'left=' + leftPos + ',top=' + topPos + ',location=no,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=' + wi + ',height=' + he);
         NewWin.focus();
         }

function Run(functionId) {
         if (functionId=="PRINT")    {window.print();}
         if (functionId=="HOMEPAGE") {;}
         if (functionId=="BOOKMARK") {;}
         if (functionId=="SENDLINK") {OpenForm('/cgi-bin/sendlink.pl?url=' + escape(window.location.href),'form');}
         if (functionId=="ADDENTRY") {OpenForm('/cgi-bin/guests.pl?Domain=lohmedia.de&Action=Feedback','form');}
         if (functionId=="CLOSE")    {this.close();}
         if (functionId=="BACK")     {history.go(-1);}
         }

function mOvr(src,id) {
////         if (!src.contains(event.fromElement)) {
////            var idColor = '#d9d9d9';
////            }
//         var cellID = 'cell' + id;document.all.menu.rows(0).cells(cellID).bgColor = idColor;
//         var cellID = 'lcell' + id;document.all.menu.rows(0).cells(cellID).bgColor = idColor;
//         var cellID = 'rcell' + id;document.all.menu.rows(0).cells(cellID).bgColor = idColor;
         }

function mOut(src,id) {
//         if (!src.contains(event.toElement)) {
//            var idColor = '#b6b6b6';
//            var cellID = 'cell' + id; document.all.menu.rows(0).cells(cellID).bgColor = idColor;
//            var cellID = 'lcell' + id; document.all.menu.rows(0).cells(cellID).bgColor = idColor;
//            var cellID = 'rcell' + id; document.all.menu.rows(0).cells(cellID).bgColor = idColor;
//            }
         }
