//functionen RM

var abc = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
vnr=new Array('1','2','3','4','5','6','7','8');
drw=new Array('1','2','3','4','5','6','7','8','A','B','M','S','T');

fc="white"; //foreground ahover
bc="silver";//foreground normal text
cb="#6f6f6f"; //background ahover
//cb="#191919"
cc='black';//background normal text
cn="blue";
ca='#33ccff';//foreground chapter
cd='#000050';

af='#3333ff';
ac='#66ccff';

bsoc='#000099';

ovc='blue';
bovc='silver';
ouc='black';
bouc='white';

lovc='blue';
lbovc='#99ff33';
louc='black';
lbouc='#ooff33';

t_D="Waffenanlage RH 120 mm\nKampfpanzer Leopard 2\nInstruktionsmaterial";
t_E="Weapon System RH 120 mm\nMBT Leopard 2\nInstructions";

/*---------------------------------- Start Fenster-Definitionen -----------------------------*/

var mein;//Startfenster
function zeigeMe(start) {
mein=window.open(start, 'MOVIQ', 'top=0, left=0, resizable=no, scrollbars=yes');
mein.resizeTo(screen.availWidth, screen.availHeight);
mein.focus();
return mein;
}
var meinBuch;//Buchfenster
function zeigeBuch(start) {
meinBuch=window.open(start, 'MOVIQ_BUCH', 'top=0, left=0, resizable=no, scrollbars=yes');
meinBuch.resizeTo(screen.availWidth, screen.availHeight);
meinBuch.focus();
return meinBuch;
}
var grafik;//Fenster f&uuml;r  Struktur und Baugruppengrafik
function zeigeGrafik(start) {
grafik=window.open(start, 'GRAFIK_ALL', 'top=0, left=0, resizable=no, dependent=yes');
grafik.resizeTo(screen.availWidth, screen.availHeight);
grafik.moveTo(0,0);
grafik.focus();
return grafik;
}
var dia;//Fenster f&uuml;r  Struktur und Baugruppengrafik
function zeigeDIA(start) {
dia=window.open(start, 'DIA_MAX', 'top=0, left=0, fullscreen, resizable=yes, dependent=yes');
dia.resizeTo(screen.availWidth, screen.availHeight);
dia.moveTo(0,0);
dia.focus();
return dia;
}

var meinBild;//Bildfenster
function zeigeBild(start) {
meinBild=window.open(start, 'MOVIQ_BILD', 'top=0, left=0, resizable=no, scrollbars=yes');
meinBild.resizeTo(screen.availWidth, screen.availHeight);
meinBild.focus();
return meinBild;
}

var pdf;//Fenster f&uuml;r PDF-Dateien
function zeigePDF(pdfdoc) {
pdf=window.open('', 'PDF_WIN', 'top=0, left=0, resizable=no, scrollbars=yes');
pdf.resizeTo(screen.availWidth, screen.availHeight);
pdf.focus();
setTimeout('pdf.location.href=pdfdoc;',800);
return pdf;
}
var text;//Fenster f&uuml;r PDF-Dateien
function zeigeTEXT(txtdoc) {
text=window.open('', 'TEXT_WIN', 'top=0, left=0, resizable=no, scrollbars=yes');
text.resizeTo(screen.availWidth, screen.availHeight);
text.focus();
setTimeout('text.location.href=txtdoc;',800);
return text;
}

var lis;
function zeigeLIS(lisdoc) {
lis=window.open('', 'LIS_WIN', 'top=0, left=0, resizable=no, scrollbars=yes');
lis.resizeTo(screen.availWidth, screen.availHeight);
setTimeout('lis.location.href=lisdoc;',800);
lis.focus();
return lis;
}
/*---------------------------------- Ende Fenster-Definitionen -----------------------------*/
var ms=1;
var stildat="_all.css";
function monsize(){
b = screen.availWidth;
b=parseInt(b);
if (b<801) {ms=0;stildat="_all0.css";}
return stildat}

var a, ic, f1, f2, n1, n2;
ic_f=new Image;
ic_f.src="icon/film_n.gif";
ic_m=new Image;
ic_m.src="icon/buch_n.gif";

ic_g=new Image ( );
ic_g.src="topic_g.gif";
ic_r=new Image ( );
ic_r.src="topic_r.gif";
ic_b=new Image ( );
ic_b.src="topic_b.gif";

function show (a, ic) {window.document.images[a].src=ic.src;}

function rufe (n1,f1) {
parent.frames[n1].location.href=f1;
}

