function ImgLink(parent,imgName,img2Name,Link,Target,alt,statusText)
{
	ImgName="Img"+parent.images.length;

	TargetParam = "";
	if (Target!="")	{TargetParam=' target="'+Target+'"';}

	altParam = "";
	if (alt!="")	{altParam=' alt="'+alt+'"';}

	parent.write('<a href="'+Link+'"'+TargetParam+'><img src="'+imgName+'" name="'+ImgName+'"'+altParam+' border=0></a>');

	TheLink=parent.links[parent.links.length-1];

	TheLink.onmouseover=MouseOverImg;
	TheLink.onmouseout=MouseOutImg;

	TheLink.statusText=statusText;
	TheLink.IsMouseOver=false;
	if (img2Name!='')
	{
	TheLink.OverImg=new Image();
	TheLink.OverImg.src=img2Name;
	}
	TheLink.OutImg=new Image();
	TheLink.OutImg.src=imgName;
	TheLink.LinkImg=parent [ImgName];

	TheLink.showImage=ShowImage;
	TheLink.setImage=SetImage;
	TheLink.showStatus=ShowStatus;
	TheLink.setStatus=SetStatus;
	return TheLink;
}

function ShowImage(n)
{
	if (!n) this.LinkImg.src=this.OutImg.src;
	else
	if (this.OverImg) this.LinkImg.src=this.OverImg.src;
}

function ShowStatus()
{
	if (this.IsMouseOver) self.status=this.statusText
	else self.status='';
}

function SetImage(n,Name)
{
	if (!n && Name!='') this.OutImg.src=Name
	else
	if (n)
	{
	if (this.OverImg) delete this.OverImg;
	if (Name!='')
		{
		this.OverImg=new Image();
		this.OverImg.src=Name;
		}
	}
	if (this.IsMouseOver) this.showImage(1)
	else this.showImage(0);
}

function SetStatus(Status)
{
	this.statusText=Status;
	this.showStatus();
}

function MouseOverImg()
{
	this.IsMouseOver=true;

	this.showImage(1);
	this.showStatus();

	return true;
}

function MouseOutImg()
{
	this.IsMouseOver=false;

	this.showImage(0);
	this.showStatus();

	return true;
}
