//This and others free scripts you can find on a site: artdhtml.com
ns4=(navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? 1 : 0;
ie4=(document.all && !document.getElementById)? 1 : 0;
ie5=(document.getElementById && document.all)? 1 : 0;
ns6=(document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? 1: 0;
w3c=(document.getElementById)? 1 : 0;

imgPrArr=new Array()

function imgPreload(imgP){
	imgPrArrT=(imgP+",").split(",");
	for (i in imgPrArrT){
		if (imgPrArrT[i]!=""){ 
			imgPrArr[imgPrArrT[i]]=new Image();
			imgPrArr[imgPrArrT[i]].src=imgPrArrT[i]
		}
	}
}

function move_div(x,y){
	if (isNaN(x+y)) return
	if(ns4){
		div1.moveTo(x,y)
	}
	else{
		div1.style.left=x+'px';
		div1.style.top=y+'px';
	}
	if(ondiv!=0) {
		tX=window.setTimeout('move_div(x,y)',100)
	}
}

function write_div(text){
	if(ns4){
		div1.document.visibility="show";
		div1.document.open();
		div1.document.write(text);
		div1.document.close();
	}
	else {
		div1.style.visibility="visible";
		div1.innerHTML=text;
	}
}
 
function big(n,nfo){
	n='/thumb.php?gallery=catalogues&image='+n+'&width=240&height=240'
	ondiv=n
	write_div("<a href=javascript:void(0) onmouseout='big_hide()' onmouseover='ondiv=1'><img border=0 name=ib src='"+n+"'></a><br />"+nfo);
	move_div(x,y)
}

function big_hide(){
	write_div("");
	if(ns4){
		div1.document.visibility="hide"; //"show"
	}
	else {
		div1.style.visibility="hidden"; //"visible"
	}
	ondiv=0;
	move_div(-1000,-1000)
}

function dragIt(evt){
	if(ie4||ie5){
		x=window.event.clientX+document.body.scrollLeft+10;
		y=window.event.clientY+document.body.scrollTop+10;
	}
	else {
		x=evt.pageX+10;
		y=evt.pageY+10;
	}
}

function showme(nfo){
	big_hide();
	if(ns4){
		divmail.document.visibility="show"; //"show"
	}
	else {
		divmail.style.visibility="visible"; //"visible"
	}
}

function hideme(){
	if(ns4){
		divmail.document.open();
		divmail.document.write('');
		divmail.document.close();
		divmail.document.visibility="hide"; //"show"
	}
	else {
		divmail.innerHTML='';
		divmail.style.visibility="hidden"; //"visible"
	}
}