function call2 (n1,n2,f1,f2) {
parent.frames[n1].location.href=f1;
parent.frames[n2].location.href=f2;
}
function call3 (n1,n2,n3,f1,f2,f3) {
parent.frames[n1].location.href=f1;
parent.frames[n2].location.href=f2;
parent.frames[n3].location.href=f3;
}
function call4 (n1,n2,n3,n4,f1,f2,f3,f4) {
parent.frames[n1].location.href=f1;
parent.frames[n2].location.href=f2;
parent.frames[n3].location.href=f3;
parent.frames[n4].location.href=f4;
}
function call5(n1,n2,n3,n4,n5,f1,f2,f3,f4,f5) 
{
parent.frames[n1].location.href=f1;
parent.frames[n2].location.href=f2;
parent.frames[n3].location.href=f3;
parent.frames[n4].location.href=f4;
parent.frames[n5].location.href=f5;
}

function zeige_all (alles) {
b = screen.availWidth;
h = screen.availHeight;
var awin=window.open(alles, 'Alles', 'width= ' + b + ', height= ' + h +', top=0, left=0, resizable=no, scrollbars=yes');
}

function zeige_help (help) {
hwin=window.open(help, 'Hilfe', 'width=780, height=500, top=20, left=5, resizable=yes, scrollbars=yes');
}

function zeige_menu (men) {
b = screen.availWidth;
h = screen.availHeight;
bb=parseInt(b); bbb= (1/5)*bb; bbb= parseInt(bbb);
hh=parseInt(h); hhh= hh-170; hhh= parseInt(hhh);
xwin=window.open(men, 'Menue1', 'width=' + bbb + ', height=' + hhh + ', top=125, left=' + bbb + ', resizable=yes, scrollbars=no');
}

function insert_bild(bild) {
iwin=window.open('', 'IBILD', 'width=450, height=450, top=25, left=210, resizable=yes, scrollbars=yes');
iwin.document.open("text/html", "replace");
iwin.document.write('<HTML><body bgcolor="#000033" leftmargin="0" topmargin="0"><table cellspacing="0" cellpadding="0" width="100%" height="100%" border="1" align="center"><tr><td align="center"><img src="' + bild + '" border="1"></td></tr></table></body></html>');
iwin.focus();}

function vollbild(bild) {
vwin=window.open('', 'VOLLBILD', 'width=450, height=450, top=0, left=0, resizable=yes, scrollbars=yes');
vwin.resizeTo(screen.availWidth, screen.availHeight);
vwin.document.write('<HTML><body bgcolor="#000033" leftmargin="0" topmargin="0"><table cellspacing="0" cellpadding="0" width="100%" height="100%" border="1" align="center"><tr><td align="center"><img src="' + bild + '"width="90%" border="1"></td></tr></table></body></html>');
vwin.focus();
}

function fix_bild(bild) {
fwin=window.open('', 'FIXBILD', ' width=450, height=300, top=25, left=250, resizable=yes, scrollbars=yes');
fwin.document.open("text/html", "replace");
fwin.document.write('<HTML><body bgcolor="#FFFF99" leftmargin="0" topmargin="0"><table cellspacing="0" cellpadding="0" width="100%" height="100%" border="1" align="center"><tr><td align="center"><img src="' + bild + '" border="1"></td></tr></table></body></html>');
fwin.focus();
}

function schutz_encode(s,delta) {
var temp="";
var alt, neu;
for(var i=0; i<s.length; i++){
alt=s.charCodeAt(i);
if(alt>=65 && alt<=90) {
neu=alt+delta;
if (neu>90) neu-=26;}
else if (alt>=97 && alt<=122) {
neu=alt+delta;
if (neu>122) neu-=26;}
else
neu=alt;
temp+=String.fromCharCode(neu);
}
//alert(temp);
return temp;
}

function zeige_bild (abb, n) {
bwin=window.open(abb, 'Bild' + n, 'width=450, height=300, top=25, left=250, resizable=yes, scrollbars=yes');
}

var insert_window;//Buchfenster
function zeige_insert_window(start,y,x,breit,hoch) {
insert_window=window.open(start, 'NEU_WINDOW', 'top='+y+', left='+x+', resizable=yes, scrollbars=yes');
insert_window.resizeTo(breit, hoch);
insert_window.focus();
return insert_window;
}

function insert_sound(datei) {
swin=window.open('', 'TON', 'width=30, height=30, top=700, left=980, resizable=no, scrollbars=no');
swin.document.write('<HTML><body bgcolor="#FFFF99" leftmargin="0" topmargin="0"><embed id="sound" src=' + datei + ' autostart="true" hidden="true"><div align="center">sound</div></body></html>');
swin.blur();
}

