
function setWindowStatus(text)
{
window.status='THE GERMAN CCR FANPAGE: '+text;return true
}

function showPow(name,width,height,language)
{

var imageName   = 'pow/' + name + '.jpg';
var imageWidth  = width;
var imageHeight = height;

var width=(width+20);
var height = (height+20)


if (language == "engl")
{
var fileName = "EPOW";
var file = "ejspow.htm";
}

else
{
var fileName = "POW";
var file = "jspow.htm";
}

var size = 'width=' + width + ',' + 'height=' + height +',screenX=100,screenY=100,resizable=yes';

powWin = window.open(file, fileName, size);

powWin.document.close();
powWin.document.open("text/html");

powWin.document.write("".concat('<html>\n',
                                '<head>\n'));

if (language=="engl")
{
 str = '<title>CCR FANPAGE "PICTURE OF THE WEEK"</title>\n\n';
}
else
{
 str = '<title>CCR FANPAGE "FOTO DER WOCHE"</title>\n\n';
}

powWin.document.write(str);

str =

'</head>\n\n'+

'<body bgcolor="#000000" text="#ffffff" link="#ffff00" vlink="#ff0000" alink="#ffffff">\n\n'+

'<center>\n\n'+

'<table bgcolor="#000000" cellpadding="0" cellspacing="0" border="0">\n'+
'<tr>\n'+
'<td align="center">\n'+
'<p>\n'+
'<a href="javascript:window.close()">\n'+
'<img src="'+imageName+'" width="'+imageWidth+'" height="'+imageHeight+'" border="0" alt="close window"></a>\n'+
'</p>\n\n'+

'</td>'+
'</tr>\n'+
'</table>\n\n'+

'</center>\n'+
'</body>\n'+
'</html>';


powWin.document.write(str);
powWin.document.close();

}

function closeWindow(name)
{
 name.close
}

function openGalleryWin(file)
{
 GalleryWin = window.open(file, 'gallerywindow', 'width=750,height=650,resizable=no,scrollbars=yes');
}

function openDiscoWin(file,winName)
{
 DiscoWin = window.open(file, winName, 'width=980,height=650,resizable=yes,scrollbars=yes,dependent=no');
}

function openPopupWin(file)
{
 var MaxHeight = (screen.height - 100);

 PopupWin = window.open(file, 'popwindow', 'width=750,height=650,resizable=yes,scrollbars=yes,dependent=no');
 PopupWin.focus();
}

function openVideoWin(file)
{
  VideoWin = window.open(file, 'videowindow', 'width=600,height=430,screenX=50,screenY=150,resizable=yes,dependent=no');
 VideoWin.focus();
}

function openVideoWinLARGE(file)
{
  VideoWin = window.open(file, 'videowindowLARGE', 'width=800,height=500,screenX=50,screenY=150,resizable=yes,dependent=no');
 VideoWin.focus();
}

function openVideoWinHD(file)
{
  VideoWin = window.open(file, 'videowindowHD', 'width=1024,height=600,screenX=50,screenY=150,resizable=yes,dependent=no');
 VideoWin.focus();
}

function openSpecialWin(file)
{
 SpecialWin = window.open(file, 'specialwindow', 'width=980,height=650,resizable=yes,scrollbars=yes,dependent=no');
 SpecialWin.focus();
}

function openSpecialWin2(file)
{
 SpecialWin2 = window.open(file, 'specialwindow2', 'width=900,height=650,screenX=0,screenY=0,resizable=yes,scrollbars,menubar=yes,status=yes,dependent=no');
 SpecialWin2.focus();
}

function openEnglishWin(file)
{
 var MaxHeight = (screen.height - 100);

 EnglishWin = window.open(file, 'englwindow', 'width=700,height=650,resizable=yes,scrollbars=yes,dependent=no');
 EnglishWin.focus();
}

function show_layer(x)
{
 if(document.layers)
  document.layers[x].visibility="show";
 else
  document.all[x].style.visibility="visible";
}

function hide_layer(x)
{
 if(document.layers)
  document.layers[x].visibility="hide";
 else
  document.all[x].style.visibility="hidden";
}

var old;
var memold;
var subold;

if(document.layers)
 {
  window.captureEvents(Event.MOUSEUP);
  window.onmouseup=do_out;
 }
else
 {
  document.onmouseup=do_out; // oder auch: document.onmouseclick=do_out
 }

function do_menu(x)
{
 if(!old)
  old=memold;
 if(old!=x)
  {
   show_layer(x);
   old=x;
  }
 else
  old="";
}

function do_check(x)
{
 if(old && old!=x)
  {
   hide_layer(old);
   show_layer(x);
   old=x;
  }
 do_submenu();
}

function do_out()
{
  if(old)
   hide_layer(old);

   memold=old;
   old="";
   do_submenu();
}

function do_submenu(x)
{
        if(subold)
        {
                hide_layer(subold);
                subold="";
        }

        if(x)
        {
                show_layer(x);
                subold=x;
        }
}

function changeLanguage(language)
{
 if (language == 'us'){
  if(document.layers){
   document.layers.us.visibility="show";
   document.layers.ger.visibility="hide";
  }
  else {
   document.all.us.style.visibility="visible";
   document.all.ger.style.visibility="hidden";
  }
 }
 else {
  if(document.layers){
   document.layers.us.visibility="hide";
   document.layers.ger.visibility="show";
   }
  else {
   document.all.us.style.visibility="hidden";
   document.all.ger.style.visibility="visible";
  }
 }
}

function show_warning()
{
 if(document.layers)
  //alert(document.layers.sorry.top);
  document.layers.sorry.visibility="show";
 else
  //alert(document.all.sorry.style.visibility);
  document.all.sorry.style.visibility="visible";
}

function hide_warning()
{
 if(document.layers)
  //alert(document.layers.sorry.top);
  document.layers.sorry.visibility="hide";
 else
  //alert(document.all.sorry.style.visibility);
  document.all.sorry.style.visibility="hidden";
}