
function initPage() {
  if (typeof equalizeHeights=='function') equalizeHeights();
}

function showInfoWin(tid) {
  var mytext=document.getElementById(tid).innerHTML;
  document.getElementById("InfoWinText").innerHTML=mytext;
  document.getElementById("InfoWin").style.top=200+document.body.scrollTop;
  document.getElementById("InfoWin").style.display='';
}

function closeInfoWin() {
  document.getElementById("InfoWinText").innerHTML="";
  document.getElementById("InfoWin").style.display='none';
}


function previewFileClose(aurl) {
  document.getElementById("previewwin").style.display='none';
  frames["preview"].location.replace("http://www.claudio.de/Intern/Null/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34");
}

function previewRemoteFile(url,title) {
  frames["preview"].location.replace('http://www.claudio.de/Intern/MP3Player/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34&url='+encodeURIComponent(url)+"&tracks_title="+title);
  var e=document.getElementById("previewwin");
  e.style.top=250+document.body.scrollTop;
  e.style.display='';
}

function previewFile(aitemid) {
   frames["preview"].location.replace('http://www.claudio.de/Intern/MP3Player/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34&itemid='+encodeURIComponent(aitemid));
   var e=document.getElementById("previewwin");
   e.style.top=250+document.body.scrollTop;
   e.style.display='';
}

function streamFileClose(aurl) {
  document.getElementById("streamwin").style.display='none';
  frames["stream"].location.replace("http://www.claudio.de/Intern/Null/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34");
}

function streamfile(link,itemid,filename,duration,client) {
  frames["stream"].location.replace('http://www.claudio.de/Intern/Flexplayer/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34&link='+encodeURIComponent(link)+'&itemid='+itemid+'&filename='+filename+'&client='+client+'&duration='+duration);
  var e=document.getElementById("streamwin");
  e.style.top=250+document.body.scrollTop;
  e.style.display='';
}

function showSubtype(path,_target) {
  if (!_target) {
    window.frames["subtypesrc"].location.replace('http://www.claudio.de/Intern/Subtype/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34&itempath='+encodeURIComponent(path));
  } else {
    window.frames["subtypesrc"].location.replace('http://www.claudio.de/Intern/Subtype/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34&itempath='+encodeURIComponent(path)+'&target='+_target);
  }
}

function initSubtype(w) {
  e=document.getElementById("subtypewin");
  e.style.width=w+'px';
  e.style.display='';
  e=document.getElementById("preventer");
  e.style.display='';
}

function closeSubtype() {
  e=document.getElementById("subtypewin");
  e.style.display='none';
  e=document.getElementById("preventer");
  e.style.display='none';
  noscroll=false;
}

function enterButton(event) {
  if(document.all) {
    if (event && event.keyCode == 13) dosubmit();
  } else {
    if (event && event.which == 13) dosubmit();
  }
}

function openIptv() {
  window.frames["iptvIframe"].location.replace('http://www.claudio.de/Intern/IPTV_Loader/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34');

  var e=document.getElementById('iptvDiv');
  e.style.display="";
  document.getElementById('preventer').style.display='';
}

function startLivechat() {
  window.frames["chatIframe"].location.replace('http://www.claudio.de/Intern/cloud_loader/de?PHPSESSID=8c08e2d97fa6eedc2ffc48d46d687a34');

  var e=document.getElementById('chatDiv');
  e.style.display="";
  document.getElementById('preventer').style.display='';
}

function trim(string) {
  return string.replace (/^\s+/,"").replace (/\s+$/,"");
}
