var moreInfoArray;
var myOverlay;
// Core AJAX Object
//-------------------------------------
function getHttpRequestObject()
{
if (window.XMLHttpRequest) // Mozilla, Safari,...
{
httpRequest = new XMLHttpRequest();
if (httpRequest.overrideMimeType)
{
httpRequest.overrideMimeType('text/xml');
// See note below about this line
}
}
else if (window.ActiveXObject) // IE
{
try
{
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!httpRequest) {
return null;
}
return httpRequest;
}
function loadRunePreview(type, id, aNode)
{
var httpRequest = getHttpRequestObject();
if (httpRequest == null)
return true;
httpRequest.onreadystatechange = function() { processRunePreviewChange(httpRequest, aNode.parentNode.parentNode, type, id); };
httpRequest.open('GET', '/preview/frontPreviewAjax.do?i=' + id + '&t=' + type, true);
httpRequest.send(null);
return false;
}
function processRunePreviewChange(httpRequest, trNode, type, id)
{
if (httpRequest.readyState == 4) // Done reading processing
{
if (httpRequest.status == 200)
{
//alert(httpRequest.responseText);
loadBaseDetails(type,id);
//clearTableSelection();
//trNode.className = 'runeStoreSelected';
}
else
{
// TODO Handle error
//document.getElementById('runePreview').innerHTML = "An error occured";
}
}
}
function clearTableSelection()
{
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++)
{
if (tables.className = 'runeStoreList')
{
for (var j = 0; j < tables[i].rows.length; j++)
{
tables[i].rows[j].className = '';
}
}
}
}
function showDescription(abilityId, e)
{
var inner = document.getElementById('abilityDesc' + abilityId).innerHTML;
if (document.all) { // if IE
// grab the x-y pos.s if browser is IE
tempX = event.clientX+ document.documentElement.scrollLeft;
tempY = event.clientY + document.documentElement.scrollTop;
} else { // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}
// catch possible negative values in NS4
if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}
document.getElementById('abilityTooltipContent').innerHTML = inner;// + "" + tempX + ", " + tempY;
var obj = document.getElementById('abilityTooltip');
obj.style.left = (tempX+15) + 'px';
obj.style.top = (tempY+15) + 'px';
obj.style.display = 'block';
}
function hideDescription(abilityId)
{
var objName = 'abilityDesc' + abilityId;
var obj = document.getElementById('abilityTooltip');
obj.style.display = 'none';
}
function showMoreInfoOverlay(el, e)
{
if (moreInfoArray == null)
init();
setOpacityOverlay(0);
document.getElementById('blackOverlay').style.width = document.getElementById('testId').offsetWidth + 'px';
document.getElementById('blackOverlay').style.height = document.getElementById('testId').offsetHeight + 'px';
document.getElementById('blackOverlay').style.top = YAHOO.util.Dom.getY(document.getElementById('testId')) + 'px';
document.getElementById('blackOverlay').style.left = YAHOO.util.Dom.getX(document.getElementById('testId')) + 'px';
document.getElementById('blackOverlay').style.visibility = 'visible';
fadeInBlackOverlay();
document.getElementById('myOverlayContent').innerHTML = moreInfoArray[el.id];
var xPos = (YAHOO.util.Dom.getDocumentWidth() - 400)/2;
var yPos = YAHOO.util.Event.getPageY(e) - document.getElementById('myOverlay').offsetHeight - 15;
myOverlay = new YAHOO.widget.Overlay("myOverlay", {x:xPos, y:yPos, visible:false, width:"400px", effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.25} } );
myOverlay.render();
myOverlay.show();
myOverlay.showEvent = setTimeout("showCloseButton(" + xPos + ", " + yPos + ")", 150);
}
function showCloseButton(xPos, yPos)
{
var overlayBox = document.getElementById('myOverlay');
var closeMoreInfoBox = document.getElementById('closeMoreInfoBox');
var newX = xPos + overlayBox.offsetWidth - closeMoreInfoBox.offsetWidth -5; //5 for spacing
var newY = yPos + overlayBox.offsetHeight;
closeMoreInfoBox.style.left = newX + 'px';
closeMoreInfoBox.style.top = newY + 'px';
closeMoreInfoBox.style.visibility = 'visible';
//var attributes = {
// points: { to: [newX, newY]}
// };
//var anim = new YAHOO.util.Motion('closeMoreInfoBox', attributes, 0.5);
//anim.onComplete.subscribe(function() {
document.getElementById('blackOverlay').onclick = hideOverlay;
//});
//anim.animate();
}
function hideOverlay()
{
myOverlay.hide();
document.getElementById('closeMoreInfoBox').style.visibility = 'hidden';
document.getElementById('blackOverlay').onclick = '';
document.getElementById('blackOverlay').style.visibility = 'hidden';
}
function setOpacityOverlay(level)
{
YAHOO.util.Dom.setStyle('blackOverlay', 'opacity', level);
}
function fadeInBlackOverlay()
{
var duration = 750; /* 1000 millisecond fade = 1 sec */
var steps = 20; /* number of opacity intervals */
var delay = 5000; /* 5 sec delay before fading out */
for (i = 0; i <= .45; i += (1 / steps))
{
setTimeout("setOpacityOverlay(" + i + ")", i * duration);
}
}
function init()
{
moreInfoArray = {
"moreInfo_expansionPack" : "This is an expansion pack. This pack contains 10 runes from the selected expansion. The runes you receive in this pack will be broken down by rarity. In the expansion pack, you will get: 6 common runes, 3 uncommon runes, and 1 rare rune. Also, your rare rune will have a 10% chance of being a special exotic rune. Each rune will be of a certain type: Spell, Equipment, Relic, or Champion. Expansion packs are best used to fill your rune collection.
**If you don't have any purchased runes, it is recommended that you start with a pre-configured battlegroup.**",
"moreInfo_IS" : "This is a Pre-Configured Battlegroup for the Ironfist Stronghold faction. The Ironfist Stronghold is populated with Dwarves, Barbarians, and powerful constructs, all willing to grant you their strength in battle.
In PoxNora, Ironfist Champions focus on defensive strategies. They focus more on melee combat, than on ranged attacked. If survivability and slow-but-steady tactics are your focus, you will enjoy utilizing their healing spells and hearty defense.
If you have a Battlegroup full of Ironfist Runes, your Champions will also receive a resistance against attack spells. This will allow your Champions to stay resilient, when your opponent is raining spells on them. This resistance will reduce all Spell-based damage by 6!
The Ironfist Stronghold starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_FS" : "This is a Pre-Configured Battlegroup for the Forglar Swamp faction. The Forglar Swamp is populated with Boghoppers, Firk, and all manner of swamp creature, all of them ready to help you in defending the marsh.
In PoxNora, Forlgar Champions focus on mobility in watery environments. They are equally versed in melee and ranged combat. If you are looking for a more amphibious approach to battle, then pick Forglar Swamps as your faction! You will enjoy manipulating water to your advantage. Also, Forglar shamans are known to be excellent healers.
If have a Battlegroup full of Forglar Runes, then you will receive additional Nora each round. This will allow you more Nora, to deploy Champions and cast Spells. Whenever your turn begins, expect an extra 8 Nora!
The Forglar Swamp starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_KF" : "This is a Pre-Configured Battlegroup for the K'thir Forest faction. K'thir Forest is populated with Elves, Centaurs, and Garu, all willing to lend a hand in protecting the forest.
In PoxNora, K'thir Champions are agile. They are often skilled in ranged combat, launching arrows and magic spells at their enemies from afar. They have little in the way of melee combat. If you want to focus on quick, long-ranged attacks, then K'thir Forest is your faction!
When you have a full Battlegroup of K'thir Runes, your Champions will be granted a boost in their speed. This can help them move further and attack more times in a turn. With this bonus, you can enjoy an extra 2 speed!
The K'Thir Forest starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_ST" : "This is a Pre-Configured Battlegroup for the Savage Tundra faction. The Savage Tundra is populated by Jakei, Lonx, and Yeti, all willing to provide their talents in defense of their frozen domain.
In PoxNora, Savage Tundra Champions are known for wreaking havoc on their enemies. With their authority over ice, they can freeze their opponents in place with magical spells and strike from a distance with ice. They have equal focus on melee and ranged combat. If you want a chilled approach to combat, the Savage Tundra is your faction!
When you have a Battlegroup full of Savage Tundra Runes, your Champions will receive a boost to their health. This will allow them to stay alive longer in combat. When in combat, your Champions will have 10 extra health!
The Savage Tundra starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_FW" : "This is a Pre-Configured Battlegroup for Forsaken Wastes faction. The Forsaken Wastes are populated with undead soldiers, ready to carry out your will.
In PoxNora, Forsaken Wastes Champions are expendable. Their main tactic involves overwhelming their enemies with cheap units that can be quickly redeployed. They have equal parts melee and ranged combat, If the thought of an endless undead army suits you, then the Forsaken Wastes may just be your faction.
With a Battlegroup full of Forsaken Wastes Runes, your Champions will receive a major reduction on their Cooldown rate. This will allow you to quickly redeploy them, when they are defeated in combat. With this bonus, your Rune Cooldowns will be reduced by 60 percent!
The Forsaken Wastes starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_UD" : "This is a Pre-Configured Battlegroup for the Underdepths faction. The Underdepths are populated with Nefari, Demons, and other fire-type creatures, all of them prepared to help you burn the "Overlands."
In PoxNora, Underdepths Champions focus heavily on melee combat. The Demons of Sheoul enjoy an up-close and personal approach, taking their swords to their enemies. They have very little in the way of ranged combat. If you like looking your opponent in the eye, when you destroy them, the Underdepths faction is the right choice for you!
With a Battlegroup full of Underdepths Runes, your Champions will receive a bonus to damage done in combat. This means each attack will deal even more damage, regardless of the enemy's defense. With this bonus, your Champions will deal 5 extra damage!
The Underdepths starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_SP" : "This is a Pre-Configured Battlegroup for the Shattered Peaks faction. The Shattered Peaks is populated by Voil, G'hern, Moga, and Cyclopes, all of them ready to aid you in expanding their territory.
In PoxNora, Shattered Peaks Champions focus on outnumbering their opponents. They synergize, granting strength to each other in combat. They focus more on ranged combat than on melee. If you want a massive army, that thrives on cooperation, then the Shattered Peaks is your faction.
Using a Battlegroup full of Shattered Peaks Runes will give you a Nora refund. This will grant you a little extra to spend on another Rune. With this bonus, you will receive a 12% Nora refund on deployed champs, with a minimum of 4 Nora!
The Shattered Peaks starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"moreInfo_SL" : "This is a Pre-Configured Battlegroup for the Sundred Lands faction. The Sundered Lands is populated with Draksars, Skeezicks, and other reptilian creatures, all of them prepared to fight gloriously in battle, in your name.
In PoxNora, Sundered Lands Champions are resilient. With strong armor and scales, along with regenerative abilities, their soldiers can last long in combat. Their Champions focus more on melee, and less on ranged attacks. If you want stoic soldiers fighting faithfully for you, then the Sundered Lands is your faction.
Using a Battlegroup full of Sundered Lands Runes will grant your Champions a major defense bonus. This means your Champions can take more punishment in each round. With this bonus, your Champions will receive 14 extra defense in combat!
The Sundered Lands starter pack gives you everything you need to jump in and start playing this faction right away. Once you purchase this deck, the runes you have received can be seen in your Rune Manager. Once you have configured your deck, hit Play Now!",
"token_10" : "This is a 10 Token Pack. Tokens are used to reset Champions you own or to craft special rewards in the Rune Forge and Player Rewards sections.
The Tokens you receive in this pack will be broken down by rarity, differently from the Rune Packs. In the 10 Token Pack, you will get: 3 Bronze Tokens, 3 Silver Tokens, and 4 Gold Tokens. Also, your Gold Tokens will have a 10% chance of being a special Platinum Token.
The 10 Token Pack is best used when you need more Tokens to reset your Champions or to craft something.
** There are NO Runes in this pack! You can also receive Reset Tokens by purchasing Rune Booster Packs.**",
"token_30" : "This is a 30 Token Pack. Tokens are used to reset Champions you own or to craft special rewards in the Rune Forge and Player Rewards sections.
The Tokens you receive in this pack will be broken down by rarity, differently from the Rune Packs. In the 10 Token Pack, you will get: 8 Bronze Tokens, 9 Silver Tokens, and 13 Gold Tokens. Also, your Gold Tokens will have a 10% chance of being a special Platinum Token.
The 30 Token Pack is best used when you need more Tokens to reset your Champions or to craft something.
** There are NO Runes in this pack! You can also receive Reset Tokens by purchasing Rune Booster Packs.**",
"boxSet" : "This is an expansion pack box. This box contains 10 expansions packs from the selected expansion. The runes you receive in each of the 10 packs will be broken down by rarity. In each expansion pack, you will get: 6 common runes, 3 uncommon runes, and 1 rare rune. Also, your rare rune will have a 10% chance of being a special exotic rune. In the 10 pack box, you are guaranteed to get one exotic rune. Each rune will be of a certain type: Spell, Equipment, Relic, or Champion. Expansion packs are best used to fill your rune collection.
**If you don't have any purchased runes, it is recommended that you start with a pre-configured battlegroup.**",
"doomBundlePack" : "This is a Limited Edition Doombringers bundle box. This box contains 1 Limited Edition Doombringer, from a random faction, along with 3 Expansion Packs from the Rise of Serkan expansion.
The runes you receive in each of the 10 packs will be broken down by rarity. In each expansion pack, you will get: 6 Common runes, 3 Uncommon runes, and 1 Rare rune. Also, your Rare rune will have a 10% chance of being a special Exotic rune.
Each rune will be of a certain type: Spell, Equipment, Relic, or Champion. This Limited Edition Bundle is best used to fill your rune collection.
**If you don't have any purchased runes, it is recommended that you start with a pre-configured battlegroup.**",
"genconPack" : "This is a Limited Edition Gen-Con/Anniversary Rune Pack. In this Pack, you will receive four (4) Limited Edition Runes from Pox Nora's greatest expansions! This pack is free to all members of Pox Nora, including newcomers and veterans alike! Just click on the "Add to Cart" button to receive your free Gen-Con/Anniversary Rune Pack.
It's our little way of saying: "Thanks for visiting us at Gen-Con Indy and playing Pox Nora!"
In this pack, you will receive Limited Edition versions of:
Executioner (Forsaken Wastes)
Hippo Rider (Forglar Swamp)
Vengeful Cyclops (Shattered Peaks)
Skeezick Torch (Sundered Lands)
** These Runes are Non-Tradable **",
"avatar_token" : "This is an Avatar Token Pack. Avatar Tokens are used to level up your avatar to next level. This pack contains 3 Avatar Tokens.
",
"midTermPack" : "This is the Winter's Breath holiday bundle. This bundle contains 2 Champion token packs, an Avatar Level token, and 1 random Limited Edition or Legendary rune! Each token pack contains 3 bronze, 3 silver, and 4 gold tokens. Each gold token has a 10% chance of becoming a platinum token. Avatar Leveling tokens are used to level up your Avatar immediately to the next level. As a bonus you will receive 1 Limited Edition or Legendary rune for free!
"
};
}