function slideshow(url)
 {
  satWidth = 900;
  satHeight = 700;
  new_window=window.open(url,'dia','toolbar=no,scrollbars=no,resizable=yes,status=no,menubar=no,location=no,fullscreen=yes,screenX=0,screenY=0,left=0,top=0,width=' + satWidth + ',height=' + satHeight + '');
  new_window.focus();
  return false;
 }

function hide_comment_form()
 {
  document.getElementById('commentform').style.display='none';
  document.getElementById('show_commentform').style.display='block';
 }
 
function show_comment_form()
 {
  document.getElementById('commentform').style.display='block';
  document.getElementById('show_commentform').style.display='none';
  location.hash='commentform';
  document.getElementById('comment_text').focus();
 }
 
function show_comments()
 {
  document.getElementById('commentcontainer').style.display='block';
  document.getElementById('commentlink').style.display='none';
  location.hash='comments';
 }   

img1 = new Image();
img1.src ="/cms/templates/img/next_mo.gif";
img2 = new Image();
img2.src ="/cms/templates/img/prev_mo.gif";
img3 = new Image();
img3.src ="/cms/templates/img/magnifier_plus.gif";
img4 = new Image();
img4.src ="/cms/templates/img/magnifier_minus.gif";

var MSIE = document.all ? true : false;
var flashVersion = getFLV();
function init() {
    if('undefined' != typeof(window.catch_calls))
        while(window.catch_calls.length)
            eval(window.catch_calls.shift());
}
function enable_active_x(id) {
    if(!MSIE) return;
    var elm = getElm(id);
    if(!elm) return;
    var buf = elm.innerHTML;
    elm.innerHTML = buf;
}
function getElm(name, src) {//{{{
    if(!src) src = document;
    return src.getElementById ? src.getElementById(name) : eval(src+".all."+name);
}//}}}
function getFLV() {
    if (navigator.plugins && (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])) {
        var fD = navigator.plugins["Shockwave Flash" + (navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "")].description;
        return flashVersionDetected = parseInt(fD.match(/( \d{1,2})\.\d+/)[1]);
    }
    var fV = false; x = false;
    document.write("<scr"+"ipt language=VBScript>\nintCurVersion = 15\nDo\nOn Error Resume Next\n"
        +"fV = (IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & intCurVersion)))\n"
        +"If fV = true Then Exit Do\nintCurVersion = intCurVersion - 1\nLoop While intCurVersion >= 1\n"
        +"x=intCurVersion\n</scr"+"ipt>");
    return x;
}
var active_mp3 = new Array();
function playerButton(id, song, title) {
    if(6>flashVersion) return;
    var elm = getElm(id);
    var btn = getElm(id+'_btn');
    if(!elm) return;
    var buf = getElm(id+'_player');
    if(buf) document.body.removeChild(buf);
    elm.style.display="inline";
    elm.style.cursor="pointer";
    btn.src="/cms/templates/img/play.png";
    btn.alt=title;
    btn.title=title;
    btn.onclick=function() { btn.src="/cms/templates/img/stop.png"; btn.alt="Stop"; btn.title="Stop"; btn.onclick=function() {playerButton(id, song, title)}; playMP3(id, song, title)}
}
function playMP3(id, song, title) {
    var buf;
    while(active_mp3.length) {
        buf = active_mp3.shift();
        playerButton(buf[0], buf[1], buf[2]);
    }
    var div = document.createElement('div');
    div.id = id+'_player';
    active_mp3.push([id, song, title]);
    div.innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="17" width="17" type="application/x-shockwave-flash">'
        +'<param name="movie" value="/cms/flash/musicplayer_f6.swf?song_url='+song+'&amp;autoplay=true" />'
        +'<embed src="/cms/flash/musicplayer_f6.swf?song_url='+song+'&amp;autoplay=true" height="17" width="17" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
        +'</object>';
    div.style.position="absolute";
    div.style.left="-300px";
    div.style.top="-300px";
    document.body.appendChild(div);
}

