// import central online catalog js
document.write( "<scr"+"ipt language=\"JavaScript\" src=\"http://www.hella.com/produktion/HellaResources/WebSite/Applications/CentralJS/onlineCatalog.js\" type=\"text/javascript\"></scr"+"ipt>" );

function highlight(picname,url){document.images[picname].src = url}
function lowlight(picname,url) {document.images[picname].src = url}
function getVIPURL(url)        {return url}
function sprung(ziel) {location.href=ziel;}
function forward(newLocation) {
  document.location.href = newLocation;
}



function init()
	{
        if (navigator.appName == "Netscape") {
				layerStyleRef="layer.";
				layerRef="document.layers";
				styleSwitch="";
        }else{
				layerStyleRef="layer.style.";
				layerRef="document.all";
				styleSwitch=".style";
		}
	}
	
function winopen(newpage,newname)
{open(newpage,newname,'width=800,height=600')};
parent.frames.focus();

function winopenfixed(newpage,newname)
{open(newpage,newname,'width=600,height=600');
history.back();
}


function winopenmitfocus(newpage,newname)
	{open(newpage,newname)};

function winclose()
	{top.close()}

function hisback()
	{parent.frames.history.back()}

function hisforward()
	{parent.frames.history.forward()}
	
function directUrl(ziel) {
	window.location.href=ziel;
}

function directUrlWithBars(ziel) {
//	window.location.href=ziel;
	window.open(ziel, "FenstermitMenueleiste", "toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1");
}


function moreframes(link1,F1,link2,F2,link3,F3,link4,F4)
{  
parent.frames[F1].location.href=link1;
parent.frames[F2].location.href=link2;
parent.frames[F3].location.href=link3;
parent.frames[F4].location.href=link4;
}


function mouselink(URL1,F1)
{parent.frames[F1].location.href=URL1}


function listlink(x)
{
	if(x == "nothing")
	{
		document.forms[0].reset();
		document.forms[0].elements[0].blur();
		return;
	}
		else if(x == "end") top.location.href = parent.frames[4].location;
		else
	{
		parent.frames[3].location.href = x;
		document.forms[0].reset();
		document.forms[0].elements[0].blur();
	}
}


function winopenform(newpage,newname)
{open(newpage,newname,'width=600,height=600')};
parent.frames.focus();

function newWinUrl(WinURL) {
// Created by Seetha and Craig on December 5, 2001
	window.open(WinURL, "_blank");
	history.back();
}

function formularlink(x)
{
var tmp = "";
    tmp = x.substring(0,4);
    
    if (tmp == "http") {
        window.open(x, "_blank");
    } else {
    	if(x == "nothing")
	    {
    		document.forms[0].reset();
	    	document.forms[0].elements[0].blur();
		    return;
    	}
	    else if(x == "end") top.location.href = parent.frames[3].location;
    		else
        	{
	        	winopenform(x,'Formular')
		        {open(x,'Formular')};
        	}
    }         
}

function impressum(tmpPage) {
 window.open(tmpPage,'_blank','top=50,screenX=50,left=400,screenY=100,height=376,width=550,scrollbars=auto');
}

function downloadWin(tmpPage) {
 window.open(tmpPage,'_blank','top=50,screenX=50,left=400,screenY=100,height=500,width=800,scrollbars=yes');
}


// 27.08.03: Ergaenzungen fuer IAA; Autor: W. Marek
function oeffneFenster(seitenName,instanzName,fensterBreite,fensterHoehe) {
    	
    	breiteBildschirm = screen.availWidth;
    	hoeheBildschirm = screen.availHeight - 20;
    	randLinks = breiteBildschirm/2-(fensterBreite/2);
    	randOben = hoeheBildschirm/2-(fensterHoehe/2);
    	fensterParameter = "top="+randOben+",left="+randLinks+",width="+fensterBreite+",height="+fensterHoehe+",scrollbars=no,toolbar=no,status=no,resizeable=no,location=no";
    	satellitenFenster = window.open(seitenName,instanzName,fensterParameter);
	satellitenFenster.focus();

}

