function showPic2 (whichpic) {
 if (document.getElementById) {
  var mydiv = document.getElementById('projectionarea');
  mydiv.style.width="511px";
  mydiv.innerHTML="<img id='placeholder' src='"+whichpic.href+"' width='512' height='288' /><div id='desc'>&nbsp;</div><div class='clear'></div>";
  //document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}	

function showPic16 (whichpic) {
 if (document.getElementById) {
  var mydiv = document.getElementById('projectionarea');
  mydiv.style.width="511px";
  mydiv.innerHTML="<img id='placeholder' src='"+whichpic.href+"' width='512' height='288' /><div id='desc'>&nbsp;</div><div class='clear'></div>";
  //document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}	


function showVideo2 (whichvid) {
 if (document.getElementById) {
   var mydiv = document.getElementById('projectionarea');
   var mypopis;
   if (whichvid.title) {
     if (whichvid.title2) {
       mypopis = whichvid.title+"<br /><small>"+whichvid.title2+"</small>";
     } else {
       mypopis = whichvid.title;
     }
   } else {
     mypopis = whichvid.childNodes[0].nodeValue;
   }
   mydiv.style.width="383px";
   mydiv.innerHTML="<embed src='"+whichvid.href+"' width='384' height='332' loop='1' autostart='true' /><div id='desc'>"+mypopis+"</div><div class='clear'></div>";
   return false;
 } else {
   return true;
 }
}	


function showVideo16 (whichvid) {
 if (document.getElementById) {
   var mydiv = document.getElementById('ps-wrapper');
   var mypopis;
   if (whichvid.title) {
     if (whichvid.title2) {
       mypopis = whichvid.title+"<br /><small>"+whichvid.title2+"</small>";
     } else {
       mypopis = whichvid.title;
     }
   } else {
     mypopis = whichvid.childNodes[0].nodeValue;
   }
   mydiv.style.width="511px";
   mydiv.innerHTML="<embed src='"+whichvid.href+"' width='512' height='332' loop='1' autostart='true' /><div id='desc'>"+mypopis+"</div><div class='clear'></div>";
   return false;
 } else {
   return true;
 }
}	

function showStream2 (whichflv) {
  if (document.getElementById) {
   var mydiv = document.getElementById('projectionarea');
   var paths = whichflv.href.split("/");
   var myfile = paths[paths.length-1];
   var mypopis;
   if (whichflv.title) {
     if (whichflv.title2) {
       mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
     } else {
       mypopis = whichflv.title;
     }
   } else {
     mypopis = whichflv.childNodes[0].nodeValue;
   }
   mydiv.style.width="442px";
   mydiv.innerHTML="<div id='projectionscreen'><a href='http://www.macromedia.com/go/getflashplayer'>Stáhněte si zde</a> poslední verzi flashového přehrávače.</div><div id='desc'>"+mypopis+"</div><div class='clear'></div>"; 
   createPlayer(myfile,whichflv,'video','442','332','over', 'projectionscreen');
   return false;
 } else {
   return true;
 }
}

function showStream16 (whichflv) {
    if (document.getElementById) {
        var mydiv = document.getElementById('ps-wrapper');
        var paths = whichflv.href.split("/");
        var myfile = paths[paths.length-1];
        var streamer = paths[0];
        for (var i = 1; i < paths.length-1 ;i++){
            streamer += "/"+paths[i];
        }
        var mypopis;
        if (whichflv.title) {
            if (whichflv.title2) {
                mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
            } else {
                mypopis = whichflv.title;
            }
        } else {
            mypopis = whichflv.childNodes[0].nodeValue;
        }
        mydiv.style.width="512px";
        mydiv.innerHTML="<div id='projectionscreen'><a href='http://www.macromedia.com/go/getflashplayer'>Stáhněte si zde</a> poslední verzi flashového přehrávače.</div><div id='desc'>"+mypopis+"</div><div class='clear'></div>";
        createPlayer(myfile,streamer,'video','512','288','over', 'projectionscreen');
        return false;
    } else {
        return true;
    }
} 

function showStreammcr (whichflv) {
    if (document.getElementById) {
        var mydiv = document.getElementById('ps-wrapper');        
        var mypopis;
        if (whichflv.title) {
            if (whichflv.title2) {
                mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
            } else {
                mypopis = whichflv.title;
            }
        } else {
            mypopis = whichflv.childNodes[0].nodeValue;
        }
        
        mydiv.innerHTML="<div class='ps-fill'><noscript class='ui-state-error ui-corner-all psmessage'>Pro zobrazení přehrávače povolte v prohlížeči JavaScript.</noscript></div>";
        Publicstream.live({mesto:'PLZEN_MAGISTRAT',aspect:'16:9',videoWidth:490 });
        return false;
    } else {
        return true;
    }
} 

function showStreamacr (whichflv) {
    if (document.getElementById) {
        var mydiv = document.getElementById('ps-wrapper');        
        var mypopis;
        if (whichflv.title) {
            if (whichflv.title2) {
                mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
            } else {
                mypopis = whichflv.title;
            }
        } else {
            mypopis = whichflv.childNodes[0].nodeValue;
        }
        
        mydiv.innerHTML="<div class='ps-fill'><noscript class='ui-state-error ui-corner-all psmessage'>Pro zobrazení přehrávače povolte v prohlížeči JavaScript.</noscript></div>";
        Publicstream.archiv({mesto:'PLZEN_MAGISTRAT',aspect:'16:9',videoWidth:490,playlistPosition:'bottom',playlistWidth:490,trimNames:true });
        return false;
    } else {
        return true;
    }
} 

function showSec2 (whichflv) {
  if (document.getElementById) {
   var mydiv = document.getElementById('projectionarea');
   var paths = whichflv.href.split("/");
   var i=0;
   var myfile='';
   for (i=3;i<=paths.length-1;i++) {
     myfile += '/'+paths[i];
   }
   var mypopis;
   if (whichflv.title) {
     if (whichflv.title2) {
       mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
     } else {
       mypopis = whichflv.title;
     }
   } else {
     mypopis = whichflv.childNodes[0].nodeValue;
   }
   mydiv.style.width="442px";
   mydiv.innerHTML="<div id='projectionscreen'><a href='http://www.macromedia.com/go/getflashplayer'>Stáhněte si zde</a> poslední verzi flashového přehrávače.</div><div id='desc'>"+mypopis+"</div><div class='clear'></div>"; 
   createPlayer(myfile,'422','332','0','bottom','projectionscreen');
   return false;
 } else {
   return true;
 }
}

function showSec16 (whichflv) {
  if (document.getElementById) {
   var mydiv = document.getElementById('ps-wrapper');
   var paths = whichflv.href.split("/");
   var i=0;
   var myfile='';
   for (i=3;i<=paths.length-1;i++) {
     myfile += '/'+paths[i];
   }
   var mypopis;
   if (whichflv.title) {
     if (whichflv.title2) {
       mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
     } else {
       mypopis = whichflv.title;
     }
   } else {
     mypopis = whichflv.childNodes[0].nodeValue;
   }
   mydiv.style.width="512px";
   mydiv.innerHTML="<div id='projectionscreen'><a href='http://www.macromedia.com/go/getflashplayer'>Stáhněte si zde</a> poslední verzi flashového přehrávače.</div><div id='desc'>"+mypopis+"</div><div class='clear'></div>"; 
   createPlayer(myfile,'512','288','0','bottom','projectionscreen');
   return false;
 } else {
   return true;
 }
}



function showFlv2 (whichflv) {
  if (document.getElementById) {
   var mydiv = document.getElementById('projectionarea');
   var mypopis;
   if (whichflv.title) {
     if (whichflv.title2) {
       mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
     } else {
       mypopis = whichflv.title;
     }
   } else {
     mypopis = whichflv.childNodes[0].nodeValue;
   }
   mydiv.style.width="442px";
   mydiv.innerHTML="<embed src='player/player.swf' allowfullscreen='true' allowscriptaccess='always' width='442' height='332'  flashvars='file=" + whichflv.href + "&controlbar=over&type=video&autostart=true' /><div id='desc'>" + mypopis + "</div><div class='clear'></div>"; 
   return false;
 } else {
   return true;
 }
}

function showFlv16 (whichflv) {
  if (document.getElementById) {
   var mydiv = document.getElementById('ps-wrapper');
   var paths = whichflv.href.split("/");
   var myfile = "file="+paths[paths.length-1];
   var mypopis;
   if (whichflv.title) {
     if (whichflv.title2) {
       mypopis = whichflv.title+"<br /><small>"+whichflv.title2+"</small>";
     } else {
       mypopis = whichflv.title;
     }
   } else {
     mypopis = whichflv.childNodes[0].nodeValue;
   }
   mydiv.style.width="512px";
   mydiv.innerHTML="<embed src='player/player.swf' allowfullscreen='true' allowscriptaccess='always' width='512' height='298'  flashvars='file=" + whichflv.href + "&controlbar=over&type=video&autostart=true' /><div id='desc'>"+mypopis+"</div><div class='clear'></div>"; 
   return false;
 } else {
   return true;
 }
}

