<!--

function clear_layer_login () {

	hide_layer_article ("dndlogin1");
	hide_layer_article ("dndlogin2");
	hide_layer_article ("dndlogin3");
	
}
 
function clear_layer_premium () {

 
}
 
 

function clear_layer_article () {

	hide_layer_article ("4dndarticle1");
	hide_layer_article ("4dndarticle2");
	hide_layer_article ("4dndarticle3");	
	hide_layer_article ("4dndarticle4");	
	hide_layer_article ("4dndarticle5");	
	hide_layer_article ("4dndarticle6");	
	hide_layer_article ("4dndarticle1x");
	hide_layer_article ("4dndarticle2x");
	hide_layer_article ("4dndarticle3x");	
	hide_layer_article ("4dndarticle4x");	
	hide_layer_article ("4dndarticle5x");	
	hide_layer_article ("4dndarticle6x");	

}

function clear_layer_ddm () {

	hide_layer_article ("4ddmarticle1");
	hide_layer_article ("4ddmarticle2");
	hide_layer_article ("4ddmarticle3");	
	hide_layer_article ("4ddmarticle4");	
	hide_layer_article ("4ddmarticle5");	
	hide_layer_article ("4ddmarticle6");	
	hide_layer_article ("4ddmarticle1x");
	hide_layer_article ("4ddmarticle2x");
	hide_layer_article ("4ddmarticle3x");	
	hide_layer_article ("4ddmarticle4x");	
	hide_layer_article ("4ddmarticle5x");	
	hide_layer_article ("4ddmarticle6x");	

}

function clear_layer_rpga () {

	hide_layer_article ("rpgaarticle1");
	hide_layer_article ("rpgaarticle2");
	hide_layer_article ("rpgaarticle3");	
	hide_layer_article ("rpgaarticle4");	
	hide_layer_article ("rpgaarticle5");	
	hide_layer_article ("rpgaarticle6");	
	hide_layer_article ("rpgaarticle1x");
	hide_layer_article ("rpgaarticle2x");
	hide_layer_article ("rpgaarticle3x");	
	hide_layer_article ("rpgaarticle4x");	
	hide_layer_article ("rpgaarticle5x");	
	hide_layer_article ("rpgaarticle6x");	

}

function reveal_layer_article (object) {

  if (document.getElementById) {
    document.getElementById(object).style.visibility = 'visible';
  }
  else if (document.layers && document.layers[object]) {
    document.layers[object].visibility = 'visible';
  }
  else if (document.all) {
    document.all[object].style.visibility = 'visible';
  }
}

function hide_layer_article (object) {
  if (document.getElementById) {
    document.getElementById(object).style.visibility = 'hidden';
  }
  else if (document.layers && document.layers[object]) {
    document.layers[object].visibility = 'hidden';
  }
  else if (document.all) {
    document.all[object].style.visibility = 'hidden';
  }
}


// set tabs ====================================================

var currenttab = 1;
 
function mainTabChange (tabclicked) {

	if (tabclicked == "1") { 
		currenttab = 1;
	}
	if (tabclicked == "2") { 
		currenttab = 2;
	}
	if (tabclicked == "3") { 
		currenttab = 3;
	}
	if (tabclicked == "4") { 
		currenttab = 4;
	}
	if (tabclicked == "5") { 
		currenttab = 5;
	}
	if (tabclicked == "6") { 
		currenttab = 6;
	}
	
//	clearTimeout(autotab);	
	
//	autotab = setTimeout('changetab()',30000); 	
	
}


function changetab () {
 
	currenttab += 1;

	if (currenttab >= 7) { 
	    currenttab = 1;
	}

	clear_layer_article ();
	reveal_layer_article ("4dndarticle" + currenttab);
	reveal_layer_article ("4dndarticle" + currenttab + "x");

//	clearTimeout(autotab);	
	
//	autotab = setTimeout('changetab()',20000); 	
	

}

function setTabBasedOnDay (newTabID) {
 
	currenttab = parseInt(newTabID);
	clear_layer_article ();
	reveal_layer_article ("4dndarticle" + newTabID);
	reveal_layer_article ("4dndarticle" + newTabID + "x");

//	clearTimeout(autotab);	
	
//	autotab = setTimeout('changetab()',30000); 	

}


 function check4theday () {

	var thedate = new Date();
	var theday = thedate.getDay();

		if (theday == 0) {
			setTabBasedOnDay("1") // sun ??
		}	

		if (theday == 1) {
			setTabBasedOnDay("1") // mon
		}	
	
		if (theday == 2) {
			setTabBasedOnDay("1") // tues
		}

		if (theday == 3) {
			setTabBasedOnDay("1") // wed
		}	

		if (theday == 4) {
			setTabBasedOnDay("1") // thurs
		}	

		if (theday == 5) {
			setTabBasedOnDay("1") // fri
		}	
		
		if (theday == 6) {
			setTabBasedOnDay("1") // sat 
		}

		if (theday == 7) {
			setTabBasedOnDay("1") // sun ??
		}	
		
		
}

// old (changed to tab 1 oct 2008)
// M: Dragon 4
// T: Features 2
// W: Dungeon 3
// Th: Minis 5
// F: Features 2
// Sat: RPGA 6
// Sun: Game Day 1







var ddmcurrenttab = 1;

