A ver esta variante si te sirve
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> /*<![CDATA[*/
#div1{
width: 500px;
height: 500px;
background: red;
}
#div2{
width: 300px;
height: 300px;
background: green;
}
/*]]>*/
<script type="text/javascript"> //<![CDATA[
var estado = 0;
function funcion(){
if(estado == 0){
window.location.href ='http://emprear.com';
}
}
//]]>
<div id="div1" onclick="funcion();"> <div id="div2" onmouseover="estado =1;" onmouseout="estado = 0;"> Div2
Saludos