function swap(button,name){if (document.images) document.images[button].src=eval(name+".src");}

function highlightButton(s) { if ("INPUT"==event.srcElement.tagName) event.srcElement.className=s }

function openWindow(url,w,h,l,t)
{ 
var focusok=false;
if (navigator.appName == "Netscape") focusok=true;

WinC='toolbar=no,resizable=no,top='+t+',left='+l+',directories=no,status=no,scrollbars=yes,menubar=no,width='+w+',height='+h; 
popupWin = window.open(url,'_blank',WinC); 
if (focusok) popupWin.focus();
return false;
}

function layerwrite(id,text,color)
{
 document.all[id].innerHTML='<span class="'+color+'">'+text+'</span>'
}

function CutSpace(string) 
{
 var temp = "";
 string = '' + string;
 splitstring = string.split(" ");
 for(i = 0; i < splitstring.length; i++) temp += splitstring[i];
 return temp;
}

function over_change(index,src,clrOver)
{
 if (!src.contains(event.fromElement)) 
 { 
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
 }
}

function out_change(index,src,clrIn)
{
 if (!src.contains(event.toElement))
 {
  src.style.cursor = 'default';
  if(index!=27)	src.bgColor = clrIn;
 }
}

function smallphoto(photo)
{
 width=photo.width;
 height=photo.height;
 if (width<=150 && height<=180) return;
 if (width/150<=height/180) 
 { photo.height=180;
   photo.width=width*(180/height); } 
 else 
 { photo.width=150;
   photo.height=height*(150/width); } 
}

function smallphoto1(photo)
{
 width=photo.width;
 height=photo.height;
 if (width<=100 && height<=120) return;
 if (width/100<=height/120) 
 { photo.height=120;
   photo.width=width*(120/height); } 
 else 
 { photo.width=100;
   photo.height=height*(100/width); } 
}

function smallphoto2(photo)
{
 width=photo.width;
 height=photo.height;
 if (width<=300 && height<=300) return;
 if (width/300<=height/300) 
 { photo.height=300;
   photo.width=width*(300/height); } 
 else 
 { photo.width=300;
   photo.height=height*(300/width); } 
}
