//Bild welches vor dem aktiven Menьpunkt angezeigt werden soll
var activeImage = new Image();
activeImage.src = "../../media/arrblue.gif";

//Bild welches vor allen inaktiven Menьpunkten angezeigt werden soll
var inactiveImage = new Image();
inactiveImage.src = "../../media/arrmask.gif";

//Bild welches vor dem Menьpunkten angezeigt werden soll ьber dem sich die Maus gerade befindet
var mouseoverImage = new Image();
mouseoverImage.src = "../../media/arrred.gif";

// Browser
var IE=false,W3C=false,N4=false;
if (document.layers)
 N4=true;
else if (document.all)
 IE=true
if (document.getElementById)
 W3C=true;

//Функция отвечает за нижнее окно в котором вызывается главная страница ТЕХСОФТ
function footer(){
  document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%' bgcolor='rgb(218,227,218)'>");//Ширина активного окна
  document.writeln("<tr><td>&nbsp;</td></tr><tr><td align='center'><class='anhang' src='../media/line2.gif' width='115' height='5' border='0' alt=''></td></tr><tr><td><p align='center'>");
  document.writeln("<a class='anhang' href='http://www.tech-soft.ru' target='_top'>ООО ТЕХСОФТ</a>");
  document.writeln("</p></td></tr></table>");//После вызова данной функции, исчезает разбиение на фреймы
}
//Функция отвечает за механизм "в начало страницы"
function goup(pic){
if (!document.layers) {//left:612px отвечает за горизонтальную сдвижку стрелочки
 document.writeln("<div id=\"logo\" style=\"position:absolute;visibility:'hide';visibility:'hidden';left:95%; top:600px; z-index:2\">");
 document.writeln("<a href='javascript:window.scrollTo(0,0)'><img src=\""+pic+"\" border=0 alt='В начало страницы'></a></div>");
 }
}
function OpenO2CWindow(O2CSource, title){
 win=window.open(O2CSource,title,"width=400,height=400, scrollbars=no, locationbar=no, menubar=no, resizable=yes");
 win.focus();
}
function ShowPdf(){
if (N4)
 win=window.open("pdf.htm","PDF");
else
 win=window.open("pdf.htm","PDF","width=640,height=340,scrollbars=no,locationbar=no,menubar=no,resizable=no,left=200,top=100");
win.focus();
}
function WinModule(url){
win=window.open(url,"Modulьbersicht","width=650,height=500,scrollbars=yes,locationbar=no,menubar=no,left=200,top=100");
win.focus();
}
//Верхняя картинка к левой навигации; табличка левой навигации

function NavHead(titel){
document.writeln("<div style=\"position:relative;top:10;left:10\">");
document.writeln("<img name=\"header\" src=\"../../media/title_"+titel+".gif\" border=0></div>");
if (!document.layers)
 document.writeln("<div style=\"position:relative;top:22;left:10\">");
document.writeln("<table border=0 cellpadding=1 cellspacing=1 width=140>");
}

function NavHeadLL(titel){
document.writeln("<div style=\"position:relative;top:0;left:10\">");
document.writeln("<img name=\"header\" src=\"../../media/title_"+titel+".gif\" border=0></div>");
if (!document.layers)
 document.writeln("<div style=\"position:relative;top:0;left:10\">");
document.writeln("<table border=0 cellpadding=1 cellspacing=1 width=140 align=center vAlign=top>");
}


function NavHeadL(titel){

if (!document.layers)
document.writeln("<div style=\"position:relative;top:0;left:0\">");
document.writeln("<table border=0 cellpadding=0 cellspacing=0 width=135>");
}
//эта ф-я закрывает div и table левой навигации, если тип эксплорера?
function NavFoot(){ 
 if (document.layers)
  document.writeln("</table>");
 else
  document.writeln("</table></div>");  
}

