
/*-----------------------------------*/
function plugNS()
{	
var b=1;
var o=0;
var p=new Array("Shockwave Flash","Shockwave for Director","RealPlayer","QuickTime","VivoActive","LiveAudio","VRML","Dynamic HTML Binding","Windows Media Services");
var np=navigator.plugins;

for(var x=0;x<p.length;x++){
	for(var i=0;i<np.length;i++)
		if(np[i].name.indexOf(p[x])>=0)o|=b;b*=2;
}return o;
}
/*-----------------------------------*/

function plugIE(){
if(!document.body)document.write('<body>');
var db=document.body;
var o=0;
var b=1;
var p=new Array("D27CDB6E-AE6D-11CF-96B8-444553540000","2A202491-F00D-11CF-87CC-0020AFEECF20","23064720-C4F8-11D1-994D-00C04F98BBC9","","","","90A7533D-88FE-11D0-9DBE-0000C0411FC3","9381D8F2-0288-11D0-9501-00AA00B911A5","22D6F312-B0F6-11D0-94AB-0080C74C7E95");

db.addBehavior("#default#clientcaps");

for(var i=0;i<p.length;i++){
	if(p[i])if(db.isComponentInstalled("{"+p[i]+"}","componentid"))o|=b;b*=2;
}
return o;
}


/*-----------------------------------*/
function doNothing(a)
{ 
/* var iframe = document.createElement('iframe');
    iframe.setAttribute('src', "<html><head></head></html>");
    iframe.src = '<html><head></head><body>' + a + '</body></html>';
*/
 //   alert('doNothing : ' + a);

    return(1);
}
/*-----------------------------------*/
function includeFile(file) {

  if (document.createElement && document.getElementsByTagName) {
    var head = document.getElementsByTagName('head')[0];
    //var head = FindObject( 'head');;

    var script = document.createElement('script');
    script.setAttribute('type', 'text/javascript');
    script.setAttribute('src', file);
    head.appendChild(script);
  } else {
    alert('Your browser does\'t handle the DOM standard well.');
  }

}


/*-----------------------------------*/
/* in boings the sequence of boings,1-88 closed by -1.
 * In Boingindex we keep at which boing we are
 */
 
var	boings = new Array(1,3,4,8, 14, 28, 48, 78, 88 , 78,  64, 74, 82, 88, 84, 80, 78, 80, 84,88, 86, 84,87, 88, -1);   	
var	Boingindex =0;

/*-----------------------------------*/
function FindObject( name )
{
if ( document.getElementById ){
	return( document.getElementById( name ));
}else if ( document.all ) {
	return( document.all[name] );
}
return( 0 );
}

/*-----------------------------------*/

function HistoryMenu( l , language)
{
var startofname;
var historypage;
var firstp = 1;
var lastp  = 33; // <-------- hier eventueel de laatste pagina vergroten of verkleinen
var thisp,prevp,nextp;
var prevpage,nextpage,firstpage,lastpage;
var langadd='';

startofname = window.location.pathname.indexOf('/l');
if( startofname < 0 ){

	

	if ( language == 'en' ){
//		l = l + '<a href="historiee.html" class="menu">history</a><br>';
		l = l + '<a href="l1historiee.html" class="menu">history</a><br>';

	}else{	
		l = l + '<a href="l1historie.html" class="menu">historie</a><br>';
	}
	return(l);
}

historypage = window.location.pathname.substr( startofname + 2, 2);
thisp       = parseInt(historypage,10);
prevp = thisp - 1;
nextp = thisp + 1;

if ( language == 'en' ){
	 langadd = 'e';
	 d1 = 'first page';
	 dl = 'last page';
	 dp = 'previous page';
	 dn = 'next page'; 		 
}else{
	 d1 = 'eerste pagina';
	 dl = 'laatste pagina';
	 dp = 'vorige pagina';
	 dn = 'volgende pagina';
}


if ( language == 'en' ){
//	l = l + '<a href="l1historie' + langadd + '.html" class="menu" style="width=50%;">history</a>';
	l = l + '<a href="l1historiee.html" class="menu" style="width=50%;">history</a>';

}else{	
	l = l + '<a href="l1historie.html" class="menu" style="width=50%;">historie</a>';
}

firstpage = 'l1historie' + langadd + '.html';
lastpage  = 'l' + lastp + 'historie' + langadd + '.html';
prevpage  = 'l' + prevp + 'historie' + langadd + '.html';
nextpage  = 'l' + nextp + 'historie' + langadd + '.html';

if ( thisp != 1 ){

	l = l + '<a href="' + firstpage +  '"><img src="himg/start.gif" class="menuimg" alt="' + d1 + '"></a>';
	l = l + '<a href="' + prevpage +  '"><img src="himg/left.gif" class="menuimg"  alt="' + dp + '"></a>';
}
if ( thisp != lastp){
	l = l + '<a href="' + nextpage +  '"><img src="himg/right.gif" class="menuimg"  alt="' + dn + '"></a>';
	l = l + '<a href="' + lastpage +  '"><img src="himg/end.gif" class="menuimg"  alt="' + dl + '"></a>';

}

l = l + '<br>';

return(l);

}

