// JavaScript Document
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function open_foto(id, width, height)
{

	width += 144;
	height += 144; 
	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;
if (screen.availHeight - 30 <= height) scr = 'scrollbars=1,'; else scr = 'scrollbars=0,';


      coin=window.open("","coin","width="+width+",height="+height+",toolbar=no,fullscreen=0,location=no,directories=no,status=yes,menubar=no,"+scr+"resizable=yes,left="+wx+",top="+wy);
      coin.document.writeln('<html><head><title>Дмитрий Шилихин - профессиональный фотограф: фотоуслуги в области художественной портретной и свадебной фотографии. Санкт-Петербург.</title></head><link rel="stylesheet" href="/dvsh/links.css" type="text/css"><BODY BGCOLOR="#000000" TEXT="#888888">');
      coin.document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">');
      coin.document.writeln('<tr><td align="center" valign="middle">');
      coin.document.writeln('<img src="/galery/'+id+'.jpg" border="0" bordercolor="#888888">');
      coin.document.writeln('</td></tr></table>');
      coin.document.write('</body></html>');
      coin.document.close();


}

function dvsh01()
{
var dvsh2="@"; 
dvsh2=dvsh2+"list.";
dvsh2="001"+dvsh2;
 dvsh2=dvsh2+"ru";
 dvsh2="dvsh2"+dvsh2;
 return dvsh2
};

function dvsh02()
{
return "?Subject=From www.shilikhin.ru"
};
 function dvsh05()
{
status="mailto:"+dvsh01()+dvsh02()
};
 function dvsh03()
{
status=""
};
 function dvsh04()
{
this.location="mailto:"+dvsh01()+dvsh02();
 return false
};



//-->




/*********************************************************************** 
* File    : JSFX_ImageFader.js  © JavaScript-FX.com
* Created : 2001/08/31 
* Author  : Roy Whittle  (Roy@Whittle.com) www.Roy.Whittle.com 
* Purpose : To create a fading effect for images
* History 
* Date         Version  Description 
* 2001-08-09	1.0	First version
* 2001-08-31	1.1	Code split - others became 
*					JSFX_FadingRollovers,
*                             JSFX_ImageFader,
*					JSFX_ImageZoom.
* 2002-01-27	1.2	Completed development by converting to JSFX namespace
* 2002-02-21	1.3	Added JSFX.fadeUpImg JSFX.fadeDownImg
* 2002-01-29	1.4	Make "fade" a seperate object of "img"
* 2002-03-12	1.5	Added an auto fade up/down for images 
*					with class imageFader
* 2002-08-29	1.6	Thanks to piglet (http://homepage.ntlworld.com/thepiglet/)
*				I now have a partial fix for NS7 and Mozilla 1.1.
***********************************************************************/ 
if(!window.JSFX)
	JSFX=new Object();

JSFX.FadeImageRunning    = false;
JSFX.FadeImageMinOpacity = 60;
JSFX.FadeImageAutoUp	 = 20;
JSFX.FadeImageAutoDown   = 5;
JSFX.FadeImageSavedOver  = null;
JSFX.FadeImageSavedOut   = null;
document.write('<STYLE TYPE="text/css">.imageFader{ position:relative; filter:alpha(opacity='+JSFX.FadeImageMinOpacity+'); -moz-opacity:'+JSFX.FadeImageMinOpacity/101+'}</STYLE>');
/*******************************************************************
*
* Function    : actionOnMouseOver
*
* Description : Called automatically whenever an element in the
*			document is "mousedOver". It checks to see if the
*			element has the className == "imageFader" and if so
*			starts fading up the element.
*
*****************************************************************/
JSFX.fadeImage_actionOnMouseOver = function(e)
{
	srcElement=e ? e.target : event.srcElement;
	
	if(srcElement.className && srcElement.className=="imageFader")
		JSFX.fadeUp(srcElement);

	/*** If the document already had an onMouseOver handler, call it ***/
	if(JSFX.FadeImageSavedOver != null)
		JSFX.FadeImageSavedOver(e);
}

