
function changeImg(image,Link){
	document.getElementById("'mainImg'").src = image;
	document.getElementById("mainImg").src = image;
	LinkUrl = Link.getAttribute("href");
	document.getElementById("'mainImgLink'").href = LinkUrl;
	document.getElementById("mainImgLink").href = LinkUrl;
}

function hiddenImg(){
	for(i=0;i<3;i++){
		j = i+1;
		imageID = "mainImg"+ j;
		document.getElementById(imageID).style.display = "none";	
	}
	document.getElementById("mainImg1").style.display = "block";
}

function changeImg2(){
	document.getElementById("listBtn1").onmouseover = function(){
		for(k=0;k<3;k++){
			l = k+1;
			imageID2 = "mainImg" + l;
			document.getElementById(imageID2).style.display = "none";
		}	
		document.getElementById("mainImg1").style.display = "block";	
	}
	document.getElementById("listBtn2").onmouseover = function(){
		for(k=0;k<3;k++){
			l = k+1;
			imageID2 = "mainImg" + l;
			document.getElementById(imageID2).style.display = "none";
		}	
		document.getElementById("mainImg2").style.display = "block";	
	}
	document.getElementById("listBtn3").onmouseover = function(){
		for(k=0;k<3;k++){
			l = k+1;
			imageID2 = "mainImg" + l;
			document.getElementById(imageID2).style.display = "none";
		}	
		document.getElementById("mainImg3").style.display = "block";	
	}

}

if(window.addEventListener) {
	window.addEventListener("load", hiddenImg, false);
	window.addEventListener("load", changeImg2, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", hiddenImg);
	window.attachEvent("onload", changeImg2);
}




/*
window.onload = function(){
	
	var objImg = document.getElementById("mainImgList");
	for(i=0;i<objImg.childNodes.length;i++){
	
		objImg.childNodes.item(i).style.color = "#231005";
		
		objImg.childNodes.item(i).onmouseover = function(){
			if(this.style.color == "#231005" || this.style.color == "rgb(35, 16, 5)"){
				this.style.color = "#520F08";	
			}else{
				alert(this.style.color);
			}	
		}
		objImg.childNodes.item(i).onmouseout = function(){
			if(this.style.color == "#520F08" || this.style.color == "rgb(82, 15, 8)"){
				this.style.color = "#231005";	
			}	
		}
		
	}
}
*/