function CreateNavElement(navId,navUrl,navName,navTitle,color){
 document.writeln("<tr height='18'>");//Расстояние между строчками левой навигации
 //width='135' - ширина строки надписи левой навигации
 //align='left' width='8' height='12' - размеры стрелочки левой навигации
 document.writeln("<td class='nav' width='135'><img align='left' width='8' height='12' name=\'"+navId+"\' src='../../media/arrmask.gif'>");
 if (color==1)
   document.writeln("<a onFocus=\"if (this.blur) this.blur()\" href=\'"+navUrl+"\' target='main' title=\'"+navTitle+"\' class='off2'  onmouseover=\"this.className='on2';ChangeImageNav(\'"+navId+"\',1);\" onmouseout=\"this.className='off2';ChangeImageNav(\'"+navId+"\',0);\">" + navName + "</a></td></tr>");
 else
   document.writeln("<a onFocus=\"if (this.blur) this.blur()\" href=\'"+navUrl+"\' target='main' title=\'"+navTitle+"\' class='off'  onmouseover=\"this.className='on';ChangeImageNav(\'"+navId+"\',1);\" onmouseout=\"this.className='off';ChangeImageNav(\'"+navId+"\',0);\">" + navName + "</a></td></tr>");
}
function SetVisible(aktElem,bVisible){
 if (IE){
  if (bVisible)
   document.all[aktElem].style.visibility="visible";
  else
   document.all[aktElem].style.visibility="hidden";
 }
 else if (N4){
  if (bVisible)
   document.layers[aktElem].visibility = "show";
  else
   document.layers[aktElem].visibility = "hide";
 }
 else if (W3C) {
  if (bVisible)
   document.getElementById(aktElem).style.visibility = "visible";
  else
   document.getElementById(aktElem).style.visibility = "hidden";
 }
}
function SetPosLeft(aktElem,left){
 if (IE)
  document.all[aktElem].style.left=left;
 else if (N4)
  document.layers[aktElem].left=left;
 else if (W3C)
  document.getElementById(aktElem).style.left=left;
}
function SetPosTop(aktElem,top){
 if (IE)
  document.all[aktElem].style.top=top;
 else if (N4)
  document.layers[aktElem].top=top;
 else if (W3C)
  document.getElementById(aktElem).style.top=top;
}
function GetPosTop(aktElem,top){
 if (IE)
  return document.all[aktElem].style.top;
 else if (N4)
  return document.layers[aktElem].top;
 else if (W3C)
  return document.getElementById(aktElem).style.top;
}

function setBasics(){
  StartX=screen.width/2;
  StartY=screen.height/2;
  EndX=175;
  EndY=130;
  StartWidth=300;
  StartHeight=250;
  EndWidth=600;
  EndHeight=580;
  Fak = 25;
  time=6;
}
function SeiteLaden(){
 if (self.location.search.length>0){
  var laenge=self.location.search.length;
  var pos=self.location.search.indexOf("@");
  // hinter Fragezeichen steht Pfad und Modul
  if (pos>1)  {
   var Neue_url=self.location.search.substring(1,pos)+self.location.hash;
   SetModul();
   self.main.location.replace(Neue_url);
  }
 }
 if (IE||W3C){
  for(i=0;i<frames['nav_oben'].document.anchors.length;i++)
   frames['nav_oben'].document.anchors[i].className="nav_produkte";
  for(i=0;i<frames['Banner'].document.anchors.length;i++)
   frames['Banner'].document.anchors[i].className="nav_global";
  }
  if(IE){
   if (frames['nav_oben'].document.all[top.aktModul])
     frames['nav_oben'].document.all[top.aktModul].className="nav_produkte_on";
   else if (frames['Banner'].document.all[top.aktModul])
     frames['Banner'].document.all[top.aktModul].className="nav_global_on";

  }
  else if (W3C){
   if (parent.frames['nav_oben'].document.anchors[top.aktModul])
     parent.frames['nav_oben'].document.anchors[top.aktModul].className="nav_produkte_on";
   else if (parent.frames['Banner'].document.anchors[top.aktModul])
     parent.frames['Banner'].document.anchors[top.aktModul].className="nav_global_on";
  }
}

function SetNavigation(){
}
function SetModul(){
 top.aktModul="TECHSOFT";
 if (self.location.search.length>0){
   var laenge=self.location.search.length;
   var pos=self.location.search.indexOf("@");
   temp=self.location.search.substring(pos+1,laenge);
   if (temp.length>0)
     top.aktModul=temp;
  }
}