/*-----------------------------------*/
function BBoing( objname)
{
var Rob;

Rob = FindObject( objname );

++Boingindex;

if ( boings[ Boingindex] != -1 ){
	Rob.style.top     = boings[ Boingindex ] +'px';
	setTimeout( 'BBoing('+objname+' )', 80 );
}

}

/*-----------------------------------*/

function boing( objname )
{
var Rob;


Rob = FindObject( objname );


Rob.style.top     = '1px' ;
Rob.style.left    = '5px' ;

setTimeout( 'BBoing('+ objname +')', 80 );

} 
/*-------------------*/

function plop( index )
{
o = FindObject( 'blue'+index );
o.style.display = 'block';

++index;
if ( index < 6 ){
	setTimeout( 'plop('+index+' )', 200 );
}
return(1);
}
/*-------------------*/

function startplop()
{
var o;

for ( i = 0 ; i < 6; ++i){
	o = FindObject( 'blue'+i );
	o.style.display = 'none';
}
plop( 0 );
}
/*-----------------------------------*/
function DispMore( what,top )
{
o = FindObject( what );

if ( top > 50 ) {
 o.style.top = top + 'px';
}else{
 o.style.top = '50' + 'px';
}

o.style.display = 'block';

}
/*-----------------------------------*/
function DispLess( what )
{
o = FindObject( what );
o.style.display = 'none';

}

var ytplayer;

/*-----------------------------------*/
function DispMoreFilm( what,top )
{
o = FindObject( what );


o.style.display = 'block';
o.style.visibility = 'visible';

if(ytplayer){
		ytplayer.seekTo(0, true);
		ytplayer.playVideo();
}
}
/*-----------------------------------*/
function DispLessFilm( what )
{

o = FindObject( what );

ytplayer = document.getElementById( what + 'player' );
if ( ytplayer ){
	ytplayer.pauseVideo();
}
o.style.display = 'none';
o.style.visibility = 'hidden';

}

/*-----------------------------------*/
function DispMorePics( obj, what,url )
{
o = FindObject( what );

obj.style.backgroundColor      = 'red';
obj.onmouseout = function(e){
	obj.style.backgroundColor      = 'ivory';
}

o.src = url;


o.style.display = 'block';
o.style.visibility = 'visible';


}


/*-----------------------------------*/

function onYouTubePlayerReady(playerId) {
	
      ytplayer = document.getElementById( playerId );
	
	ytplayer.seekTo(0, true);
	ytplayer.playVideo();

}

/*-----------------------------------*/