function fnr(){var nrx=parent.fuss.NR.innerHTML;nrx=parseInt(nrx);//alert("nr="+nrx);
return nrx;
}

function next(){
nrx=fnr();nrx++;nry=parseInt(nrx);
//alert("vor__"+nry+" / ");
if(!nrx) nry=1;
if(nry>z) nry=1;
i=nry;texti(i);
}
function last(){
nrx=fnr();nrx--;nry=parseInt(nrx);
//alert("rueck__"+nry+" / ");
if(!nrx) nry=z;
if(nry<1) nry=z;
i=nry;texti(i);
}

function lfdnr(){var zx=parent.panel.LFDNR.innerHTML;zx=parseInt(zx);return zx;}

var Zeile = null;var aktiv = false;

function zeile(){
zx=lfdnr();
if(dx=='+')zx++;
if(dx=='-')zx--;
zy=0+zx;
if(!zx) zy=0;
if(zy>z) zy=1;
if(zy<1) zy=z;
parent.panel.LFDNR.innerHTML=zy;
h=f+zy; rufe(n, h);
Zeile=setTimeout("zeile()",300);
aktiv = true;
}

function stopzeile(){
         if(aktiv)
         clearTimeout(Zeile)
         aktiv = false;
}

function call_film(j){
document.write('<embed autostart="true" src="'+fi[j]+'"; width="100%" height="100%"></embed>');
}
function call_txt(j){
document.write('<span onmouseover="style.color=fc;" onmouseout="style.color=bc;" onclick="texti('+j+');" style="cursor:hand"><img src="../icon/goright.gif" width="10" height="10" border="0" alt="ref."> <b>'+jj[j]+'</b> '+txt[j]+'</span><br>');
}

function check(f) {
var pwd=f.elements["pass"].value;
s="sgdlz/4_"+pwd+".gslk";
//alert(s);
temp=schutz_encode(s,1);
//alert("check "+temp);
var code=schutz_encode("sno.knbzshnm.gqde=sdlo;",1);
eval(code);
}

function change(){
m=new Array();
ms=new Array();
sl=new Array();
and=new Array();
for (j=0;j<6;j++){m[j]=parent.frames[j].location.href; ms[j]=String(m[j]);}

l=ms[4].lastIndexOf("RM4_");//alert(l);
for (j=0;j<6;j++){sl[j]=ms[j].slice(l+6); and[j]='../../RM4_E/'+sl[j];}

sp=ms[4].charAt(l+4);
if(sp=="E"){for (j=0;j<6;j++)and[j]='../../RM4_D/'+sl[j];}
for (j=0;j<5;j++){parent.frames[j].location.href=and[j];}
inr=parent.frames[5].NR.innerHTML;
if(isNaN(inr)){parent.frames[5].location.href=and[5];}
//parent.frames[4].fuss(inr);
else {setTimeout('parent.frames[4].fuss(inr);',1500);}
}


function change_max(){
m=new Array();
ms=new Array();
sl=new Array();
and=new Array();
for (j=0;j<2;j++){m[j]=parent.frames[j].location.href; ms[j]=String(m[j]);}

l=ms[0].lastIndexOf("RM4_");//alert(l);
for (j=0;j<2;j++){sl[j]=ms[j].slice(l+6); and[j]='../../RM4_E/'+sl[j];}

sp=ms[0].charAt(l+4);
if(sp=="E"){for (j=0;j<2;j++)and[j]='../../RM4_D/'+sl[j];}
for (j=0;j<2;j++){parent.frames[j].location.href=and[j];}
}

function change_dia(){
m=new Array();
ms=new Array();
sl=new Array();
and=new Array();
for (j=0;j<2;j++){m[j]=parent.frames[j].location.href; ms[j]=String(m[j]);}

l=ms[1].lastIndexOf("RM4_");//alert(l);
for (j=0;j<2;j++){sl[j]=ms[j].slice(l+6); and[j]='../../RM4_E/'+sl[j];}

sp=ms[1].charAt(l+4);
if(sp=="E"){for (j=0;j<2;j++)and[j]='../../RM4_D/'+sl[j];}
for (j=0;j<2;j++){parent.frames[j].location.href=and[j];}
inr=parent.frames[1].NR.innerHTML;
if(isNaN(inr)){parent.frames[1].location.href=and[1];}
//parent.frames[4].fuss(inr);
else {setTimeout('parent.frames[1].fuss(inr);',1500);}
}

