///////////////////////////////////////
//                                   //
//        Wimpy Button Maker         //
//                                   //
//          By Mike Gieson           //
//         ©2006 Plain Inc.          //
//           Available at            //
//       www.wimpyplayer.com         //
//                                   //
///////////////////////////////////////
var wimpySwf = "http://www.clickforfreedom.com/wimpy_button.swf";
var path     = "http://www.clickforfreedom.com/filestore/pagesetteruploads/";
var wmipath=   "http://www.clickforfreedom.com/filestore/wmimp3s/";
function cffTestimonial(fileRef, testTitle, noaudio){
        var wimpyWidth = 35;
        var wimpyHeight = 35;
        var myid = Math.round((Math.random()*1000)+1);
        var flashCode = "";
        var newlineChar = "\n";
        var audioF=path+fileRef+"xAudio.dat";
        var imageF=path+fileRef+"xImage.dat";

        flashCode += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" width="'+wimpyWidth+'" height="'+wimpyHeight+'" id="wimpybutton'+myid+'">'+newlineChar;
        flashCode += '<param name="movie" value="'+wimpySwf+'" />'+newlineChar;
        flashCode += '<param name="loop" value="false" />'+newlineChar;
        flashCode += '<param name="menu" value="false" />'+newlineChar;
        flashCode += '<param name="quality" value="high" />'+newlineChar;
        flashCode += '<param name="wmode" value="transparent" />'+newlineChar;
        flashCode += '<param name="flashvars" value="theFile='+audioF+'" />'+newlineChar;
        flashCode += '<embed src="'+wimpySwf+'" width="'+wimpyWidth+'" height="'+wimpyHeight+'" flashvars="theFile='+audioF+'" wmode="transparent" loop="false" menu="false" quality="high" name="wimpybutton'+myid+' align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'+newlineChar;
        //document.write('<br><textarea name="textarea" cols="40" rows="10">'+flashCode+'</textarea><br>')+newlineChar;
        document.write('<table><tr><td align="center">');
        document.write('<img src="'+imageF+'">');
        document.write('<br>'+testTitle+'<br></tr>');
        if (noaudio!="NA") {
               document.write('<tr><td align="center">');
               document.write(flashCode);
               document.write('</tr><tr><td align="center">')
               document.write('(click to play)');
               document.write('</tr>');
        }
        document.write('</table>');
}
function cffAudio(fileRef){
        var wimpyWidth = 35;
        var wimpyHeight = 35;
        var myid = Math.round((Math.random()*1000)+1);
        var flashCode = "";
        var newlineChar = "\n";
        var audioF=wmipath+fileRef;

        flashCode += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" width="'+wimpyWidth+'" height="'+wimpyHeight+'" id="wimpybutton'+myid+'">'+newlineChar;
        flashCode += '<param name="movie" value="'+wimpySwf+'" />'+newlineChar;
        flashCode += '<param name="loop" value="false" />'+newlineChar;
        flashCode += '<param name="menu" value="false" />'+newlineChar;
        flashCode += '<param name="quality" value="high" />'+newlineChar;
        flashCode += '<param name="wmode" value="transparent" />'+newlineChar;
        flashCode += '<param name="flashvars" value="theFile='+audioF+'" />'+newlineChar;
        flashCode += '<embed src="'+wimpySwf+'" width="'+wimpyWidth+'" height="'+wimpyHeight+'" flashvars="theFile='+audioF+'" wmode="transparent" loop="false" menu="false" quality="high" name="wimpybutton'+myid+' align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'+newlineChar;
        //document.write('<br><textarea name="textarea" cols="40" rows="10">'+flashCode+'</textarea><br>')+newlineChar;
        document.write('<table><tr><td align="center">');
               document.write('<tr><td align="center">');
               document.write(flashCode);
               document.write('</tr><tr><td align="center">')
               document.write('(click to play)');
               document.write('</tr>');
        document.write('</table>');
}
function cffAboutWMI(fileRef, testTitle){
        var wimpyWidth = 35;
        var wimpyHeight = 35;
        var myid = Math.round((Math.random()*1000)+1);
        var flashCode = "";
        var newlineChar = "\n";
        var audioF=path+fileRef;

        flashCode += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" width="'+wimpyWidth+'" height="'+wimpyHeight+'" id="wimpybutton'+myid+'">'+newlineChar;
        flashCode += '<param name="movie" value="'+wimpySwf+'" />'+newlineChar;
        flashCode += '<param name="loop" value="false" />'+newlineChar;
        flashCode += '<param name="menu" value="false" />'+newlineChar;
        flashCode += '<param name="quality" value="high" />'+newlineChar;
        flashCode += '<param name="wmode" value="transparent" />'+newlineChar;
        flashCode += '<param name="flashvars" value="theFile='+audioF+'" />'+newlineChar;
        flashCode += '<embed src="'+wimpySwf+'" width="'+wimpyWidth+'" height="'+wimpyHeight+'" flashvars="theFile='+audioF+'" wmode="transparent" loop="false" menu="false" quality="high" name="wimpybutton'+myid+' align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'+newlineChar;
        //document.write('<br><textarea name="textarea" cols="40" rows="10">'+flashCode+'</textarea><br>')+newlineChar;
        document.write('<table><tr><td align="center">');
        document.write('<br>'+testTitle+'<br></tr>');

               document.write('<tr><td align="center">');
               document.write(flashCode);
               document.write('</tr><tr><td align="center">')
               document.write('(click to play)');
               document.write('</tr>');

        document.write('</table>');
}