function ShowFrameset(){
SetModulVars(top.aktModul); //Переразбивка окна на фреймы
 document.writeln("<frameset rows=\"160,30,*\" framespacing=0 border=0 frameborder=0 onLoad=\"Geladen=1;SeiteLaden();\">");
 document.writeln("<frame src=\"banner.htm\" name=\"Banner\" noresize scrolling=\"NO\">");
 document.writeln("<frame src=\"nav_oben.htm\" name=\"nav_oben\" noresize scrolling=\"NO\">");
 document.writeln("<frameset cols=\"10,*\" framespacing=0 border=0 frameborder=0>");
 document.writeln("<frame src=\"../"+refNav+"/pages/navigation.htm\" name=\"navigation\" noresize marginwidth=0 scrolling=\"NO\">");
 document.writeln("<frame src=\""+refMain+"\" name=\"main\" noresize marginwidth=0 marginHeight=10>");
 document.writeln("</frameset>");
 document.writeln("</frameset><noframes><body>");
 document.writeln("<h1>ООО ТЕХСОФТ</h1>");
 document.writeln("<p>software,vicado,microfe,statika,profilmaker,projektmanager,verbundbau,viewer,ing+</p>");
 document.writeln("<a href=\"company/pages/profil.htm\">profil.htm</a>");
 document.writeln("<a href=\"Ing/pages/home.htm\">home.htm</a>"); 
 document.writeln("<a href=\"fem/pages/home.htm\">home.htm</a>");
 //document.writeln("<a href=\"profilmaker/pages/home.htm\">home.htm</a>");
 document.writeln("<a href=\"statik/pages/home.htm\">home.htm</a>");
 document.writeln("<a href=\"verbund/pages/home.htm\">home.htm</a>");
 document.writeln("<a href=\"vicado/pages/home.htm\">home.htm</a>");
 //document.writeln("<a href=\"seminar/pages/Seminar.htm\">Seminar.htm</a>");
 document.writeln("<a href=\"price/pages/Price.htm\">Price.htm</a>");
 document.writeln("</body></noframes>");
}

function HideArrows(){
  // Navigationsframe ist vorhanden
  if(parent.frames['navigation'])  {
    navDoc = parent.frames['navigation'].document;
    i=0;
    while(navDoc.images[i]){
      if (navDoc.images[i].name!="animpic"&&navDoc.images[i].name!="header")// Animationsbild oder Ьberschrift
        navDoc.images[i].src=inactiveImage.src;
      i++;
    }
  }
}
function setVariables(){
 if (IE){
  y="document.body.scrollTop";
  iH="document.body.clientHeight";
  checkLocation();
 }
 else if (W3C) {
  y="window.pageYOffset";
  iH="window.innerHeight";
  checkLocation();
 }
}
function checkLocation()
{
 innerY=eval(iH)-35 // place at the bottom
 yy=eval(y);
 if (yy==0)
  SetVisible("logo",0);
 else{
  SetVisible("logo",1);
  aktPos=GetPosTop("logo");
  if ((yy+innerY-parseInt(aktPos))<10)
   SetPosTop("logo",yy+innerY);
  else
   SetPosTop("logo",parseInt(aktPos)+(yy+innerY-parseInt(aktPos))/3);
 }
 setTimeout("checkLocation()",50)
}

function SetArrow(){
  HideArrows();
  // Inhaltsframe und Navigationsframe sind vorhanden
  if(parent.frames['main'] && parent.frames['navigation']){
    navDoc = parent.frames['navigation'].document;
    titleMain = parent.frames['main'].document.title;
    if (navDoc.images[titleMain])
      navDoc.images[titleMain].src=activeImage.src;
  }
}

// image == 0 --> deaktivieren
// image == 1 --> aktivieren
function ChangeImageNav(name,image)
{
  // Navigationsframe ist vorhanden
  if(parent.frames['main'] && parent.frames['navigation']){
    navDoc = parent.frames['navigation'].document;
    if (navDoc.images[name]){
      if (image == 0){
        if (parent.frames['main'].document.title == name) // aktive Seite
          navDoc.images[name].src=activeImage.src;
        else
          navDoc.images[name].src=inactiveImage.src;
      }
      else
        navDoc.images[name].src=mouseoverImage.src;
    }
  }
}

function basehead(text){
document.write("<p class=basehead>"+text+"</p>");
}
function baseheadL(text){
document.write("<span class=baseheadL>"+text+"</span>");
}
function baseheadN(text){
document.write("<p class=baseheadN>"+text+"</p>");
}
function headVER(text){
document.write("<p class=headVER>"+text+"</p>");
}
function baseh_Spin(text){
document.write("<span class=baseh_Spin>&nbsp;&nbsp;"+text+"&nbsp;&nbsp;</span>");
}


//Функция отвечает за заголовки "специальное предложение" и др.
function block(text,link){
document.writeln("<table border=0 cellpadding=0 cellspacing=1 width=\"100%\">")
document.writeln("<tr><td class=block><a name=\""+link+"\"> </a>"+text+"</td></tr></table><br>");
}

