<!--

var ph1;

function view_big(url, width, height){
   posX = Math.round((screen.width-800)/2);
   posY = Math.round((screen.height-600)/2);
   posCode = (document.all)? ",left="+posX+",top="+posY : ",screenX="+posX+",screenY="+posY;
   if (ph1) { ph1.close(); }
   ph1 = null;
   ph1 = window.open(url,'color_win',"width=790,height=520,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes"+posCode);
   ph1.focus();
}

function popup(url, width, height){
   if (width>780) { view_big(url, width, height);return; }
   var newwidth = width + 16;
   var newheight = height + 0;
   if (screen.height - 60 < newheight) { newheight = screen.height - 60; }
   posX = Math.round((screen.width - newwidth) / 2);
   posY = Math.round((screen.height- 60 - newheight) / 2);
   posCode = (document.all)? ",left="+posX+",top="+posY : ",screenX="+posX+",screenY="+posY;
   if (ph1) { ph1.close(); }
   ph1 = null;
   ph1 = window.open(url,'photo_win',"width="+newwidth+",height="+newheight+",titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes"+posCode);
   ph1.focus();
}

function exit() {
   if (window.opener && window.opener.ph1) { window.opener.ph1=null; }
   window.close();
   ph1.focus();
   ph1.close();
}


ImagePreloader.prototype.preload = function(image) {
	// create new Image object and add to array
	var oImage = new Image;
	this.aImages.push(oImage);

	// set up event handlers for the Image object
	oImage.onload = ImagePreloader.prototype.onload;
	oImage.onerror = ImagePreloader.prototype.onerror;
	oImage.onabort = ImagePreloader.prototype.onabort;

	// assign pointer back to this.
	oImage.oImagePreloader = this;
	oImage.bLoaded = false;

	// assign the .src property of the Image object
	oImage.src = image;
}



ImagePreloader.prototype.onComplete = function() {
	this.nProcessed++;
	if ( this.nProcessed == this.nImages )
	{
		this.callback(this.aImages, this.ids, this.nLoaded);
	}
}

ImagePreloader.prototype.onload = function() {
	this.bLoaded = true;
	this.oImagePreloader.nLoaded++;
	this.oImagePreloader.onComplete = ImagePreloader.prototype.onComplete;
	this.oImagePreloader.onComplete();
}

ImagePreloader.prototype.onerror = function() {
	this.bError = true;
	this.oImagePreloader.onComplete = ImagePreloader.prototype.onComplete;
	this.oImagePreloader.onComplete();
}

ImagePreloader.prototype.onabort = function() {
	this.bAbort = true;
	this.oImagePreloader.onComplete = ImagePreloader.prototype.onComplete;
	this.oImagePreloader.onComplete();
}




function ImagePreloader(images, idses, callback) {
	// store the call-back
	this.callback = callback;
	this.ids = idses;

	// initialize internal state.
	this.nLoaded = 0;
	this.nProcessed = 0;
	this.aImages = new Array;

	// record the number of images.
	this.nImages = images.length;


	this.preload = ImagePreloader.prototype.preload;


	// for each image, call preload()
	for ( var i = 0; i < images.length; i++ ) {
		this.preload(images[i]);
	}
}

function result (a, b, c) {
	var x;
	for ( var i = 0; i < a.length; i++ )
	{
		x = window.document.getElementById(b[i]);
		if ( x == null) {
		    continue;
		}else{
			x.style.backgroundImage = 'url("'+a[i].src+'")';
		}
	}
}

function get_url(obj){
	var x = obj.parentNode.getElementsByTagName('A');
	window.location = x[0];
}


//-->