// copyright Rod Morelos http://rod.rant-on.net
// Modified by JanW
var janw = {

	// disable annoying opera 7 tooltip (opera 7 uses 'href' as a tooltip if no 'title' attribute present)
	noOpera7Tooltips: function()
	{
		var lnk = document.getElementsByTagName ? document.getElementsByTagName('a') : null;
		if (lnk && bw.op7)
		{
			for (var l = 0; lnk[l]; l++)
			{
				if (!lnk[l].getAttribute('title')) lnk[l].setAttribute('title', ' ');
			}
		}
	},

	// this disables internet exporer 6's image toolbar when you hover your mouse over an image.
	// to permanently disable the image toolbar, go to 'internet options' > 'advanced' > un-click 'enable image toolbar'.
	noImageToolBar: function()
	{
		var img = document.getElementsByTagName ? document.getElementsByTagName('img') : document.images ? document.images : null;
		if (img)
		{
			for (var i = img.length - 1; i > 0; i--)
			{
				img[i].setAttribute('galleryimg', 'no');
			}
		}
	},


	preloadImages: function(dir)
	{
		for (var i = 3; i > 0; i--)
		{
			naam = 'image' + i
			naam  = new Image;
			naam.src = 'http://www.playersunited.nl/_images/bckgr/' + dir + '/' + i + '.jpg'
		}
	},


	noFocus: function()
	{
		var lnk = document.getElementsByTagName ? document.getElementsByTagName('a') : document.links ? document.links : null;
		if (lnk)
		{
			for (var l = 0; lnk[l]; l++)
			{
				lnk[l].onfocus = function() { this.blur(); }
			}
		}
	},	mailen: function()
	{
		obj1 = document.getElementById("mail1");
		if (obj1){
			obj1.onclick=function() {
				safeEmail('edo', 'playersunited');
				return false;
			}
		}
		obj2 = document.getElementById("mail2");
		if (obj2){
			obj2.onclick=function() {
				safeEmail('denise', 'playersunited');
				return false;
			}
		}
		obj3 = document.getElementById("mail3");
		if (obj3){
			obj3.onclick=function() {
				safeEmail('youri', 'playersunited');
				return false;
			}
		}
		obj4 = document.getElementById("mail4");
		if (obj4){
			obj4.onclick=function() {
				safeEmail('arendjan', 'playersunited');
				return false;
			}
		}
		obj5 = document.getElementById("mail5");
		if (obj5){
			obj5.onclick=function() {
				safeEmail('anna', 'playersunited');
				return false;
			}
		}
		obj6 = document.getElementById("mail6");
		if (obj6){
			obj6.onclick=function() {
				safeEmail('frank', 'playersunited');
				return false;
			}
		}
		obj7 = document.getElementById("mail7");
		if (obj7){
			obj7.onclick=function() {
				safeEmail('john', 'playersunited');
				return false;
			}
		}
		obj8 = document.getElementById("mail8");
		if (obj8){
			obj8.onclick=function() {
				safeEmail('guido', 'playersunited');
				return false;
			}
		}
		obj9 = document.getElementById("mail9");
		if (obj9){
			obj9.onclick=function() {
				safeEmail('pieter', 'playersunited');
				return false;
			}
		}
		obj10 = document.getElementById("mail10");
		if (obj10){
			obj10.onclick=function() {
				safeEmail('jasper', 'playersunited');
				return false;
			}
		}
		obj11 = document.getElementById("mail11");
		if (obj11){
			obj11.onclick=function() {
				safeEmail('douglas', 'playersunited');
				return false;
			}
		}
		obj11 = document.getElementById("mail12");
		if (obj11){
			obj11.onclick=function() {
				safeEmail('erik', 'playersunited');
				return false;
			}
		}
		obj12 = document.getElementById("mail13");
		if (obj12){
			obj12.onclick=function() {
				safeEmail('rutger', 'playersunited');
				return false;
			}
		}
		obj12 = document.getElementById("mail14");
		if (obj12){
			obj12.onclick=function() {
				safeEmail('irmgard', 'playersunited');
				return false;
			}
		}
		obj12 = document.getElementById("mail15");
		if (obj12){
			obj12.onclick=function() {
				safeEmail('corne', 'playersunited');
				return false;
			}
		}
		obj12 = document.getElementById("mail16");
		if (obj12){
			obj12.onclick=function() {
				safeEmail('jasper', 'playersunited');
				return false;
			}
		}
		obj12 = document.getElementById("mail17");
		if (obj12){
			obj12.onclick=function() {
				safeEmail('robin', 'playersunited');
				return false;
			}
		}
		
	},
start: function()
	{
		dir = 'team';
		janw.noFocus();
		janw.noOpera7Tooltips();
		janw.noImageToolBar();
		janw.mailen();
		janw.preloadImages(dir);
		iPop.AutoApply();
		sIFR();
		timeChange(2, dir);
	}
}

onload = janw.start;

