////////////////////////////////////////////////////////////////////////ãàëåðåÿ


///////////////////////////////////////////////////////////////////////////////
function enlarge(which,e,Xsize){
	if (document.all){
		if (showimage.style.visibility=="hidden" || showimage.style.visibility==""){
			showimage.style.left=document.body.scrollLeft+event.clientX-Xsize+100;
			showimage.style.top=document.body.scrollTop+50
			showimage.innerHTML='<div align="right" style="width:'+Xsize+'px; background-color:#ffc0c0;"><span style="font-size:10px; color:#773300;">Âû ìîæåòå ïåðåìåùàòü èçîáðàæåíèå  &nbsp; </span><a href=# onClick="return enlarge(\'\',event)" style="background-color:#f00; color:#ffffee; text-decoration:none; margin-right:0px;"><b>&nbsp;ÇÀÊÐÛÒÜ </b></a></div><img src="'+which+'" style="border-top:1px solid  #a22;">'
			showimage.style.visibility="visible"
		}else showimage.style.visibility="hidden"
		return false}
	
	else if (document.layers){
		if (document.showimage.visibility=="hide"){
			document.showimage.document.write('<a href=# onClick="return enlarge(\'\',event)" style="font-family:verdana, tahoma, arial; font-size:12px;background-color:#ff0000;color:#ffffee;text-decoration:none;"><b>&nbsp;ÇÀÊÐÛÒÜ </b></a><span style="font-size:11px; font-family:verdana, tahoma, arial; color:#773300; background-color:#990000;">&nbsp; Âû ìîæåòå ïåðåìåùàòü èçîáðàæåíèå</span><a href="#" onMouseover="drag_dropns(showimage)"><br><img src="'+which+'" style="border-top:1px solid  #a22;"></a>')
			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}
	else
		return true}
//////////////////////////////////////////////////////////////////////////////
var nsx
var nsy
var nstemp
function drag_dropns(name){
	temp=eval(name)
	temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
	temp.onmousedown=gons
	temp.onmousemove=dragns
	temp.onmouseup=stopns
	}
function gons(e){
	temp.captureEvents(Event.MOUSEMOVE)
	nsx=e.x
	nsy=e.y
	}
function dragns(e){
	temp.moveBy(e.x-nsx,e.y-nsy)
	return false
	}
function stopns(){
	temp.releaseEvents(Event.MOUSEMOVE)
	}
//drag drop function for IE 4+////
var dragapproved=false
function drag_dropie(){
	if (dragapproved==true){
		document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
		document.all.showimage.style.pixelTop=tempy+event.clientY-iey
		return false 
		}
	}
function initializedragie(){
	if (event.srcElement.parentElement.id=="showimage"){
		iex=event.clientX
		iey=event.clientY
		tempx=showimage.style.pixelLeft
		tempy=showimage.style.pixelTop
		dragapproved=true
		document.onmousemove=drag_dropie
		}
	}
if (document.all){
document.onmousedown=initializedragie
document.onmouseup=new Function("dragapproved=false")}
/////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////êîíåö ãàëåðåè



