// JavaScript Document

// We start with the Dreamweaver  MM_findObj function.  If you have this already, that's nice.
 
//Repetition won't hurt, but not having this function will kill you.
 
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;
}
// This just makes  it a LOT easier, and uses Dreamweaver's function with class.   Double-entendre beware!
function changeClass( id, newClassName )  {
 obj = MM_findObj( id  );
 obj.className=newClassName;
}

selected=null;

function swapClasses( first, second ) {
 restoreSwap();
 obj1 = MM_findObj( first );
 tmp = obj1.className;
 obj2 = MM_findObj( second );
 obj1.className = obj2.className;
 obj2.className=tmp;
 obj1.swap = obj2;
 obj2.swap = obj1;
 selected = obj2;
}

function restoreSwap() {
 if (selected==null) return;
 obj1 = selected;
 selected = null;
 obj2 = obj1.swap;
 tmp = obj1.className;
 obj1.className = obj2.className;
 obj2.className=tmp;
}
// The end of the  Javascript
