<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Switch backgrounds on mouseover</title>
<style type="text/css">
.projectbox {
margin-right: 15px;
float: left;
}
.imgbox {
width: 265px;
height: 100px;
display: block;
}
.imgbox a.img1_off {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt5.jpg) no-repeat;
}
.imgbox a.img1_on {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt6.jpg) no-repeat;
}
.imgbox a.img2_off {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt7.jpg) no-repeat;
}
.imgbox a.img2_on {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt8.jpg) no-repeat;
}
.imgbox a.img3_off {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt9.jpg) no-repeat;
}
.imgbox a.img3_on {
background: url(http://www.vicsjavascripts.org.uk/StdImages/Egypt11.jpg) no-repeat;
}
.titlebox h1 {
font: 11px/10px Arial, Helvetica, sans-serif;
text-transform: uppercase;
float: left;
margin-right: 3px;
}
.titlebox h1 a {
display: block;
background: #ccc;
color: #fff;
text-decoration: none;
padding: 2px 3px;
}
.titlebox h1 a.title_off {
background: #ccc;
}
.titlebox h1 a.title_on {
background: #000;
}
</style>
<script type="text/javascript">
function Swap(obj,imgcls,titlecls){
var as=obj.getElementsByTagName('A');
as[0].className=imgcls;
as[1].className=titlecls;
}
</script>
</head>
<body>
<div class="projectbox" onmouseover="Swap(this,'img1_on imgbox','title_on');" onmouseout="Swap(this,'img1_off imgbox','title_off');">
<div class="imgbox">
<a href="#" class="img1_off imgbox" title="Bekijk die toffe ****"
></a>
</div>
<div class="titlebox">
<h1><a href="#" class="title_off"
>Title project 1</a></h1>
</div>
</div>
<div class="projectbox"onmouseover="Swap(this,'img2_on imgbox','title_on');" onmouseout="Swap(this,'img2_off imgbox','title_off');">
<div class="imgbox">
<a href="#" class="img2_off imgbox" title="Bekijk die toffe ****"
></a>
</div>
<div class="titlebox">
<h1><a href="#" id="projecttitle2" class="title_off"
>Title project 2</a></h1>
</div>
</div>
<div class="projectbox"onmouseover="Swap(this,'img3_on imgbox','title_on');" onmouseout="Swap(this,'img3_off imgbox','title_off');">
<div class="imgbox">
<a href="#" class="img3_off imgbox" title="Bekijk die toffe ****"
></a>
</div>
<div class="titlebox">
<h1><a href="#" class="title_off"
>Title project 3</a></h1>
</div>
</div>
</body>
</html>