function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function open_window(url) {
  mywin = window.open(url, 'mypopup', 'menubar,scrollbars,resizable=yes,width=650,height=500,left=20,top=20');
}

function open_popup(url) {
//  url = url.replace( "popup://", "/reamobile_de/layout/set/popup/" );
  url = url.replace( "popup://", "/layout/set/popup/" );
  mywin = window.open(url, 'mypopup', 'scrollbars,resizable,width=840,height=640,left=10,top=10');
}

function open_popup_avi(url) {
  mywin = window.open("/avi.php?film="+url, 'mypopup', 'scrollbars,resizable,width=360,height=280,left=10,top=10');
}

function open_popup_mov(url) {
  mywin = window.open("/mov.php?film="+url, 'mypopup', 'scrollbars,resizable,width=360,height=280,left=10,top=10');
}


function open_foto(url,width, height) {
  width = width + 20;
  height = height + 50;
  mywin = window.open(url, 'mypopup', 'menubar,scrollbars,resizable=yes,width='+width+',height='+height+',left=20,top=20');
}


function DisplayFlashObject(v_movie, v_width, v_height, v_object, v_quality, v_play) 
{
    var oeTags = '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'
  + 'width="'+v_width+'" height="'+v_height+'" id="'+v_object+'">'
  + '<param name="movie" value='+v_movie+' />'
  + '<param name="quality" value="'+v_quality+'" />'
  + '<param name="play" value="'+v_play+'" />'
  + '<param name="loop" value="'+v_loop+'" />'
  + '<embed src="'+v_movie+'"'
    + 'type="application/x-shockwave-flash"'
    + 'quality="'+v_quality+'" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'
    + 'width="'+v_width+'" height="'+v_height+'" play="'+v_play+'"'
    + 'loop="'+v_loop+'" name="'+v_loop+'">'
        + '</embed>'
  + '</object>';  
  
  document.write(oeTags);
}

function SelectOrderCheckbox(){
  
  search=decodeURI(window.location.search.substr(1));
  //Cookie setzen
  for (i=0;i<document.forms.length;i++){
    for (j=0;j<document.forms[i].elements.length;j++){
      e=document.forms[i].elements[j];
      if (e.type=='checkbox' && e.value==search) {
        document.cookie=e.value;
        e.checked=true;
      }
    }
  }
  //window.alert(search);
  //Checkbox markieren
  for (i=0;i<document.forms.length;i++){
    for (j=0;j<document.forms[i].elements.length;j++){
      e=document.forms[i].elements[j];
      if (e.type=='checkbox' && e.value==document.cookie) {
        e.checked=true;
      }
    }
  }

}  
