// JavaScript Document



// Gallery script.

// With image cross fade effect for those browsers that support it.

// Script copyright (C) 2004 www.cryer.co.uk.

// Script is free to use provided this copyright header is included.

function LoadGallery(pictureName,imageFile,titleCaption,captionText){

	var isIE = document.getElementById(pictureName).filters;

	

	if (isIE != null){ 

    	document.getElementById(pictureName).style.filter="blendTrans(duration=1.5)";

    	document.getElementById(pictureName).filters.blendTrans.Apply();

		

  	}

  	document.getElementById(pictureName).src = imageFile;

  	if (isIE){

    	document.getElementById(pictureName).filters.blendTrans.Play();

  	}

  	//document.getElementById(titleCaption).innerHTML=captionText;

}



function OpenImage(galleryName){

	//alert("gallery = " + galleryName);

	var image = document.getElementById(galleryName).src;

	var slash = image.lastIndexOf("/");

	var image_name = image.substring(slash + 1, image.length);	

	image = image.substring(0, slash);

	slash = image.lastIndexOf("/");	

	var categ = image.substring(slash + 1, image.length);

	var page = './includes/navigation.php?categ='+categ+'&image='+image_name;

	var file = './images/'+categ+'/'+image_name;

	

//	alert("php page = " + page);

//	alert("image file = " + file);

	

	window.open(page, 'images', 'width=700,height=600,scrollbars=no');

}