/*******************************************************************
*
* Function    : actionOnMouseOut
*
* Description : Called automatically whenever an element in the
*			document is "mousedOut". It checks to see if the
*			element has the className == "imageFader" and if so
*			starts fading down the element.
*
*****************************************************************/
JSFX.fadeImage_actionOnMouseOut = function(e)
{
	srcElement=e ? e.target : event.srcElement;

	if(srcElement.className && srcElement.className=="imageFader")
		JSFX.fadeDown(srcElement);
	
	/*** If the document already had an onMouseOut handler, call it ***/
	if(JSFX.FadeImageSavedOut != null)
		JSFX.FadeImageSavedOut(e);
}
/*******************************************************************
*
* Function    :	fadeImageAuto
*
* Parameters  :	minOpacity	- Minimum opacity to fade down to.
*			stepUp	- fade up speed 	- larger = faster.
*			stepDown 	- fade down speed	- larger = faster.
*
* Description :	Saves the documents original mousOver/Out handlers
*			and installs the actionMouseOver/Out handlers
*			of JSFX.fadeImage
*
*****************************************************************/
JSFX.fadeImageAuto = function(minOpacity, stepUp, stepDown)
{
	if(minOpacity)
		JSFX.FadeImageMinOpacity = minOpacity;
	if(stepUp)
		JSFX.FadeImageAutoUp	= stepUp;
	if(stepDown)
		JSFX.FadeImageAutoDown	= stepDown;

	/*** Save the original document mouseOver/Out events ***/
	JSFX.FadeImageSavedOver = document.onmouseover;
	JSFX.FadeImageSavedOut  = document.onmouseout;

	document.onmouseover	= JSFX.fadeImage_actionOnMouseOver ;
	document.onmouseout	= JSFX.fadeImage_actionOnMouseOut ;
	JSFX.setMinOpacity(JSFX.FadeImageMinOpacity);
}
/*******************************************************************
*
* Function    : setMinOpacity
*
* Description : sets the minimum opacity for all fading images from
*			the default of 40 to the passed value.
*
*****************************************************************/
JSFX.setMinOpacity = function(minOpacity)
{
	if(document.layers) return;

	for(i=0 ; i<document.images.length ; i++)
	{
		var img = document.images[i];
		if(img.className=="imageFader")
		{
			if(img.filters)
				img.filters.alpha.opacity = JSFX.FadeImageMinOpacity;
			else
				img.style.MozOpacity = JSFX.FadeImageMinOpacity/101;
		}
	}
}
/*******************************************************************
*
* Function    : fadeUpImg
*
* Description : Finds the image in the document and calls JSFX.fadeUp
*
*****************************************************************/
JSFX.fadeUpImg = function(imgName, step)
{
	if(document.layers || window.opera)
		return;

	img = document.images[imgName];
	if(img)
		JSFX.fadeUp(img, step);
}
/*******************************************************************
*
* Function    : fadeUp
*
* Description : This function is based on the turn_on() function
*		      of animate2.js (animated rollovers from www.roy.whittle.com).
*		      Each fading image object is given a state. 
*			OnMouseOver the state is switched depending on the current state.
*			Current state -> Switch to
*			===========================
*			null		->	OFF.
*			OFF		->	FADE_UP
*			FADE_DOWN	->	FADE_UP
*			FADE_UP_DOWN->	FADE_UP
*****************************************************************/
JSFX.fadeUp = function(img, step)
{

	if(img)
	{
		if(!step) step=JSFX.FadeImageAutoUp;

		if(img.fade == null)
		{
			img.fade = new Object();
			img.fade.state	 = "OFF";
			img.fade.upStep	 = step;
			img.fade.downStep  = step;
			img.fade.minOpacity  = JSFX.FadeImageMinOpacity;
			img.fade.index = img.fade.minOpacity;
			
		}
		if(img.fade.state == "OFF")
		{
			img.fade.upStep  = step;
			img.fade.state = "FADE_UP";
			JSFX.startImageFading();
		}
		else if( img.fade.state == "FADE_UP_DOWN"
			|| img.fade.state == "FADE_DOWN")
		{
			img.fade.upStep  = step;
			img.fade.state = "FADE_UP";
		}
	}
}
/*******************************************************************
*
* Function    : fadeDownImg
*
* Description : Finds the image in the document and calls JSFX.fadeDown
*
*****************************************************************/
JSFX.fadeDownImg = function(imgName, step)
{
	if(document.layers || window.opera)
		return;

	img = document.images[imgName];
	if(img)
		JSFX.fadeDown(img, step);
}
/*******************************************************************
*
* Function    : fadeDown
*
* Description : This function is based on the turn_off function
*		      of animate2.js (animated rollovers from www.roy.whittle.com).
*		      Each zoom object is given a state. 
*			OnMouseOut the state is switched depending on the current state.
*			Current state -> Switch to
*			===========================
*			ON		->	FADE_DOWN.
*			FADE_UP	->	FADE_UP_DOWN.
*****************************************************************/
JSFX.fadeDown = function(img, step)
{
	if(img)
	{
		if(!step) step=JSFX.FadeImageAutoDown;

		if(img.fade.state=="ON")
		{
			img.fade.downStep  = step;
			img.fade.state="FADE_DOWN";
			JSFX.startImageFading();
		}
		else if(img.fade.state == "FADE_UP")
		{
			img.fade.downStep  = step;
			img.fade.state="FADE_UP_DOWN";
		}
	}
}
/*******************************************************************
*
* Function    : startImageFading
*
* Description : This function is based on the start_animating() function
*	        	of animate2.js (animated rollovers from www.roy.whittle.com).
*			If the timer is not currently running, it is started.
*			Only 1 timer is used for all objects
*****************************************************************/
JSFX.startImageFading = function()
{
	if(!JSFX.FadeImageRunning)
		JSFX.FadeImageAnimation();
}

