<!-- Begin
function popupAnnounce(URL,WidthNum,HeightNum) {
	window.open(URL, 'Announce', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width='+WidthNum+',height='+HeightNum+',left = 440,top = 255');
}
function popup(URL,WidthNum,HeightNum)
{
window.open(URL,'Info','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width='+WidthNum+',height='+HeightNum);
}

var rand1 = 0;
var useRand = 0;
toppics = new Array;
toppics[1] = new Image();
toppics[1].src = "files/nav/1top.jpg";
toppics[2] = new Image();
toppics[2].src = "files/nav/2top.jpg";
toppics[3] = new Image();
toppics[3].src = "files/nav/3top.jpg";
toppics[4] = new Image();
toppics[4].src = "files/nav/4top.jpg";
toppics[5] = new Image();
toppics[5].src = "files/nav/5top.jpg";
leftpics = new Array;
leftpics[1] = new Image();
leftpics[1].src = "files/nav/1left.jpg";
leftpics[2] = new Image();
leftpics[2].src = "files/nav/2left.jpg";
leftpics[3] = new Image();
leftpics[3].src = "files/nav/3left.jpg";
leftpics[4] = new Image();
leftpics[4].src = "files/nav/4left.jpg";
leftpics[5] = new Image();
leftpics[5].src = "files/nav/5left.jpg";

toppicsM = new Array;
toppicsM[1] = new Image();
toppicsM[1].src = "files/nav/monktop.jpg";
toppicsM[2] = new Image();
toppicsM[2].src = "files/nav/monktop2.jpg";
leftpicsM = new Array;
leftpicsM[1] = new Image();
leftpicsM[1].src = "files/nav/monkleft.jpg";
leftpicsM[2] = new Image();
leftpicsM[2].src = "files/nav/monkleft2.jpg";

// This is for the Swaping of the main DA-Wizard Picture.
function swapPic() {
	var imgnum = toppics.length - 1;
	do {
		var randnum = Math.random();
		rand1 = Math.round((imgnum - 1) * randnum) + 1;
	} while (rand1 == useRand);
	useRand = rand1;
	
	document.topimg.src = toppics[useRand].src;
	document.leftimg.src = leftpics[useRand].src;
}
function swapPicMonk() {
	var imgnum = toppicsM.length - 1;
	do {
		var randnum = Math.random();
		rand1 = Math.round((imgnum - 1) * randnum) + 1;
	} while (rand1 == useRand);
	useRand = rand1;
	
	document.topimg.src = toppicsM[useRand].src;
	document.leftimg.src = leftpicsM[useRand].src;
}

// These are the variables; you can change these if you want
var expDays = 10;  // How many days to remember the setting
var standardStyle = '1'; // This is the number of your standard style sheet; this will be used when the user did not do anything.
var nameOfCookie = 'DAWizardStyle'; // This is the name of the cookie that is used.

var dawizardTop = '<table border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="2" width="469">&nbsp;</td><td height="25" align="center" valign="top"><img src="files/nav/line_bl.gif" width="180" height="15"></td></tr><tr><td align="right" valign="bottom"><div id="mouseovers"><img style="cursor:pointer" alt="" SRC="files/nav/mo_warrior.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'2\', exp); selectDAClass();" width="65" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_priest.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'3\', exp); selectDAClass();" width="52" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_rogue.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'4\', exp); selectDAClass();" width="51" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_monk.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'5\', exp); selectDAClass();" width="42" height="23"></div></td></tr></table><A HREF="index.html"><img alt="" name="topimg" SRC="" BORDER="0" width="664" height="115"></A><BR><img alt="" name="leftimg" SRC="" BORDER="0">';
var dawizardLeft = '<A CLASS="nav" HREF="armor.html">Wizard Armor</A><BR><A CLASS="nav" HREF="weapons.html">Wizard Weapons</A><BR><A CLASS="nav" HREF="gear.html">Equipment</A><BR><BR><A CLASS="nav" HREF="spells.html">Wizard Spells</A><BR><A CLASS="nav" HREF="skills.html">Wizard Skills</A><BR><A CLASS="nav" HREF="trinkets.html">Trinkets</A><BR><BR><A CLASS="nav" HREF="guide_wizard.html">Life as a Wizard</A><BR><A CLASS="nav" HREF="guide_sub.html">Sub-Pathing</A><BR><A CLASS="nav" HREF="guide_master.html">Mastering</A><BR><A CLASS="nav" HREF="guide_gm.html">Grand Mastering</A><BR><A CLASS="nav" HREF="guide_summoner.html">Summoner</A><BR><BR><A CLASS="nav" HREF="elements.html">Elemental Info</A><BR><A CLASS="nav" HREF="tasks.html">Wizardry Tasks</A><BR><A CLASS="nav" HREF="necromancy.html">Necromancy</A><BR><A CLASS="nav" HREF="tactics.html">Hunting Tactics</A><BR><BR>';

var dawarriorTop = '<table border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="2" width="469">&nbsp;</td><td height="25" align="center" valign="top"><img src="files/nav/line_g.gif" width="180" height="15"></td></tr><tr><td align="right" valign="bottom"><div id="mouseovers"><img style="cursor:pointer" alt="" SRC="files/nav/mo_wizard.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'1\', exp); selectDAClass();" width="55" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_priest.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'3\', exp); selectDAClass();" width="52" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_rogue.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'4\', exp); selectDAClass();" width="51" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_monk.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'5\', exp); selectDAClass();" width="42" height="23"></div></td></tr></table><A HREF="index.html"><img alt="" SRC="files/nav/warriortop.jpg" BORDER="0" width="664" height="115"></A><BR><img alt="" SRC="files/nav/warriorleft.jpg" BORDER="0" width="335" height="460">';
var dawarriorLeft = '<A CLASS="nav" HREF="warrior_armor.html">Warrior Armor</A><BR><A CLASS="nav" HREF="warrior_weapons.html">Warrior Weapons</A><BR><A CLASS="nav" HREF="gear.html">Equipment</A><BR><BR><A CLASS="nav" HREF="warrior_spells.html">Warrior Spells</A><BR><A CLASS="nav" HREF="warrior_skills.html">Warrior Skills</A><BR><A CLASS="nav" HREF="trinkets.html">Trinkets</A><BR><BR><A CLASS="nav" HREF="warrior_guide_sub.html">Sub-Pathing</A><BR><A CLASS="nav" HREF="warrior_guide_master.html">Mastering</A><BR><A CLASS="nav" HREF="warrior_guide_gm.html">Grand Mastering</A><BR><A CLASS="nav" HREF="warrior_guide_gladiator.html">Gladiator</A><BR><BR><A CLASS="nav" HREF="warrior_honorfield.html">Honor Field</A><BR><A CLASS="nav" HREF="tasks_tailor.html">Warrior Tasks</A><BR><BR>';

var dapriestTop = '<table border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="2" width="469">&nbsp;</td><td height="25" align="center" valign="top"><img src="files/nav/line_p.gif" width="180" height="15"></td></tr><tr><td align="right" valign="bottom"><div id="mouseovers"><img style="cursor:pointer" alt="" SRC="files/nav/mo_wizard.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'1\', exp); selectDAClass();" width="55" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_warrior.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'2\', exp); selectDAClass();" width="65" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_rogue.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'4\', exp); selectDAClass();" width="51" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_monk.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'5\', exp); selectDAClass();" width="42" height="23"></div></td></tr></table><A HREF="index.html"><img alt="" SRC="files/nav/priesttop.jpg" BORDER="0" width="664" height="115"></A><BR><img alt="" SRC="files/nav/priestleft.jpg" BORDER="0" width="343" height="465">';
var dapriestLeft = '<A CLASS="nav" HREF="priest_armor.html">Priest Armor</A><BR><A CLASS="nav" HREF="priest_weapons.html">Priest Weapons</A><BR><A CLASS="nav" HREF="gear.html">Equipment</A><BR><BR><A CLASS="nav" HREF="priest_spells.html">Priest Spells</A><BR><A CLASS="nav" HREF="priest_skills.html">Priest Skills</A><BR><A CLASS="nav" HREF="trinkets.html">Trinkets</A><BR><BR><A CLASS="nav" HREF="priest_guide_sub.html">Sub-Pathing</A><BR><A CLASS="nav" HREF="priest_guide_master.html">Mastering</A><BR><A CLASS="nav" HREF="priest_guide_gm.html">Grand Mastering</A><BR><A CLASS="nav" HREF="priest_guide_bard.html">Bard</A><BR><BR><A CLASS="nav" HREF="priest_religiousroles.html">Religious Roles</A><BR><A CLASS="nav" HREF="priest_tasks.html">Priest Tasks</A><BR><BR>';

var darogueTop = '<table border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="2" width="469">&nbsp;</td><td height="25" align="center" valign="top"><img src="files/nav/line_r.gif" width="180" height="15"></td></tr><tr><td align="right" valign="bottom"><div id="mouseovers"><img style="cursor:pointer" alt="" SRC="files/nav/mo_wizard.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'1\', exp); selectDAClass();" width="55" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_warrior.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'2\', exp); selectDAClass();" width="65" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_priest.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'3\', exp); selectDAClass();" width="52" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_monk.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'5\', exp); selectDAClass();" width="42" height="23"></div></td></tr></table><A HREF="index.html"><img alt="" SRC="files/nav/roguetop.jpg" BORDER="0" width="664" height="115"></A><BR><img alt="" SRC="files/nav/rogueleft.jpg" BORDER="0" width="328" height="460">';
var darogueLeft = '<A CLASS="nav" HREF="rogue_armor.html">Rogue Armor</A><BR><A CLASS="nav" HREF="rogue_weapons.html">Rogue Weapons</A><BR><A CLASS="nav" HREF="gear.html">Equipment</A><BR><BR><A CLASS="nav" HREF="rogue_spells.html">Rogue Spells</A><BR><A CLASS="nav" HREF="rogue_skills.html">Rogue Skills</A><BR><A CLASS="nav" HREF="trinkets.html">Trinkets</A><BR><BR><A CLASS="nav" HREF="rogue_guide_sub.html">Sub-Pathing</A><BR><A CLASS="nav" HREF="rogue_guide_master.html">Mastering</A><BR><A CLASS="nav" HREF="rogue_guide_gm.html">Grand Mastering</A><BR><A CLASS="nav" HREF="rogue_guide_archer.html">Archer</A><BR><BR><A CLASS="nav" HREF="rogue_blackmarket.html">Black Market</A><BR><A CLASS="nav" HREF="rogue_tasks.html">Rogue Tasks</A><BR><BR>';

var damonkTop = '<table border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="2" width="469">&nbsp;</td><td height="25" align="center" valign="top"><img src="files/nav/line_b.gif" width="180" height="15"></td></tr><tr><td align="right" valign="bottom"><div id="mouseovers"><img style="cursor:pointer" alt="" SRC="files/nav/mo_wizard.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'1\', exp); selectDAClass();" width="55" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_warrior.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'2\', exp); selectDAClass();" width="65" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_priest.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'3\', exp); selectDAClass();" width="52" height="23"><img style="cursor:pointer" alt="" SRC="files/nav/mo_rogue.jpg" BORDER="0" onClick="SetCookie(nameOfCookie, \'4\', exp); selectDAClass();" width="51" height="23"></div></td></tr></table><A HREF="index.html"><img alt="" name="topimg" SRC="" BORDER="0" width="664" height="115"></A><BR><img alt="" name="leftimg" SRC="" BORDER="0">';
var damonkLeft = '<A CLASS="nav" HREF="monk_armor.html">Monk Armor</A><BR><A CLASS="nav" HREF="monk_weapons.html">Monk Weapons</A><BR><A CLASS="nav" HREF="gear.html">Equipment</A><BR><BR><A CLASS="nav" HREF="monk_spells.html">Monk Spells</A><BR><A CLASS="nav" HREF="monk_skills.html">Monk Skills</A><BR><A CLASS="nav" HREF="trinkets.html">Trinkets</A><BR><BR><A CLASS="nav" HREF="monk_guide_sub.html">Sub-Pathing</A><BR><A CLASS="nav" HREF="monk_guide_master.html">Mastering</A><BR><A CLASS="nav" HREF="monk_guide_gm.html">Grand Mastering</A><BR><A CLASS="nav" HREF="monk_guide_druid.html">Druid</A><BR><BR><A CLASS="nav" HREF="monk_forms.html">Animal Forms</A><BR><A CLASS="nav" HREF="monk_stream.html">Sapphire Stream</A><BR><A CLASS="nav" HREF="tasks_herb.html">Monk Tasks</A><BR><BR>';

function resetAds() {
	google_ad_client = "pub-8243057531437353";
	google_alternate_color = "FFFFFF";
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";
	google_ad_type = "text_image";
	google_ad_channel = "";
	google_color_bg = "FFFFFF";
	google_color_link = "0000FF";
	google_color_text = "000000";
	google_color_url = "008000";
	
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}
	if (styleNum == "1") { 
	google_color_border = "0033FF"; }
	if (styleNum == "2") { 
	google_color_border = "1B703A"; }
	if (styleNum == "3") { 
	google_color_border = "FF6FCF"; }
	if (styleNum == "4") { 
	google_color_border = "CC0000"; }
	if (styleNum == "5") { 
	google_color_border = "6F3C1B"; }

	var styleNum = "";
	return styleNum;
}

