
<script language="JavaScript" type="text/javascript">
<!--
// Missing Image (06-02-2005)
// by Vic Phillips http://www.vicsJavaScripts.org.uk

// Application Notes
// The script variable 'miReserveImage' specifies the 'reserve' image.
// To re-size the missing image to 0px, the variable 'miReserveImage' value is set to 'none'.
// To use this option all images must have a 'width' and 'height' attributes.
// The script would normally be initialised by a <body> onload event call:
// <body onload="mirImageCheck('*ImageArea*');" >
// where:
// *ImageArea* = not required if all the page images are to be evaluated (string).
//               If the images to be evaluated are restricted,
//               the required images are positioned within a tag (eg <center>)
//               and the tag 'id' name entered as *ImageArea*.

// All variable, function etc names are prefixed with 'mir'
// to minimise conflicts with other JavaScripts

// Tested with IE6 & Mozilla FF

// Customising Variables
var mirReserveImage='NoCover.jpg';

// Functional Code
// No Need to Change
var mirSRCAry=new Array();
var mirImgAry=new Array();
var mirWAry=new Array();
var mirHAry=new Array();
var mirImgs;

function mirImageCheck(mir){
 mirSRCAry=new Array();
 mirImgAry=new Array();
 mirWAry=new Array();
 mirHAry=new Array();
 if (mir==null){
  mirImgs=document.getElementsByTagName('IMG');
 }
 else {
  mirImgs=document.getElementById(mir).getElementsByTagName('IMG');
 }
 for (mir0=0;mir0<mirImgs.length;mir0++){
  mirImgAry[mir0]=mirImgs[mir0].src+'';
  mirWAry[mir0]=mirImgs[mir0].offsetWidth;
  mirHAry[mir0]=mirImgs[mir0].offsetHeight;
  if (mirReserveImage.toLowerCase()=='none'){
   mirImgs[mir0].width='0';
   mirImgs[mir0].height='0';
  }
  else {
   mirImgs[mir0].src=mirReserveImage;
  }
 }
 for (mir1=0;mir1<mirImgs.length;mir1++){
  mirSRCAry[mir1]=new Image();
  mirSRCAry[mir1].obj=mirImgs[mir1];
  mirSRCAry[mir1].image=mirImgAry[mir1];
  mirSRCAry[mir1].w=mirWAry[mir1];
  mirSRCAry[mir1].h=mirHAry[mir1];
  mirSRCAry[mir1].onload=function(){
                          this.obj.src=this.image;
                          this.obj.width=this.w;
                          this.obj.height=this.h;
                         }
  mirSRCAry[mir1].src=mirImgAry[mir1];
 }
}

//-->
</script>


