//Bildergalerie LBF
function showGrImg(img)
{
var seite="showGrImgLBF.htm";
var width_p=350, height_p=350;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup_3(seite,width_p,height_p,img);
    		}
			else
     		{
      		_popup.close();
			popup_3(seite,width_p,height_p,img);
			}
		}
		else
  		{
			popup_3(seite,width_p,height_p,img);
    	}
}
function popup_3 (url,width_p,height_p,img)
{
var cx = 0, cy = 0;
_popup=window.open(url+"?img="+img, null, 'left=' + cx + ',top=' + cy + ',width=' + width_p + ',height=' + height_p+ ',resizable=no,location=no,menubar=no,scrollbars=yes,titlebar=no,toolbar=no');
_popup.focus();
}

// videoWorkshop
function videoWorkshop()
{
var seite="videoWorkshop.htm";
var width_p=750, height_p=550;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup_2(seite,width_p,height_p);
    		}
			else
     		{
      		_popup.close();
			popup_2(seite,width_p,height_p);
			}
		}
		else
  		{
			popup_2(seite,width_p,height_p);
    	}

}
function popup_2 (url,width_p,height_p)
{
var cx = 0, cy = 0;
_popup=window.open(url, null, 'left=' + cx + ',top=' + cy + ',width=' + width_p + ',height=' + height_p+ ',resizable=no,location=no,menubar=no,scrollbars=yes,titlebar=no,toolbar=no,status=no');
_popup.focus();
}

// Klick auf einen Film-titel
function film_ab(rubrik,filmID,url_ref){
	if (rubrik.substring(0,5)=='kunst'){
	parent.oben.location.replace("../pages/"+rubrik+"_d_o.htm");
	}
	else{
	parent.oben.location.replace("../pages/"+rubrik+"_d_o.htm");
	}
	
parent.content.location.replace("../filmseiten/"+filmID+"_d_u.htm?"+url_ref);
}

function film_ab_videos(rubrik,filmID,url_ref){
parent.parent.oben.location.replace("../pages/"+rubrik+"_o.htm");	
parent.location.replace("../filmseiten/"+filmID+"_d_u.htm?"+url_ref);
}


function preis(nummer,filmID){
var seite="../pages/preis_info.htm?nr="+unescape(nummer);
var width_p=478, height_p=510;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup(seite,width_p,height_p);
    		}
			else
     		{
      		_popup.close();
			popup(seite,width_p,height_p);
			}
		}
		else
  		{
			popup(seite,width_p,height_p);
    	}
}

function bestell(nummer,filmID){
var seite="../pages/bestellform.htm?nr="+unescape(nummer);
var width_p=478, height_p=510;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup(seite,width_p,height_p);
    		}
			else
     		{
      		_popup.close();
			popup(seite,width_p,height_p);
			}
		}
		else
  		{
			popup(seite,width_p,height_p);
    	}
}

function fern_ani(){

}

// Frame-Grabber
/*if (self==top)
{
self.location.href="index.html";
}*/


//Statusbar
function statbar(state)
{
inhalt=state;
var t = setTimeout('window.status = inhalt', 1);return true;
}

// Impressum
function impressum()
{
var seite="impressum.htm";
var width_p=430, height_p=470;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup(seite,width_p,height_p);
    		}
			else
     		{
      		_popup.close();
			popup(seite,width_p,height_p);
			}
		}
		else
  		{
			popup(seite,width_p,height_p);
    	}

}

function popup (url,width_p,height_p,img,text)
{
var cx = 0, cy = 0;
//var width=430, height=440;
_popup=window.open(url,null, 'left=' + cx + ',top=' + cy + ',width=' + width_p + ',height=' + height_p+ ',resizable=no,location=no,menubar=no,scrollbars=yes,titlebar=no,toolbar=no');
_popup.focus();
}

// browser erkennung
var version=0;

 if (navigator.appName.indexOf("Netscape") != -1)
 {
  if (navigator.userAgent.indexOf("Mac")!=-1)
   if (document.getElementById)
   {version = 6;}
   else
   {version = 2;}
  else
  {
   if (document.getElementById)
   {version = 5;}
   else
   {version = 1;}
  }
 }
 else
 {
  if (navigator.userAgent.indexOf("MSIE") != -1)
  {
   if (navigator.userAgent.indexOf("Mac")!=-1)
   {version = 4;}
   else
   {version = 3;}
  }
  else
  {version = 3;}
 }