// This is the main function that does all the work
function selectDAClass() {
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}

	resetAds();
	if (styleNum == "1") { 
	document.getElementById('navagationHead').innerHTML=dawizardTop;
	document.getElementById('navagation').innerHTML=dawizardLeft; 
	swapPic();
	init(); }
	if (styleNum == "2") { 
	document.getElementById('navagationHead').innerHTML=dawarriorTop;
	document.getElementById('navagation').innerHTML=dawarriorLeft; 
	init(); }
	if (styleNum == "3") { 
	document.getElementById('navagationHead').innerHTML=dapriestTop;
	document.getElementById('navagation').innerHTML=dapriestLeft; 
	init(); }
	if (styleNum == "4") { 
	document.getElementById('navagationHead').innerHTML=darogueTop;
	document.getElementById('navagation').innerHTML=darogueLeft; 
	init(); }
	if (styleNum == "5") { 
	document.getElementById('navagationHead').innerHTML=damonkTop;
	document.getElementById('navagation').innerHTML=damonkLeft;
	swapPicMonk();
	init(); }

	var styleNum = "";
	return styleNum;
}

function selectDAArmor() {
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}

	if (styleNum == "1") { 
	document.getElementById('temarmor').href="armor.html";
	document.getElementById('medarmor').href="armor_med.html"; }
	if (styleNum == "2") { 
	document.getElementById('temarmor').href="warrior_armor.html";
	document.getElementById('medarmor').href="warrior_armor_med.html"; }
	if (styleNum == "3") { 
	document.getElementById('temarmor').href="priest_armor.html";
	document.getElementById('medarmor').href="priest_armor_med.html"; }
	if (styleNum == "4") { 
	document.getElementById('temarmor').href="rogue_armor.html";
	document.getElementById('medarmor').href="rogue_armor_med.html"; }
	if (styleNum == "5") { 
	document.getElementById('temarmor').href="monk_armor.html";
	document.getElementById('medarmor').href="monk_armor_med.html"; }

	var styleNum = "";
	return styleNum;
}

