//window.onerror=fehler;
function fehler(){return true;}
///////////////////////////
// Galerieaufruf per JS
function showGalerie(titel, folder, language){
galerieWin=window.open("http://www.optima-packaging-group.de/opg/specials/galerie/galerie_frame.php4?cat="+folder+"&gal_titel="+titel+"&autoPlay=true&UID=3e106b31ea1ef22d8d847ff29d2ef975&LANG="+language+"","WIN","status=0,location=0,menubar=0,scrollbars=0,toolbar=0,resizable=yes,height=560,width=850");
}
function preparePrint(URL){
newURL="http://www.optima-packaging-group.de/templates/printPage.php4?URL="+URL;
printWin=window.open(newURL,"Print","status=0,location=0,menubar=1,scrollbars=1,toolbar=1,height=705,width=650");
printWin.focus();
printWin.print();
}
function showImage(imgURL)
{
IMG=window.open("","IMG","status=0,location=0,menubar=0,scrollbars=0,toolbar=0,height=700,width=640");
doc=IMG.document;
doc.open();
doc.writeln("
OPTIMA packaging group");
doc.writeln("");
doc.writeln("");
doc.close();
IMG.focus();
}
function resizeWindow(){
height=document.images.bild.height;
width=document.images.bild.width;
if (navigator.appName.indexOf("Netscape")!=-1 && ((navigator.appVersion.indexOf("5.")!=-1) || (navigator.appVersion.indexOf("6.")!=-1))){
width=width+10;
height=height+115;
}
else{
width=width+12;
height=height+115;
}
self.resizeTo(width,height);
self.focus();
}
////////////////////////////
// Liefert die Layer
// mit dem übergebenen Namen zurück
function get_Layer(name)
{
tmp="";
if (BROWSER=="OP" || (BROWSER=="NS" && VERSION>=6))
tmp="ELEM=document.getElementById('"+name+"');";
if (BROWSER=="IE" && VERSION>=4)
tmp="ELEM=document.all['"+name+"'];";
if (BROWSER=="NS" && VERSION<6)
tmp="ELEM=document.layers['"+name+"'];";
eval(tmp);
return ELEM;
}
////////////////////////////
// Ändert die Sichtbarkeit der übergebenen Ebene
function set_visibility(ELEM,visibility)
{
tmp="";
if (BROWSER=="OP" || (BROWSER=="NS" && VERSION>=6))
tmp="ELEM.style.visibility='"+visibility+"';";
if (BROWSER=="IE" && VERSION>=4)
tmp="ELEM.style.visibility='"+visibility+"';";
if (BROWSER=="NS" && VERSION<6)
tmp="ELEM.visibility='"+visibility+"';";
eval(tmp);
return true;
}
////////////////////////////
// Ändert die Sichtbarkeit der übergebenen Ebene
function setbgColor(ELEM,color)
{
tmp="";
if ((BROWSER=="NS" && VERSION>=6))
tmp="ELEM.style.backgroundColor='"+color+"';";
if ((BROWSER=="OP" && VERSION>=5) || (BROWSER=="IE" && VERSION>=4))
tmp="ELEM.style.background='"+color+"';";
if ( (BROWSER=="NS" && VERSION<6))
tmp="ELEM.background='"+color+"';";
eval(tmp);
return true;
}
///////////////////////////
// Funktionen für das Submenü
// unten
function setFlexSub()
{
ELEM=get_Layer("FlexSub");
set_visibility(ELEM,"hidden");
ELEM_Height=18;
maxTopPos=550;
if ((BROWSER == 'NS' && VERSION<6))
{
ELEM_Height=ELEM.clip.height;
WDWheight=window.innerHeight;
newPOS=WDWheight-ELEM_Height+window.pageYOffset;
if (newPOS>maxTopPos)
ELEM.top=newPOS;
else
ELEM.top=maxTopPos;
}
if ((BROWSER == 'NS' && VERSION>=6) || (BROWSER=="OP" && VERSION>=5))
{
WDWheight=window.innerHeight;
if (BROWSER=="OP" && VERSION==5)
ELEM_Height=ELEM_Height;
else
ELEM_Height=ELEM.offsetHeight;
newPOS=WDWheight-ELEM_Height+window.pageYOffset;
if (newPOS>maxTopPos)
ELEM.style.top=newPOS;
else
ELEM.style.top=maxTopPos;
}
if ((BROWSER == 'IE' && VERSION>=4) )
{
ELEM_Height=ELEM.clientHeight;
WDWheight=document.body.clientHeight;
newPOS=WDWheight-ELEM_Height+document.body.scrollTop;
if (newPOS>maxTopPos)
ELEM.style.top=newPOS;
else
ELEM.style.top=maxTopPos;
}
set_visibility(ELEM,"visible");
if ((BROWSER == 'NS' || BROWSER=="OP") && VERSION<6)
setTimeout("setFlexSub()",3000); //1500
}
function getTopPosition(ELEM) {
var ot=ELEM.offsetTop;
while ( (ELEM=ELEM.offsetParent) != null) {
ot += ELEM.offsetTop;
}
return ot;
}
function showInterpack(imgURL)
{
IN=window.open("","IN","status=0,location=0,menubar=0,scrollbars=0,toolbar=0,height=460,width=690");
doc=IN.document;
doc.open();
doc.writeln("OPTIMA");
doc.writeln("");
doc.writeln("");
doc.close();
}
function showPopup(imgURL,h,w)
{
spopup=window.open("","spopup","status=0,location=0,menubar=0,scrollbars=0,toolbar=0,height="+h+",width="+w);
doc=spopup.document;
doc.open();
doc.writeln("OPTIMA");
doc.writeln("");
doc.writeln("");
doc.close();
}
function showXmass(imgURL)
{
//return true;
//if (screen.width>=800)
//{
XM=window.open("","XM","status=0,location=0,menubar=0,scrollbars=0,toolbar=0,height=360,width=890");
//XM.blur();
doc=XM.document;
doc.open();
doc.writeln("OPTIMA");
doc.writeln("");
doc.writeln("");
doc.close();
//}
//else
//{
//return true;
//}
}