/*
version=1 Netscape 4x PC
version=2 Netscape 4x Mac
version=3 Explorer PC und andere
version=4 Explorer Mac
version=5 Netscape 6 PC
version=6 Netscape 6 Mac
*/


// Formular-Felder-Breite
var maxlen=28;
var maxlen_bestell=42;
var maxlen_suche=22;
var spalten=45;
var zeilen=9;
var zeilen_bestell=7;

if (version == 1)
{
var maxlen=14;
var maxlen_bestell=24;
var maxlen_suche=12;
var spalten=21;
var zeilen=7;
var zeilen_bestell=5;
}
if (version == 2)
{
var maxlen=14;
var maxlen_bestell=24;
var maxlen_suche=12;
var spalten=21;
var zeilen=7;
var zeilen_bestell=5;
}
if (version == 3)
{
}
if (version == 4)
{
var spalten=40;
var zeilen=6;
var zeilen_bestell=5;

}
if (version == 5)
{
var maxlen_bestell=48;
}
if (version == 6)
{
var maxlen=28;
var maxlen_bestell=38;
var maxlen_suche=22;
var spalten=23;
var zeilen=7;
var zeilen_bestell=5;
}

if (version == 0)
{
var spalten=23;
var zeilen=7;
var zeilen_bestell=5;
}


// Navi oben
navi_on=new Array();
	for (i=1;i<5;i++){
	navi_on[i]=new Image();
	navi_on[i].src="../imgs/navi_oben_"+i+"_h.gif"
	}

navi_texte=new Array();
navi_texte[1]="Über uns";
navi_texte[2]="Suchen";
navi_texte[3]="Kontakt";
navi_texte[4]="Links";
function on(x)
{
document.images['nav_'+x].src="../imgs/nav_oben_"+x+"_h.gif";
//return statbar (navi_texte[x]);
}
function off(x)
{
document.images['nav_'+x].src="../imgs/nav_oben_"+x+"_n.gif";
//return statbar('');
}
function tv_on()
{
document.images['tv'].src="../imgs/tv_left_h.png";
}
function tv_off()
{
document.images['tv'].src="../imgs/tv_left_n.png";
}



// Tabellenbreite anpassen
if (screen.width > 800){
table_w=650;
}
else{
table_w=570;
}
//document.write ("<table width='"+table_w+"' border='0' cellpadding='0' cellspacing='0'>")


// Fernbedienung
fern_on=new Array();
	for (i=1;i<3;i++){
	fern_on[i]=new Image();
	fern_on[i].src="../imgs/fernbedienung_h_"+i+".gif"
	}

function fern_f(x)
{
	if (x==1){
	document.images['fern'].src="../imgs/fernbedienung_h1.gif";
	}
	else{
	document.images['fern'].src="../imgs/fernbedienung_n.gif";}
}

// Alphabet-Sprung
function alpha_anker(){
	if (location.search){
	var anker=(location.search).substring(1,2);
	location.href="#"+anker;
	}
}
// Links-Sprung
function links_anker(){
	if (location.search){
	var anker=(location.search).substring(1,5);
	location.href="#"+anker;
	}
}

// Klick auf ein bild - Video ab
function clip(rubrik){
var seite="../pages/clip_"+rubrik+".htm";
var width_p=360, height_p=340;
		if (window._popup)
  		{
   			if (_popup.closed)
     		{
			popup(seite,width_p,height_p);
    		}
			else
     		{
      		_popup.close();
			popup(seite,width_p,height_p);
			}
		}
		else
  		{
			popup(seite,width_p,height_p);
    	}
}

function check_clip_version(video_name){
	if (document.clip_form.clip_version[0].checked){
	var clip_video=video_name+"_56k.mpg";
	}
	else{
	var clip_video=video_name+"_dsl.mpg";
	}
location.href="http://www.kaos-archiv.de/videos/"+clip_video;
}
