function checkIt(string)
{
	var detect = navigator.userAgent.toLowerCase();
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function fadeOut(obj) 
{
	if(checkIt('msie') && !checkIt('opera') && !checkIt('safari') && !checkIt('konqueror'))
	{
		obj.style.filter="blendTrans(duration=1)";
		if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 1)) 
			{
				obj.filters.blendTrans.Apply();
				obj.style.visibility="hidden";
				obj.filters.blendTrans.Play();
			}
	}
	else
		obj.style.visibility="hidden";
		return false;
}

function fadeIn(obj) 
{
	if(checkIt('msie') && !checkIt('opera') && !checkIt('safari') && !checkIt('konqueror'))
	{
		obj.style.filter="blendTrans(duration=1)";
		if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 1)) 
		{
			obj.filters.blendTrans.Apply();
			obj.style.visibility="visible";
			obj.filters.blendTrans.Play();
		}
	}
	else
		obj.style.visibility="visible";
		return false;
}

function change(objid) 
{
	if (MODE==0)
	{	
		if (objid == JSGALERYLASTID)
		{
			return false;
		}
		if (JSGALERYLASTID=='')
		{
			JSGALERYLASTID=objid;
		}
		obj_curr = document.getElementById(objid);
		obj_last = document.getElementById(JSGALERYLASTID);
		fadeIn(obj_curr);
		if (obj_last!=obj_curr)
		{
			fadeOut(obj_last);
		}

		JSGALERYLASTID = objid;
	}
}
function reload(objid) 
{

		obj_curr = document.getElementById(objid);
		
		if(JSGALERYLASTID!=' ')
		{

			obj_last = document.getElementById(JSGALERYLASTID);
			fadeOut(obj_last);
		
		}
		
	fadeIn(obj_curr);
	
	JSGALERYLASTID = objid
	
}