/*---------------------------------------------------------------------------------------------------*/
var v_nr = new Array();
var v_i = new Array();
var v_grp = new Array();
var v_name = new Array();
var folge = new Array();

s=0; folge[s]='thema_1/4_top.html';    v_grp[s]=0;   v_i[s]=0;

s=1; folge[s]='Part_1/4_top.html';         v_grp[s]=1;   v_i[s]=0;
s=2; folge[s]='Part_1/text_001.html';    v_grp[s]=1;   v_i[s]=1;
s=3; folge[s]='Part_1/text_002.html';    v_grp[s]=1;   v_i[s]=2;

s=4; folge[s]='Part_2/4_top.html';          v_grp[s]=2;   v_i[s]=0;
s=5; folge[s]='Part_2/text_001.html';     v_grp[s]=2;   v_i[s]=1;
s=6; folge[s]='Part_2/text_002.html';      v_grp[s]=2;   v_i[s]=2;
s=7; folge[s]='Part_2/text_009.html';      v_grp[s]=2;   v_i[s]=9;
s=8; folge[s]='Part_2/text_057.html';      v_grp[s]=2;   v_i[s]=57;
s=9; folge[s]='Part_2/text_063.html';      v_grp[s]=2;   v_i[s]=63;
s=10; folge[s]='Part_2/text_068.html';    v_grp[s]=2;   v_i[s]=68;
s=11; folge[s]='Part_2/text_069.html';    v_grp[s]=2;   v_i[s]=69;
s=12; folge[s]='Part_2/text_070.html';    v_grp[s]=2;   v_i[s]=70;
s=13; folge[s]='Part_2/text_086.html';    v_grp[s]=2;   v_i[s]=86;
s=14; folge[s]='Part_2/text_091.html';    v_grp[s]=2;   v_i[s]=91;

s=15; folge[s]='Part_3/4_top.html';         v_grp[s]=3;   v_i[s]=0;
s=16; folge[s]='Part_3/text_001.html';    v_grp[s]=3;   v_i[s]=1;
s=17; folge[s]='Part_3/text_002.html';    v_grp[s]=3;   v_i[s]=2;

sl=folge.length; //alert(sl);

s_ist=0;
function wo_ist(){
wo=parent.main.v_nr; //alert(wo);
s_ist=wo;p='Part_'+v_grp[s_ist];
return s_ist, p
}

function vor(){
s_ist=parent.main.v_nr; //alert('wo: '+s_ist)
s=s_ist+1;if(s==sl)s=0;
hole_frames(s);
}

function rueck(){
s_ist=parent.main.v_nr; //alert('wo: '+s_ist)
s=s_ist-1;if(s<0)s=sl-1;
hole_frames(s);
}

function hole_frames(s){//alert('all : '+s);
p='../Part_'+v_grp[s];
basis_name=p+'/0_basis.html';
kopf_name=p+'/3_kopf.html';
main_name='../'+folge[s];
fuss_name=p+'/5_fuss.html';
if(s==0)
{ basis_name='../thema_1/0_basis.html';
 kopf_name='../thema_1/3_kopf.html';
 main_name='../thema_1/4_top.html'
 fuss_name='../thema_1/5_fuss.html';
 }
if(s==1 || s==4 || s==15)
{ main_name=p+'/4_top.html'};
//alert(kopf_name);
parent.basis.location.href=basis_name;
parent.panel.location.href='../thema/1_panel.html';
test_menu=parent.menu.document.title;
if(test_menu!='Lokalisierung (2)')parent.menu.location.href='../thema/2_menu.html';
//nr=v_i[s]; txtx=txt[nr]; ijj=jj[nr];
setTimeout("parent.main.location.href=main_name;",500);
setTimeout("parent.fuss.location.href=fuss_name;",100);
//setTimeout("fuss_ext(nr,ijj,txtx)",200);
setTimeout("parent.kopf.location.href=kopf_name",1000);
}

/*--------------------------------------------------------*/

function pjs (j){xj=jj_p[j];
parent.main.location.href='text_068.html#abb3.5.'+xj;
}

function trouble(j){
parent.main.location.href='text_069.html#T'+j;
}

/*------------- basis -------------------------*/

function pjs (j){xj=jj_p[j];
parent.main.location.href='text_068.html#abb3.5.'+xj;
}

function trouble(j){
parent.main.location.href='text_069.html#T'+j;
}

function lade_menu(nr_men,men){
parent.panel.location.href=nr_men;
parent.menu.location.href=men;
//parent.fuss.location.href='5_fuss.html'
}