function ddmTabChange (tabclicked) {

	if (tabclicked == "1") { 
		ddmcurrenttab = 1;
	}
	if (tabclicked == "2") { 
		ddmcurrenttab = 2;
	}
	if (tabclicked == "3") { 
		ddmcurrenttab = 3;
	}
	if (tabclicked == "4") { 
		ddmcurrenttab = 4;
	}
	if (tabclicked == "5") { 
		ddmcurrenttab = 5;
	}
	if (tabclicked == "6") { 
		ddmcurrenttab = 6;
	}
	
//	clearTimeout(ddmautotab);	
	
//	ddmautotab = setTimeout('ddmchangetab()',30000); 	
	
}

function ddmchangetab () {
 
	ddmcurrenttab += 1;

	if (ddmcurrenttab >= 7) { 
	    ddmcurrenttab = 1;
	}

	clear_layer_ddm ();
	reveal_layer_article ("4ddmarticle" + ddmcurrenttab);
	reveal_layer_article ("4ddmarticle" + ddmcurrenttab + "x");

//	clearTimeout(ddmautotab);	
	
//	ddmautotab = setTimeout('ddmchangetab()',20000); 	
	

}

function DDMsetTabBasedOnDay (newTabID) {
 
	ddmcurrenttab = parseInt(newTabID);
	clear_layer_ddm ();
	reveal_layer_article ("4ddmarticle" + newTabID);
	reveal_layer_article ("4ddmarticle" + newTabID + "x");

//	clearTimeout(ddmautotab);	
	
//	ddmautotab = setTimeout('ddmchangetab()',30000); 	

}


 function DDMcheck4theday () {

	var thedate = new Date();
	var theday = thedate.getDay();

		if (theday == 0) {
			DDMsetTabBasedOnDay("2") // sun ??
		}	

		if (theday == 1) {
			DDMsetTabBasedOnDay("4") // mon
		}	
	
		if (theday == 2) {
			DDMsetTabBasedOnDay("3") // tue
		}

		if (theday == 3) {
			DDMsetTabBasedOnDay("1") // wed
		}	

		if (theday == 4) {
			DDMsetTabBasedOnDay("2") // thur
		}	

		if (theday == 5) {
			DDMsetTabBasedOnDay("3") // fri
		}	
		
		if (theday == 6) {
			DDMsetTabBasedOnDay("2") // sat
		}

		if (theday == 7) {
			DDMsetTabBasedOnDay("2") // sun ??
		}	
		
		
}


















// all RPGA tabs are currently set to tab 1 for every day


var rpgacurrenttab = 1;

function rpgaTabChange (tabclicked) {

	if (tabclicked == "1") { 
		rpgacurrenttab = 1;
	}
	if (tabclicked == "2") { 
		rpgacurrenttab = 2;
	}
	if (tabclicked == "3") { 
		rpgacurrenttab = 3;
	}
	if (tabclicked == "4") { 
		rpgacurrenttab = 4;
	}
	if (tabclicked == "5") { 
		rpgacurrenttab = 5;
	}
	if (tabclicked == "6") { 
		rpgacurrenttab = 6;
	}
	
//	clearTimeout(rpgaautotab);	
	
//	rpgaautotab = setTimeout('rpgachangetab()',30000); 	
	
}

function rpgachangetab () {
 
	rpgacurrenttab += 1;

	if (rpgacurrenttab >= 7) { 
	    rpgacurrenttab = 1;
	}

	clear_layer_rpga ();
	reveal_layer_article ("rpgaarticle" + rpgacurrenttab);
	reveal_layer_article ("rpgaarticle" + rpgacurrenttab + "x");

//	clearTimeout(rpgaautotab);	
	
//	rpgaautotab = setTimeout('rpgachangetab()',20000); 	
	

}

function rpgasetTabBasedOnDay (newTabID) {
 
	rpgacurrenttab = parseInt(newTabID);
	clear_layer_rpga ();
	reveal_layer_article ("rpgaarticle" + newTabID);
	reveal_layer_article ("rpgaarticle" + newTabID + "x");

//	clearTimeout(rpgaautotab);	
	
//	rpgaautotab = setTimeout('rpgachangetab()',30000); 	

}


 function rpgacheck4theday () {

	var thedate = new Date();
	var theday = thedate.getDay();

		if (theday == 0) {
			rpgasetTabBasedOnDay("2") // sun ??
		}	

		if (theday == 1) {
			rpgasetTabBasedOnDay("2") // mon
		}	
	
		if (theday == 2) {
			rpgasetTabBasedOnDay("2") // tue
		}

		if (theday == 3) {
			rpgasetTabBasedOnDay("2") // wed
		}	

		if (theday == 4) {
			rpgasetTabBasedOnDay("2") // thur
		}	

		if (theday == 5) {
			rpgasetTabBasedOnDay("2") // fri
		}	
		
		if (theday == 6) {
			rpgasetTabBasedOnDay("2") // sat
		}

		if (theday == 7) {
			rpgasetTabBasedOnDay("2") // sun ??
		}	
		
		
}









if (tabme == "rpga") {
//	rpgaautotab = setTimeout('rpgachangetab()',20000); 	
//	alert(tabme)
} 

if (tabme == "minis") {
//	ddmautotab = setTimeout('ddmchangetab()',20000); 	
//	alert(tabme)
} 
if (tabme == "main") {
//	autotab = setTimeout('changetab()',20000); 	
//	alert(tabme)
}


// =================================================================



 






//-->




