﻿
	window.onload = rolloverInit ;
	
	function rolloverInit() {

 
		for ( var i=0; i<document.images.length; i++) {
			if (document.images[i].parentNode.tagName =="A") {
				setupRollover(document.images[i]);
			}
		}
//		for ( var i=0; i<document.images.length; i++) {
//			if (document.images[i].parentNode.tagName =="A") {
//				showimage(document.images[i]);
//
//			}
//		}

	}
	
	function setupRollover(thisImage) {
		thisImage.outImage = new Image() ;
		thisImage.outImage.src = thisImage.src ;
		thisImage.onmouseout = rollOut ;
		
		thisImage.overImage = new Image() ;
		thisImage.overImage.src = "images/" + thisImage.id + "_c.jpg" ;
		thisImage.onmouseover= rollOver ;
		
	}
	
	function rollOver() {
		this.src = this.overImage.src ;
		document.getElementById(this.id + "_l").style.visibility = "hidden" ;
	}
	
	function rollOut() {
		this.src = this.outImage.src ;
		document.getElementById( this.id + "_l").style.visibility = "visible" ;
	}
	
	function showimage(thisImage) {
//alert(thisImage.id)  ;
//		thisImage.overImage = new Image() ;
//		thisImage.overImage.src = "images/" + thisImage.id + "_c.jpg" ;

//		this.src = this.overImage.src ;
		document.getElementById(thisImage.id + "_l").style.visibility = "visible" ;
//					pausecomp(1000) ;
//		document.getElementById(thisImage.id + "_l").style.visibility = "hidden" ;

	}
	

function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
} 
