function gotoAchievement(achievement){
document.location.href = '/achievement/'+achievement;
}
function gotoArea(area){
document.location.href = '/area/'+area;
}
function gotoFaction(faction){
document.location.href = '/faction/'+faction;
}
function gotoItem(item){
document.location.href = '/item/'+item;
}
function gotoNPC(npc){
document.location.href = '/npc/'+npc;
}
function gotoObject(object){
document.location.href = '/object/'+object;
}
function gotoQuest(quest){
document.location.href = '/quest/'+quest;
}
function gotoSpell(spell){
document.location.href = '/spell/'+spell;
}
function gotoCharacterUS(character){
document.location.href = '/character-US/'+character;
}
function gotoGuildUS(guild){
document.location.href = '/guild-US/'+guild;
}
function gotoURL(url){
	document.location.href = url;
}

function changeZoom( mapname, mapnum){
    var el = document.getElementById('map'+mapnum );
    if( el.style.width != '750px' ){
        el.style.width = '750px';
        el.style.background = 'url(http://images.somepage.com/wow/maps/75/'+mapname+'.jpg)';
        el.style.height = '502px';
    } else {
	el.style.width = '500px';
        el.style.background = 'url(http://images.somepage.com/wow/maps/50/'+mapname+'.jpg)';
        el.style.height = '335px';

    }

}

function getSelectInfo(selectObj){
if( selectObj == null ){ return; }
formObj = document.getElementById(selectObj);
var optsArray = formObj.options;
var selectedArray = new Array();
var val = 0;
// store selected options in an Array
	for( var i=0,j=0; i< optsArray.length; i++ ){
		if( optsArray[i].selected ){
			val += parseInt(optsArray[i].value);
			j++;
		}
}
return val;
}

function reloadOnSuccess(){
   if (request.readyState == 4) {
		 window.location.reload(true);
	 }
}