function blockL(text,link){
document.writeln("<table border=0 cellpadding=0 cellspacing=1 width=\"100%\">")
document.writeln("<tr><td class=blockL><a name=\""+link+"\"> </a>"+text+"</td></tr></table><br>");
}
function blockC(text,link){
document.writeln("<table border=0 cellpadding=0 cellspacing=1 width=\"100%\">")
document.writeln("<tr><td class=blockC><a name=\""+link+"\"> </a>"+text+"</td></tr></table><br>");
}
function blockN(text,link){
document.writeln("<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">")
document.writeln("<tr><td class=blockN Align=center><a name=\""+link+"\"> </a>"+text+"</td></tr></table>");
}

function SetModulVars(modul){
  if (modul=="ING")  {
  refNav="Ing"
  refMain="../Ing/pages/home.htm";
  }
  else if (modul=="TECHSOFT")  {
  refNav="company"
  refMain="../company/pages/aktuell.htm";
  }
  else if (modul=="STATIK")  {
  refNav="statik"
  refMain="../statik/pages/home.htm";
  }
  else if (modul=="FEM")  {
  refNav="fem"
  refMain="../fem/pages/home.htm";
  }
  else if (modul=="PROFILMAKER")  {
  refNav="profilmaker"
  refMain="../profilmaker/pages/home.htm";
  }  
  else if (modul=="VICADO")  {
  refNav="vicado"
  refMain="../vicado/pages/home.htm";
  }
  else if (modul=="VERBUND")  {
  refNav="verbund"
  refMain="../verbund/pages/home.htm";
  }
  else if (modul=="NEWS")  {
  refNav="news"
  refMain="../news/pages/new.htm";
  }
  else if (modul=="SERVIC")  {
  refNav="servic"
  refMain="../servic/pages/home.htm";
  }
  else if (modul=="SUCHE")  {
  refNav="suche"
  refMain="../phpmysearch/search.php";
  }
else if (modul=="SEMINAR")  {
  refNav="seminar"
  refMain="../seminar/pages/Seminar.htm";
  }
else if (modul=="PRICE")  {
  refNav="price"
  refMain="../price/pages/Price.htm";
  }

  else if (modul=="RAS")  {
  refNav="company"
  refMain="../company/pages/RAS_MicroFe.htm";
  }

  top.aktModul=modul;
}

function Lade(modul)
{
  SetModulVars(modul);
  if(IE||W3C){
   for(i=0;i<parent.frames['nav_oben'].document.anchors.length;i++)
    parent.frames['nav_oben'].document.anchors[i].className="nav_produkte";
   for(i=0;i<parent.frames['Banner'].document.anchors.length;i++)
    parent.frames['Banner'].document.anchors[i].className="nav_global";
   if(IE){
     if (parent.frames['nav_oben'].document.all[modul])
       parent.frames['nav_oben'].document.all[modul].className="nav_produkte_on";
     else if (parent.frames['Banner'].document.all[modul])
       parent.frames['Banner'].document.all[modul].className="nav_produkte_on";
   }
   else if (W3C){
    if (parent.frames['nav_oben'].document.anchors[modul])
      parent.frames['nav_oben'].document.anchors[modul].className="nav_produkte_on";
    else if (parent.frames['Banner'].document.anchors[modul])
      parent.frames['Banner'].document.anchors[modul].className="nav_produkte_on";
    }
  }
  parent.frames['navigation'].location.replace("../"+refNav+"/pages/navigation.htm");
  parent.frames['main'].location.replace(refMain);
}

function FAQControl(back,forward)//ф-я отвечает за предыдущий/последующий вопрос в часто встреч.
{

document.writeln("<p><img src=\"../../media/left.gif\" width=\"5\" height=\"9\" border=\"0\">&nbsp;&nbsp;<a href="+back+">предыдущий вопрос</a>&nbsp;&nbsp;<a href="+forward+">следующий вопрос</a>&nbsp;&nbsp;<img src=\"../../../media/right.gif\" width=\"5\" height=\"9\" border=\"0\"></p>");
}

function Multy_Line(){
 document.writeln("<TABLE align='left' border='0' cellPadding='0' cellSpacing='0' width='160'>");
 for(i=1;i<6;i++)
 document.writeln("<TR><TD bgColor='rgb(101,135,117)' height='1'><IMG alt='' border='0' height='1'  src='../media/null.gif'></TD></TR><TR><TD bgColor='#ffffff' height='1'><IMG alt='' border='0' height='1'  src='../media/null.gif'></TD></TR>");
 document.writeln("</TABLE>");
}

function Multy_Line_Ohne(){
 document.writeln("<TABLE align='left' border='0' cellPadding='0' cellSpacing='0' width='160'>");
 for(i=1;i<6;i++)
 document.writeln("<TR><TD bgColor='rgb(101,135,117)' height='1'><IMG alt='' border='0' height='1'  src='../media/null.gif'></TD></TR><TR><TD bgColor='#ffffff' height='1'><IMG alt='' border='0' height='1'  src='../media/null.gif'></TD></TR>");
}


