Note that it is best calling function LoadImages() from a BODY or window onload event so that your page loads before loading the images.
but you can put the within the body tags so long as is is just before the </BODY> tag.
however convertion says it should be within the header
for interest
Code:
<head>
<script language = javascript>
function LoadImages(){
var Path='http://www.froso.dk/images/';
var ImgAry = [];
ImgAry[0]= "logo.gif";
ImgAry[1]="thumbnail_bottom.gif";
ImgAry[2]="thumbnail_center.gif";
ImgAry[3]="thumbnail_top.gif";
ImgAry[4]="bg_tile.gif";
ImgAry[5]="bg_top.gif";
ImgAry[6]="breadcrumb.gif";
ImgAry[7]="button_clearall_off.gif";
ImgAry[8]="button_clearall_on.gif";
ImgAry[9]="button_decrease_off.gif";
ImgAry[10]="button_decrease_on.gif";
ImgAry[11]="button_increase_off.gif";
ImgAry[12]="button_increase_on.gif";
ImgAry[13]="button_off.gif";
ImgAry[14]="button_off2.gif";
ImgAry[15]="button_on.gif";
ImgAry[16]="button_on2.gif";
ImgAry[17]="button_print_off.gif";
ImgAry[18]="button_print_on.gif";
ImgAry[19]="button_send_off.gif";
ImgAry[20]="button_send_on.gif";
ImgAry[21]="button_share_off.gif";
ImgAry[22]="button_share_on.gif";
ImgAry[23]="button_submenu_off.gif";
ImgAry[24]="button_submenu_on.gif";
ImgAry[25]="button_submit_off.gif";
ImgAry[26]="button_submit_on.gif";
var URLAry=[];
for (var z0=0;z0<ImgAry.length;z0++){
URLAry[z0]=new Image();
URLAry[z0].src=Path+ImgAry[z0]
}
}
// this is a reasonably good way to add events
function zxcEventAdd(o,f,e,p) {
if ( o.addEventListener ){ o.addEventListener(e,function(ev){ return o[f](ev,p);}, false); }
else if ( o.attachEvent ){ o.attachEvent('on'+e,function(ev){ return o[f](ev,p); }); }
else {
var prev=o['on'+e];
if (prev){ o['on'+e]=function(ev){ prev(ev); o[f](ev,p); }; }
else { o['on'+e]=o[f]; }
}
}
function zxcAddEvt(obj,fun,ev,p){
if (obj['zxc'+fun+ev]) return;
obj['zxc'+fun+ev]=window[fun];
zxcEventAdd(obj,'zxc'+fun+ev,ev,p);
}
zxcAddEvt(window,'LoadImages','load');
// where;
// parameter 0 = the object to add the event. (object)
// parameter 1 = the function to be called. (string)
// parameter 2 = the event type. (string, not including 'on')
// parameter 3 = (optional) the second argument passed to the function. (string, not including 'on')
// note that the first agument will be the event, and within the event 'this' will be the object calling the function
</script>
</head>
Bookmarks