function doPreload()
{
   var the_images = new Array('http://metalmagic.com/images/nav_01_o.gif','http://metalmagic.com/images/nav_02_o.gif','http://metalmagic.com/images/nav_03_o.gif','http://metalmagic.com/images/nav_04_o.gif','http://metalmagic.com/images/nav_05_o.gif','http://metalmagic.com/images/nav_06_o.gif','http://metalmagic.com/images/nav_07_o.gif','http://metalmagic.com/images/nav_08_o.gif');
   preloadImages(the_images);
}

function preloadImages(the_images_array) {

   for(var loop = 0; loop < the_images_array.length; loop++)
   {
 	var an_image = new Image();
	an_image.src = the_images_array[loop];
   }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function runFlash(file, width, height)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="home" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="flash/' + file + '" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="bgcolor" value="#ffffff" />\n');
	document.write('<embed src="flash/' + file + '" quality="high" wmode="transparent" width="' + width + '" height="' + height + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}

// begin clocks scripts

<!-- hide from old browsers
function jsClockChi(){
  // Copyright 1999 - 2001 by Ray Stott
  // OK to use if this copyright is included
  // Script available at http://www.crays.com/jsc
  var TimezoneOffset = -5  // adjust for time zone
  var localTime = new Date()
  var ms = localTime.getTime() 
             + (localTime.getTimezoneOffset() * 60000)
             + TimezoneOffset * 3600000
  var time =  new Date(ms) 
  var hour = time.getHours() 
  var minute = time.getMinutes()
  var second = time.getSeconds()
  var temp = "" + ((hour > 12) ? hour - 12 : hour)
  if(hour==0) temp = "12"
  if(temp.length==1) temp = " " + temp
  temp += ((minute < 10) ? ":0" : ":") + minute
  temp += ((second < 10) ? ":0" : ":") + second
  temp += (hour >= 12) ? " pm" : " am"
  document.clockFormChi.digits.value = temp
  setTimeout("jsClockChi()",1000)
  }
//-->

<!-- hide from old browsers
function jsClockPhx(){
  // Copyright 1999 - 2001 by Ray Stott
  // OK to use if this copyright is included
  // Script available at http://www.crays.com/jsc
  var TimezoneOffset = -7  // adjust for time zone
  var localTime = new Date()
  var ms = localTime.getTime() 
             + (localTime.getTimezoneOffset() * 60000)
             + TimezoneOffset * 3600000
  var time =  new Date(ms) 
  var hour = time.getHours() 
  var minute = time.getMinutes()
  var second = time.getSeconds()
  var temp = "" + ((hour > 12) ? hour - 12 : hour)
  if(hour==0) temp = "12"
  if(temp.length==1) temp = " " + temp
  temp += ((minute < 10) ? ":0" : ":") + minute
  temp += ((second < 10) ? ":0" : ":") + second
  temp += (hour >= 12) ? " pm" : " am"
  document.clockFormPhx.digits.value = temp
  setTimeout("jsClockPhx()",1000)
  }
//-->

// OLD clock script below 
function phxtime() {
  now=new Date();
  hour=now.getHours();
  min=now.getMinutes();
  sec=now.getSeconds();

if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }
if (hour>12) { hour=hour-12; add="pm"; }
else { hour=hour; add="am"; }
if (hour==12) { add="pm"; }

time = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;

if (document.getElementById) { phxTime.innerHTML = time; }
else if (document.layers) {
 document.layers.theTime.document.write(time);
 document.layers.theTime.document.close(); }

setTimeout("phxtime()", 1000);
}
window.onload = phxtime;

function chitime() {
  now=new Date();
  hour=now.getHours();
  min=now.getMinutes();
  sec=now.getSeconds();

if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }

//adjust minus 11  below for timezone offset
if (hour>12) { hour=hour-11; add="pm"; }

//adjust plus one below for timezone offset
else { hour=hour+1; add="am"; }

if (hour==12) { add="pm"; }

time = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;

if (document.getElementById) { chiTime.innerHTML = time; }
else if (document.layers) {
 document.layers.theTime.document.write(time);
 document.layers.theTime.document.close(); }

setTimeout("chitime()", 1000);
}
window.onload = chitime;

// end clocks scripts -->

/* ******* OLD clock functions DO NOT USE EXCEPT AS BACKUP ********* */

<!-- hide from old browsers
function jsClockTimeZone(){
  // Copyright 1999 - 2001 by Ray Stott
  // OK to use if this copyright is included
  // Script available at http://www.crays.com/jsc
  var TimezoneOffset = -6  // adjust for time zone
  var localTime = new Date()
  var ms = localTime.getTime() 
             + (localTime.getTimezoneOffset() * 60000)
             + TimezoneOffset * 3600000
  var time =  new Date(ms) 
  var hour = time.getHours() 
  var minute = time.getMinutes()
  var second = time.getSeconds()
  var temp = "" + ((hour > 12) ? hour - 12 : hour)
  if(hour==0) temp = "12"
  if(temp.length==1) temp = " " + temp
  temp += ((minute < 10) ? ":0" : ":") + minute
  temp += ((second < 10) ? ":0" : ":") + second
  temp += (hour >= 12) ? " p.m." : " a.m."
  document.clockFormTimeZone.digits.value = temp
  setTimeout("jsClockTimeZone()",1000)
  }
//-->
<!-- hide from old browsers
function jsClockTimeZone2(){
  // Copyright 1999 - 2001 by Ray Stott
  // OK to use if this copyright is included
  // Script available at http://www.crays.com/jsc
  var TimezoneOffset = -7  // adjust for time zone
  var localTime = new Date()
  var ms = localTime.getTime() 
             + (localTime.getTimezoneOffset() * 60000)
             + TimezoneOffset * 3600000
  var time =  new Date(ms) 
  var hour = time.getHours() 
  var minute = time.getMinutes()
  var second = time.getSeconds()
  var temp = "" + ((hour > 12) ? hour - 12 : hour)
  if(hour==0) temp = "12"
  if(temp.length==1) temp = " " + temp
  temp += ((minute < 10) ? ":0" : ":") + minute
  temp += ((second < 10) ? ":0" : ":") + second
  temp += (hour >= 12) ? " p.m." : " a.m."
  document.clockFormTimeZone2.digits.value = temp
  setTimeout("jsClockTimeZone2()",1000)
  }
//-->

/* random images function */

function random_imglink(){
	var myimages=new Array()
	//specify random images below. You can have as many as you wish
	myimages[1]="../images/img_home.jpg"
	myimages[2]="../images/img_home1.jpg"
	myimages[3]="../images/img_home2.jpg"
	myimages[4]="../images/img_home4.jpg"
	var ry=Math.floor(Math.random()*myimages.length)
	if (ry==0)
	ry=1
    document.write('<img src="../images/'+myimages[ry]+'" border=0>')
	}

	//-->
	