function selectDAWeapon() {
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}

	if (styleNum == "1") { 
	document.getElementById('temweapon').href="weapons.html";
	document.getElementById('medweapon').href="weapons_med.html"; }
	if (styleNum == "2") { 
	document.getElementById('temweapon').href="warrior_weapons.html";
	document.getElementById('medweapon').href="warrior_weapons_med.html"; }
	if (styleNum == "3") { 
	document.getElementById('temweapon').href="priest_weapons.html";
	document.getElementById('medweapon').href="priest_weapons_med.html"; }
	if (styleNum == "4") { 
	document.getElementById('temweapon').href="rogue_weapons.html";
	document.getElementById('medweapon').href="rogue_weapons_med.html"; }
	if (styleNum == "5") { 
	document.getElementById('temweapon').href="monk_weapons.html";
	document.getElementById('medweapon').href="monk_weapons_med.html"; }

	var styleNum = "";
	return styleNum;
}

function selectDAHerb() {
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}

	if (styleNum == "1" || styleNum == "2" || styleNum == "4") { 
	document.getElementById('herbalism').innerHTML='<table width="480" class="default" align="center"><tr><td width="160" align="center"><A HREF="tasks.html">Wizardry Research</A></td><td width="160" align="center"><A HREF="tasks_element.html">Elementalism</A></td><td width="160" align="center"><FONT CLASS="inact">Herbalism</FONT></td></tr></table>'; }
	if (styleNum == "3") { 
	document.getElementById('herbalism').innerHTML='<table width="320" class="default" align="center"><tr><td width="160" align="center"><A HREF="priest_tasks.html">Priest Tasks</A></td><td width="160" align="center"><FONT CLASS="inact">Herbalism</FONT></td></tr></table>'; }
	if (styleNum == "5") { 
	document.getElementById('herbalism').innerHTML='<table width="320" class="default" align="center"><tr><td width="160" align="center"><FONT CLASS="inact">Herbalism</FONT></td><td width="160" align="center"><A HREF="tasks_tailor.html">Tailoring</A></td></tr></table>'; }

	var styleNum = "";
	return styleNum;
}

