/* top pix */
function topPixInit(){
allTopPix  = $('.topPix'); 
numTopPix  = allTopPix.length; 
for (i=0 ; i < numTopPix  ; i++) if (allTopPix[i].style.display=='' )  currTopPicNum = i+1;
changeTimer = window.setTimeout("changePicture()",2000); 
}

function changePicture(){
window.clearTimeout(changeTimer); 
nextImage = currTopPicNum+1;
if(nextImage > numTopPix ) nextImage=1;
/*new Effect.Fade('pictureNo' + currTopPicNum,   { duration:1.0 } )
new Effect.Appear('pictureNo' + nextImage,   { duration:1.0 } )*/
$('#pictureNo' + currTopPicNum).fadeOut("slow");
$('#pictureNo' + nextImage).fadeIn("slow");
currTopPicNum = nextImage;
changeTimer = window.setTimeout("changePicture()",5000);
} 
/* top pix */

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


//highlight divs on mouseover/out
function divColor(divName,newColor) {
document.getElementById(divName).style.background=newColor;   
}
