zoomLine=[];zoomName=[];
zoomLineIndex=0;
function show(object) {
	if (document.layers && document.layers[object])
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hide(object) {
    if (document.layers && document.layers[object])
        document.layers[object].visibility = 'hidden';
    else if (document.all)
        document.all[object].style.visibility = 'hidden';
}
function showBG(img,txt) {
	i=0;
	while (_d.all.tags('select')(i)) _d.all.tags('select')(i++).style.display='none';
	bgImg.style.width=document.body.clientWidth;
	bgImg.style.height=document.body.scrollHeight;
	zoomRules.style.display='none';
	show('bgImg');
	show('zoomImg');
	zoomTxt.innerHTML=(txt==''||!txt)?'&nbsp;':txt;
	zooImg.src='';
	zooImg.src=img;
	return false;
}
function hideBG() {
	hide('zoomImg');
	hide('bgImg');
	i=0;
	while (_d.all.tags('select')(i)) _d.all.tags('select')(i++).style.display='';
	return false;
}
function zoomCenter() {
	db=document.documentElement;
	if (zooImg.height>db.clientHeight-100) zooImg.height=db.clientHeight-100;
	if (zooImg.width>db.clientWidth-100) zooImg.width=db.clientWidth-100;
	zoomImg.style.left=db.scrollLeft+(db.clientWidth-zoomImg.clientWidth)/2;
	zoomImg.style.top=db.scrollTop+(db.clientHeight-zoomImg.clientHeight)/2;

	if (zoomLine.length>1) {
		srcName=zooImg.src.split("/");
		srcName=srcName[srcName.length-1].toLowerCase();
		for (i=0;i<zoomLine.length;i++) {
			tmpName=zoomLine[i].split("/");
			tmpName=tmpName[tmpName.length-1].toLowerCase();
			if (srcName==tmpName) zoomLineIndex=i;
		}
		zoomRules.style.display='';
		zoomCount.innerHTML=(zoomLineIndex+1)+'/'+zoomLine.length;
	}
}
function zoomPrev ()
{
	zoomLineIndex--;
	if (zoomLineIndex<0) zoomLineIndex=zoomLine.length-1;
	showBG (zoomLine[zoomLineIndex],zoomName[zoomLineIndex]);
	return false;
}
function zoomNext ()
{
	zoomLineIndex++;
	if (zoomLineIndex==zoomLine.length) zoomLineIndex=0;
	showBG (zoomLine[zoomLineIndex],zoomName[zoomLineIndex]);
	return false;
}

