
var PopupImg = '';
var PopupWidth = -1
var PopupHeight = -1


function blendstart(UseFade,newPopupWidth, newPopupHeight, Text,NewPopupImg,newImg,newURL,Number)
	{
	PopupImg = NewPopupImg;
	PopupWidth = newPopupWidth;
	PopupHeight = newPopupHeight;
	
	
	if(navigator.userAgent.indexOf('Mac')>0||navigator.appName=='Netscape' ||UseFade==false)	
		{
		document.location.href=newURL;
		}
	else
		{
		PhotoImage = document.images('Photo' +Number);		
		document.location.href = '#Album' +Number;
		PhotoImage.filters.blendTrans.Apply();	
		PhotoImage.src = newImg;
		PhotoImage.filters.blendTrans.Play()	
		SetPhotoText(Text,Number);			
		}	
}

function SetPhotoText(Text, AlbumNr)
	{
	
	if(AlbumNr)
		{writeDivContent('PhotoText' +AlbumNr,Text,0,'','')
		}
	else
		{
		writeDivContent('PhotoText',Text,0,'','')
		}
	
	}
	
function DisplayPopup(Path,Width2,Height2,ImgPath,UseBlank)
{
if(PopupWidth==-1 && Width2>0)
	{
	PopupWidth = Width2
	PopupHeight = Height2
	}
else
	{
	ImgPath = '';
	}

if(PopupWidth>0)
	{
	if(UseBlank==0)
		{
		window.open(Path + PopupImg + ImgPath, 'PopupPhoto', 'Width=' +PopupWidth +',Height=' +PopupHeight);
		}
	else
		{
		window.open(Path + PopupImg + ImgPath, 'PopupPhoto', '');
		}
		
	}
}

function ChangePopupLinkState(AlbumNr,StartWidth)
	{
	nl = navigator.appName.toLowerCase();	
		
	if (nl.indexOf('microsoft')>-1)
		{		
		if (PopupWidth==0 || (PopupWidth==-1 && StartWidth<1))
			{									
			img = document.images['Photo' +AlbumNr];					
			img.style.cursor = 'default';		
			}
		else
			{			
			img = document.images['Photo' +AlbumNr];					
			img.style.cursor = 'hand';	
			}
	}	
	}