/*******************************************************************
*
* Function    : FadeImageAnimation
*
* Description : This function is based on the Animate function
*		    of animate2.js (animated rollovers from www.roy.whittle.com).
*		    Each object has a state. This function
*		    modifies each object and (possibly) changes its state.
*****************************************************************/
JSFX.FadeImageAnimation = function()
{
	JSFX.FadeImageRunning = false;
	for(i=0 ; i<document.images.length ; i++)
	{
		var img = document.images[i];
		if(img.fade)
		{
			if(img.fade.state == "FADE_UP")
			{
				img.fade.index+=img.fade.upStep;
				if(img.fade.index > 100)
					img.fade.index = 100;

				if(img.filters)
					img.filters.alpha.opacity = img.fade.index;
				else
					img.style.MozOpacity = img.fade.index/101;

				if(img.fade.index == 100)
					img.fade.state="ON";
				else
					JSFX.FadeImageRunning = true;
			}
			else if(img.fade.state == "FADE_UP_DOWN")
			{
				img.fade.index+=img.fade.upStep;
				if(img.fade.index > 100)
					img.fade.index = 100;

				if(img.filters)
					img.filters.alpha.opacity = img.fade.index;
				else
					img.style.MozOpacity = img.fade.index/101;
	
				if(img.fade.index == 100)
					img.fade.state="FADE_DOWN";
				JSFX.FadeImageRunning = true;
			}
			else if(img.fade.state == "FADE_DOWN")
			{
				img.fade.index-=img.fade.downStep;
				if(img.fade.index < img.fade.minOpacity)
					img.fade.index = img.fade.minOpacity;

				if(img.filters)
					img.filters.alpha.opacity = img.fade.index;
				else
					img.style.MozOpacity = img.fade.index/101;

				if(img.fade.index == img.fade.minOpacity)
					img.fade.state="OFF";
				else
					JSFX.FadeImageRunning = true;
			}
		}
	}
	/*** Check to see if we need to animate any more frames. ***/
	if(JSFX.FadeImageRunning)
		setTimeout("JSFX.FadeImageAnimation()", 40);
}