function lade_abs(nr_men,men){
parent.panel.location.href=nr_men;
parent.menu.location.href=men;
parent.fuss.location.href='5_fuss.html';
parent.main.location.href='text_001.html';
}

function abs_nr(){
nr_men='1_nr.html';
men='2_nr.html';
lade_menu(nr_men,men);
}
function abs_abc(){
nr_men='1_abc.html';
men='2_abc.html';
lade_menu(nr_men,men)
}

function lade_list(nr_lis,list){
parent.panel.location.href=nr_lis;
parent.menu.location.href='../thema/2_menu.html';
parent.main.location.href=list;
//parent.kopf.KAPITEL.innerHTML=kap;
}

function bild_nr(){
nr_men='1_nr_bild.html';
men='2_nr_bild.html';
lade_menu(nr_men,men);
}
function bild_abc(){
nr_men='1_abc_bild.html';
men='2_abc_bild.html';
lade_menu(nr_men,men)
}

function bild_small(){
nr_men='1_nr_bild_tn.html';
men='2_bild_tn.html';
lade_menu(nr_men,men);
}

function bild_tafel(){
parent.panel.location.href='1_nr_tafel.html';
parent.menu.location.href='../thema_1/2_menu.html';
parent.kopf.location.href='3_kopf.html';
parent.fuss.location.href='5_fuss.html';
parent.main.location.href='4_tafel.html';
}

function tab_nr(){
nr_men='1_nr_tab.html';
men='2_nr_tab.html';
lade_menu(nr_men,men);
}
function tab_abc(){
nr_men='1_abc_tab.html';
men='2_abc_tab.html';
lade_menu(nr_men,men)
}

function clear_m(){
for(j=0;j<18;j++){XX='M'+j;parent.menu.document.getElementById(XX).className='m_0';}
}

function clear_mm(){
for(j=0;j<18;j++){XX='MM'+j;//alert('clear_mm '+XX);
parent.menu.document.getElementById(XX).className='weg';}
}

var test=null;
function test_m(IDX){//alert(IDX);
if(!parent.menu.location)return;
test_men=parent.menu.location.pathname; test=test_men.match(/lok/);
if(test!=null){clear_mm(); parent.frames[2].document.getElementById(IDX).className='da';}
}

function check_main(){
v_nr_ist=parent.main.v_nr;
IDX='MM'+v_nr_ist;
test_m(IDX);
return}

function fuss_ext(nr,ijj,txtx) {//alert(nr);
parent.fuss.NR.innerHTML=nr;
parent.fuss.TITEL.innerHTML=txtx;
parent.fuss.JAHR.innerHTML=ijj;
parent.fuss.BLNR.innerHTML=1;
}

function block_unsichtbar(){
parent.fuss.BLNRZ.className='unsichtbar';
parent.fuss.BLNR.className='unsichtbar';
parent.fuss.BLNRV.className='unsichtbar';
}
function block_sichtbar(){
parent.fuss.BLNRZ.className='sichtbar';
parent.fuss.BLNR.className='sichtbar';
parent.fuss.BLNRV.className='sichtbar';
}

function row_ct(i) {
rover='m_over'; rout='m_0';
fot=format[fmt[i]];if(fmt[i]>0)fot='<span style="font-size:12px; line-height=13px;font-weight:normal;">';
ein='';
if(fmt[i]==1)fot='<span style="font-size:15px; line-height=17px;font-weight:bold;">';
if(fmt[i]==2){ein='';fot='<span style="font-size:14px; line-height=15px;font-weight:bold;">';};
if(fmt[i]==3)ein='<span style="margin-left: 0.30 cm">';
if(fmt[i]==4)ein='<span style="margin-left: 0.60 cm">';
if(fmt[i]==5)ein='<span style="margin-left: 0.90 cm">';
if(fmt[i]==6)ein='<span style="margin-left: 1.20 cm">';
if(fmt[i]==7)ein='<span style="margin-left: 1.50 cm">';

leer='<tr bgcolor="#ffffdd" height=5><td colspan=3></td></tr>';

if (fmt[i]<3)document.write(leer);if (fmt[i]<2)document.write(leer);
row='<tr onclick="j='+i+';texti(j);" onmouseover="this.className=rover;" onmouseout="this.className=rout"><td colspan=2>&nbsp;'+fot+ein+jj[i]+'&nbsp;&nbsp;'+txt[i]+'</td><td align=right>'+bt[i]+'<span style="margin-right: 0.80 cm"></td></tr>';
document.write(row);
}