function selectDATailor() {
	var styleNum = GetCookie(nameOfCookie);
	if (styleNum == null) {
		styleNum = standardStyle;
	}

	if (styleNum == "2" || styleNum == "1" || styleNum == "3") { 
	document.getElementById('tailor').innerHTML='<table width="340" class="default" align="center"><tr><td width="170" align="center"><FONT CLASS="inact">Tailoring</FONT></td><td width="170" align="center"><A HREF="warrior_tasks_2blade.html">2-Handed Blade Smith</A></td></tr></table>'; }
	if (styleNum == "4") { 
	document.getElementById('tailor').innerHTML='<table width="480" class="default" align="center"><tr><td width="160" align="center"><A HREF="rogue_tasks.html">Smithing</A></td><td width="160" align="center"><FONT CLASS="inact">Tailoring</FONT></td><td width="160" align="center"><A HREF="rogue_tasks_other.html">Other Tasks</A></td></tr></table>'; }
	if (styleNum == "5") { 
	document.getElementById('tailor').innerHTML='<table width="320" class="default" align="center"><tr><td width="160" align="center"><A HREF="tasks_herb.html">Herbalism</A></td><td width="160" align="center"><FONT CLASS="inact">Tailoring</FONT></td></tr></table>'; }

	var styleNum = "";
	return styleNum;
}

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

// Function to get the settings of the user
function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

// Function to get the settings of the user
function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}

// Function to remember the settings
function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

// Function to remove the settings
function DeleteCookie (name) {
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

// The Functions needed for the Pre-Loading and the Mouse Over Effects.
var W3CDOM = (document.createElement && document.getElementsByTagName);
var mouseOvers = new Array();
var mouseOuts = new Array();

function init()
{
	if (!W3CDOM) return;
	var nav = document.getElementById('mouseovers');
	var imgs = nav.getElementsByTagName('img');
	for (var i=0;i<imgs.length;i++)
	{
		imgs[i].onmouseover = mouseGoesOver;
		imgs[i].onmouseout = mouseGoesOut;
		var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
		mouseOuts[i] = new Image();
		mouseOuts[i].src = imgs[i].src;
		mouseOvers[i] = new Image();
		mouseOvers[i].src = imgs[i].src.substring(0,imgs[i].src.lastIndexOf('.')) + "_omo" + suffix;
		imgs[i].number = i;
	}
}
function mouseGoesOver()
{
	this.src = mouseOvers[this.number].src;
}
function mouseGoesOut()
{
	this.src = mouseOuts[this.number].src;
}
//  End -->