/*
Thumbnail image viewer- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

// This Spell Modified by the Merlin of Britain in 660 a.C.

//function rabanete(){ //fecha imagem para IE
// alterado por maicon gabriel schmitz
function fecharlayer(){ //fecha imagem para IE
showimage.style.visibility="hidden"
document.onmousemove = mouseMove
}

function cenoura(){ //fecha imagem para NS
document.showimage.visibility="hide"
document.onmousemove = mouseMove
}

function enlarge(which,e){
//Render image code for IE 4+
if (document.all){
if (showimage.style.visibility=="hidden"){
//showimage.style.left=document.body.scrollLeft+event.clientX
//showimage.style.top=document.body.scrollTop+event.clientY
// alterado por maicon gabriel schmitz
showimage.style.left=document.body.scrollLeft+500
showimage.style.top=document.body.scrollTop+80
//showimage.innerHTML='<map name="closemap"><area alt="close" coords="5,5,17,17" href="javascript:rabanete();"></map><img src="/imagens/fechar.gif" width="84" height="23" border="0" usemap="#closemap" alt="drag" valign="top"><br><div style="z-index: 98; position: absolute;"><img src="/imagens/carregando.gif" border="0" alt=""></div><div style="z-index: 99; position: absolute;"><img src="'+which+'" onDblClick="rabanete(); return true;" alt=""></div>'
// alterado por maicon gabriel schmitz
showimage.innerHTML='<map name="closemap"><area alt="fechar" coords="5,5,17,17" href="javascript:fecharlayer();"></map><img src="/imagens/fechar.gif" width="84" height="23" border="0" usemap="#closemap" alt="drag" valign="top"><br><div style="z-index: 98; position: absolute;"><img src="/imagens/carregando.gif" border="0" alt=""></div><div style="z-index: 99; position: absolute;"><img src="'+which+'" onDblClick="fecharlayer(); return true;" alt=""></div>'
showimage.style.visibility="visible"
}
else
showimage.style.visibility="hidden"
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<img src="'+which+'" border=0 align="top">')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.visibility="show"
}
else
document.showimage.visibility="hide"
return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true
}