function fillmenu(language)
{
var 	u,l,m,b;

u = '<a href="/stats/">';
u = u + '<img border="0" alt="Site statistics" title="The Old Fashioners site statistics" src="img/stats.png">'; 
u = u + '</a>';

//u = u + '<script src="http://m1.webstats.motigo.com/c.js?id=3097964" type="text/javascript"></script>';


if ( language == 'nl' || language == ''){
l = '';
l = l + '<img src="img/toflogo30.gif" style="border-bottom: 2px solid brown;"><br>';
l = l + '<a href="indexe.html" class="menu">english</a><br>';
l = l + '<a href="index.html" class="menu">home</a><br>';
l = l + '<a href="mannen.html" class="menu">de mannen</a><br>';
l = l + '<a href="recensie.html" class="menu">recensies</a><br>';
l = l + '<a href="cd.html" class="menu">opnamen</a><br>';
l = l + '<a href="zina/index.php" class="menu">MP3</a><br>';
l = l + '<a href="pictures.html" class="menu">foto\'s</a><br>';
l = l + '<a href="contact.html" class="menu">contact</a><br>';
l = l + '<a href="gig.html" class="menu">agenda</a><br>';
//l = l + '<a href="guest.html?nl" class="menu">gastenboek</a><br>';
l = l + '<a href="stageplan.html" class="menu">stageplan</a><br>';
l = l + '<a href="jazzlinks.html" class="menu">links</a><br>';



//b = '<img src="img/30jaar.gif">';
}

if ( language == 'en'){
l = '';
l = l + '<img src="img/toflogo30.gif" style="border-bottom: 2px solid brown;"><br>';
l = l + '<a href="index.html" class="menu">nederlands</a><br>';
l = l + '<a href="indexe.html" class="menu">home</a><br>';
l = l + '<a href="mannene.html" class="menu">the men</a><br>';
l = l + '<a href="recensiee.html" class="menu">reviews</a><br>';
l = l + '<a href="cde.html" class="menu">recordings</a><br>';
l = l + '<a href="zina/index.php" class="menu">MP3</a><br>';
l = l + '<a href="pictures.html" class="menu">pictures</a><br>';
l = l + '<a href="contacte.html" class="menu">contact</a><br>';
l = l + '<a href="gige.html" class="menu">giglist</a><br>';
//l = l + '<a href="guest.html" class="menu">guestbook</a><br>';
l = l + '<a href="stageplane.html" class="menu">stageplan</a><br>';
l = l + '<a href="jazzlinkse.html" class="menu">links</a><br>';
//b = '<img src="img/30years.gif">';
}

l = HistoryMenu(l,language);


l = l + u;


l = l + '<img src="img/bottomshadow.gif" width="213px" height="6px">';
m = FindObject( 'logo');
m.innerHTML = l;


return(1);
}

/*---------------------------------------------------------*/

var divxdiv;

/*---------------------------------------------------------*/

function smalldivx( msg )
{
var divxdivo;

divxdivo = document.getElementById( divxdiv );

if ( msg == '2' || msg == '14'){
/*	divxdivo.style.height = "1px";
	divxdivo.style.width = "1px";

	divxdivo.style.visibility = "hidden";
	divxdivo.style.display = "none";

	window.close();
*/

}

}
/*---------------------------------------------------------*/

function playdivx( videoname, divname, smallifend ){

 window.open( videoname,'TOFtv','width=370,height=325,scrollbars=no,toolbar=no,location=no,status=no,resizable=no');
 return(false);

}

/*---------------------------------------------------------*/

function activate_controls( objectname, embedname )
{
var o,e,plugin;


o = document.getElementById( objectname );
e = document.getElementById( embedname );

if ( e == null ){
	/* Explorer doesn't see the embed object */
	plugin = o;
}else{
	plugin = e;
}

if ( plugin.Play ) plugin.Play(); 
if ( plugin.play ) plugin.play(); 
if ( plugin.playVideo ) plugin.playVideo(); 

return( false);
}

/*---------------------------------------------------------*/

function activateplaydivx( videoname, divname, smallifend ){

var tvkast;

tvkast = document.getElementById( divname ); 
//alert('divname '+divname);

a = '<object  classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" ';  
a = a + ' width="352" height="308" ';
a = a + ' codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> ';
a = a + ' <param name="src" value="' + videoname +'" /> ';
a = a + ' <param name="allowContextMenu" value="true" /> ';
a = a + ' <param name="bannerEnabled" value="false" /> ';

if ( smallifend ){
 divxdiv = divname;
 a = a + ' <param name="statusCallback" value="smalldivx" /> ';
}

a = a + ' <embed src="' + videoname + '" ';
a = a + '  width="352" height="308"  allowContextMenu="true" '; 
a = a + '  bannerEnabled="false" '; 
if ( smallifend ){
 a = a + ' statusCallback="smalldivx" ';
}
a = a + '  pluginspage="http://go.divx.com/plugin/download/"> ';
a = a + ' </embed> ';
a = a + '</object> ';


tvkast.innerHTML = a;
tvkast.style.width = "354px";
tvkast.style.height = "312px";
tvkast.style.visibility = "visible";
tvkast.style.display    = "block";

//divxmovie.GoWindowed();
//divxmovie.Play();
}


