var1="i/warrior_01.jpg";
var2="i/warrior_02.jpg";
var3="i/warrior_03.jpg";
var4="i/warrior_04.jpg";
var5="i/warrior_05.jpg";
var6="i/warrior_06b.jpg";
var7="i/warrior_07.jpg";
var8="i/warrior_08.jpg";
var9="i/warrior_09.jpg";
var10="i/warrior_10.jpg";
var11="i/warrior_11.jpg";
var12="i/warrior_12.jpg";
var13="i/warrior_13.jpg";
var14="i/warrior_14.jpg";
var15="i/warrior_15.jpg";

now=new Date();
num=(now.getSeconds() )%15;
num=num+1;
/*
Changes to the above script, by Tellos Athenaios:
1) Removed the 'quot';
2) Added semi-colons where applicable:
3) Re-structured the last statement (to make it more read-able)

Changes below, script by Tellos Athenaios:

Positioning Hack:

1) Function which gets the offsets of an element
2) Call to the function on an element which has the desired offset
3) Give the target the desired offset.
*/
function getPosition(e){
	var left = 0;
	var top  = 0;
	
	while (e.offsetParent){
		left += e.offsetLeft;
		top  += e.offsetTop;
		e     = e.offsetParent;
	}

	left += e.offsetLeft;
	top  += e.offsetTop;
	
	return {x:left, y:top};
}
window.onload=function (e) {

var desirable=document.getElementById('rand_desire_hack');
var target=document.getElementById('rand_war_hack');
var offSet=getPosition(desirable);
var offX=6+offSet.x+"px";
var css=target.style;
css ? css.left=offX : target.style={position:"absolute",left:offX};
var pic=document.createElement("img");
pic.setAttribute('src',eval("var"+num));
pic.setAttribute('border','0');
pic.setAttribute('width','168');
pic.setAttribute('height','259');
pic.setAttribute('alt','Random warrior');
target.appendChild(pic);
}
