//JavaScript function library for Divinity Designs site

// Navigation mouse over functionality


function domouse(where,which,what){

  if(where == 1)
   {
   fname = what;
   }
  else
   {
   fname = what;
   }
   document.images[which].src = fname;
 }


function preloadImages() {

  var d=document; 
  
  if(d.images)
  { 
  if(!d.MM_p) d.MM_p=new Array();
  
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
  
  for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0)
    {
    d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
    }
  }
}

//usage: <a href="#" onmouseover="domouse(1,'clothing3','clothing4.jpg')" onmouseout="domouse(0,'clothing3','clothing4.jpg')">


//Pop up window functionality

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//usage: <a href="popup10a.html" onclick="NewWindow(this.href,'name','350','300','yes');return false;">blah blah blah</a>

//Whereas popup10a.html is the filename of the window popping up and 350 & 300 are the dimensions of the window.
