if (document.images) {
 about1 = new Image();
 about1.src = "images/aboutcourse.gif";
 about0 = new Image();
 about0.src = "images/aboutcourse1.gif";

 book1 = new Image();
 book1.src = "images/bookbutt1.gif";
 book0 = new Image();
 book0.src = "images/bookbutt.gif";

 out1 = new Image();
 out1.src = "images/menu/m1a.gif";
 ovr1 = new Image();
 ovr1.src = "images/menu/m1b.gif";

 out2 = new Image();
 out2.src = "images/menu/m2a.gif";
 ovr2 = new Image();
 ovr2.src = "images/menu/m2b.gif";

 out3 = new Image();
 out3.src = "images/menu/m3a.gif";
 ovr3 = new Image();
 ovr3.src = "images/menu/m3b.gif";

 out4 = new Image();
 out4.src = "images/menu/m4a.gif";
 ovr4 = new Image();
 ovr4.src = "images/menu/m4b.gif";

 out5 = new Image();
 out5.src = "images/menu/m5a.gif";
 ovr5 = new Image();
 ovr5.src = "images/menu/m5b.gif";

 out6 = new Image();
 out6.src = "images/menu/m6a.gif";
 ovr6 = new Image();
 ovr6.src = "images/menu/m6b.gif";

 out7 = new Image();
 out7.src = "images/menu/m7a.gif";
 ovr7 = new Image();
 ovr7.src = "images/menu/m7b.gif";

 out9 = new Image();
 out9.src = "images/menu/m9a.gif";
 ovr9 = new Image();
 ovr9.src = "images/menu/m9b.gif";

 out10 = new Image();
 out10.src = "images/menu/m10a.gif";
 ovr10 = new Image();
 ovr10.src = "images/menu/m10b.gif";

 out11 = new Image();
 out11.src = "images/menu/m11a.gif";
 ovr11 = new Image();
 ovr11.src = "images/menu/m11b.gif";

 out12 = new Image();
 out12.src = "images/menu/m12a.gif";
 ovr12 = new Image();
 ovr12.src = "images/menu/m12b.gif";
}

function imgOvr (inum) {
 if (document.images) {
  document["m"+inum].src = eval("ovr"+inum+".src");
 }
 if(inum==2) {
   showsub(1);
 }
 else {
   showsub(0);
 }
}

function imgOut (inum) {
 if (document.images) {
  document["m"+inum].src = eval("out"+inum+".src");
 }
}

function roll(ln,cn) {
 if (document.getElementById(ln)) {
   obj=document.getElementById(ln);
   obj.className=cn;
 }
}

function roll1(ln,cn) {
 roll(ln,cn);
 if( cn == 'menu1' || cn == 'menu2' ) {
   if( ln == 'm2' ) { 
    showsub(1); 
   } 
   else { 
    showsub(0); 
   }
 }
}

function chng (name,inum,chng) {
 if (document.images) {
  document["xmg"+inum].src = eval(name+chng+".src");
 }
}

function showsub(nm) {
  if (nm==1) { ss = 'show'; } else { ss = 'hide'; }
  MM_showHideLayers('submenu','',ss);
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function show(qz,nm,w,h,o) {
   mh = screen.availHeight - 60 ;
   mw = screen.availWidth - 40 ;
   h1 = h ;
   w1 = w ;
   if(h>mh) {
     h1 = mh ;
     w1 = Math.ceil(w * (mh / h)) ;
   }
   if(w>mw) {
     w1 = mw ;
     h1 = Math.ceil(h * (mw / w)) ;
   }
   if(o==1) {
      pshow = window.open("viewpic1.php?qz="+qz+"&nm="+nm+"&w="+w+"&h="+h , "picture", "toolbar=no,location=no,menubar=no,directories=no,status=no,scrollbars=yes,resizable=yes,width="+w1+",height="+h1+",left=10,top=10" );
   }
   else {
      pshow = window.open("viewpic0.php?qz="+qz+"&nm="+nm+"&w="+w1+"&h="+h1 , "picture", "toolbar=no,location=no,menubar=no,directories=no,status=no,scrollbars=no,resizable=yes,width="+w1+",height="+h1+",left=10,top=10" );
   }
   if ( ( typeof(pshow) != "object" ) || !pshow || pshow.closed ) {
    alert('You appear to have a popup blocker\r\nstopping this page from opening');
   }
   else {
    pshow.resizeTo(w1,(h1+60));
    pshow.window.focus();
   }
}