function pruefePlugin (pluginVersion) {
				FlashMode = 0;
				if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
					if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1) {
						var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
						versionIndex = parseInt( versionString );
						if ( versionIndex >= pluginVersion ) {
							FlashMode = 1;
						}
					}
				}
				else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
				&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0 )) {
					theStr='FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + pluginVersion + '"))) \n';
					document.write('<script language=VBScript\> \n');
					document.write('on error resume next \n');
					document.write(theStr);
					document.write('<' + '/script\> \n');
				}
				return FlashMode;
			}
			function zeigeBildmotiv (flashMinVersion, swfDateiPfad, swfDateiname, breite, hoehe, swfHintergrundfarbe, imgDateiPfad, imgVerweis) {
				if (pruefePlugin(flashMinVersion)) {
					document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
					document.write('codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');
					document.write('id="' + swfDateiname + '" width="' + breite + '" height="' + hoehe + '"> \n');
					document.write('<param name=movie value="' + swfDateiPfad +'"> \n');
					document.write('<param name=quality value=high> \n');
					document.write('<param name=menu value=false> \n');
					document.write('<param name=bgcolor value=#' + swfHintergrundfarbe + '> \n');
					document.write('<embed src="' + swfDateiPfad +'"');
					document.write('name=' + swfDateiname + ' swliveconnect="TRUE" width="' + breite + '" height="' + hoehe + '"');
					document.write('quality="high" menu="false" bgcolor="#' + swfHintergrundfarbe + '"');
					document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> \n');
					document.write('<' + '/embed> \n');
					document.write('<' + '/object> \n');
				} else {
					if (imgVerweis) {
						document.write('<a href="' + imgVerweis + '"><img src="' + imgDateiPfad+'" width="' + breite + '" height="' + hoehe + '" border="0"><' + '/a>');
					} else {
						document.write('<img src="' + imgDateiPfad+'" width="' + breite + '" height="' + hoehe + '" border="0">');
					}
				}
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  if (name == 'win' ) {
  	name = name+String(Math.random()).slice(2);
  }
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}


// flash 1
function isFlash (inVersion) {
	FlashMode =0;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
		if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1) {
			var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
			versionIndex = parseInt( versionString );
			if ( versionIndex >= inVersion ) {
				FlashMode = 1;
			}
		}
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0 )) {
		theStr='FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+inVersion+'"))) \n';
		document.write('<script language=VBScript\> \n');
		document.write('on error resume next \n');
		document.write(theStr);
		document.write('</script\> \n');
	}
	return FlashMode;
}

// flash 2
function showAsset (flash_min_version, swf_pfad, swf_name, breite, hoehe, swf_fond, img_pfad,img_verweis) {
	if (isFlash(flash_min_version)) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');
		document.write('id="' + swf_name + '" width="' + breite + '" height="' + hoehe + '">');
		document.write('<param name=movie value="' + swf_pfad +'"> ');
		document.write('<param name=quality value=high> ');
		document.write('<param name=menu value=false> ');
		document.write('<param name=bgcolor value=#' + swf_fond + '> ');
		document.write('<embed src="' + swf_pfad +'"');
		document.write('name=' + swf_name + ' swliveconnect="TRUE" width="' + breite + '" height="' + hoehe + '"');
		document.write('quality="high" menu="false" bgcolor="#' + swf_fond + '"');
		document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
		document.write('</embed>');
		document.write('</object>');
	} else {
		if (img_verweis) {
			document.write('<a href="' + img_verweis + '"><img src="' + img_pfad+'" width="' + breite + '" height="' + hoehe + '" border="0"></a>');
		} else {
			document.write('<img src="' + img_pfad+'" width="' + breite + '" height="' + hoehe + '" border="0">');
		}
	}
}



