function Link_OnMouseOver(Element){
	var Counter;
	if(!Element) Element=event.srcElement;
	with(Element){
		if(g_IsMsIe){
			oldstyle=style.cssText;
			style.border=Link_GetNewStyle(Element,'newborder','');
			style.backgroundColor=Link_GetNewStyle(Element,'newbackgroundcolor','');
			style.color=Link_GetNewStyle(Element,'newcolor','#FF0000');
			style.textDecoration=Link_GetNewStyle(Element,'newtextdecoration','underline');
		}
		else className=className+'Hover';
	}
	Link_SwitchImage(Element);
}

function Link_GetNewStyle(Element,AttrName,DefaultValue){
	with(Element){
		if(getAttribute(AttrName)) return(getAttribute(AttrName));
		else return(DefaultValue);
	}
}

function Link_OnMouseOut(Element){
	var Counter;
	if(!Element) Element=event.srcElement;
	with(Element){
		if(g_IsMsIe) style.cssText=oldstyle;
		else className=className.substr(0,className.length-5);
	}
	Link_SwitchImage(Element);
}

function Link_SwitchImage(Element){
	with(Element){
		if (!g_IsMsIe){
			if (id && document.images["img"+id+"Link"]){
				HoverSrc=document.images["img"+id+"Hover"].src;
				document.images["img"+id+"Hover"].src=document.images["img"+id+"Link"].src;
				document.images["img"+id+"Link"].src=HoverSrc;
			}
		}
		else{
			ImgLink=all.item('imgLink');
			if(ImgLink){
				with(all.item('imgHover')){
					LinkSrc=ImgLink.src
					ImgLink.src=src;
					src=LinkSrc;
				}
			}
		}
	}
}
