window.addEventListener?window.addEventListener("load",init,false):window.attachEvent("onload",init);

//---------------------------------------------------[ INITIALIZE ]
function init()
{
	var userAgent = navigator.userAgent;
	var msIE6 = userAgent.indexOf('MSIE 6.0') != -1;
	var msIE55 = userAgent.indexOf('MSIE 5.5') != -1;
	if (msIE6 || msIE55)
	{
		findPNGs();
	}
}

//------------------------------------------------[ FIND ALL PNGS ]
function findPNGs()
{
	if (!document.getElementsByTagName) return; 
	var images = document.getElementsByTagName("IMG"); 
	for (var i = 0; i < images.length; i ++)
	{ 
		var image = images[i];
		var imageSrc = image.src;
		var regex = /.png/
		var foundPNG = regex.test(imageSrc);
		if (foundPNG)
		{
			fix_PNG(image);
		}
	}
}

function fix_PNG(imageRef)
{
	var imgID = (imageRef.id) ? "id='" + imageRef.id + "' " : "";
	var imgClass = (imageRef.className) ? "class='" + imageRef.className + "' " : "";
	var imgTitle = (imageRef.title) ? "title='" + imageRef.title + "' " : "title='" + imageRef.alt + "' ";
	var logoMargin = (imageRef.id == 'fyne_logo') ? 'margin: 8px;' : '';
	var imgStyle = "display: block; float: left;" + logoMargin + imageRef.style.cssText;
	var strNewHTML = "<span " + imgID + imgClass + imgTitle;
	strNewHTML += " style=\"" + "width:" + imageRef.width + "px; height:" + imageRef.height + "px;" + imgStyle; // + ";";
	strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	strNewHTML += "(src=\'" + imageRef.src + "\', sizingMethod='image');\"></span>";
	imageRef.outerHTML = strNewHTML;
}

//-------------------------[ SETUP: train connection from passed index value. ]
function mystery( indexValue, subjectText )
{
	var mystery ="109,97,105,108,116,111,58,"; // setup code.
	var train = "?subject=" + subjectText; // setup subject as string.
	var coming = "&body=";
	
	mystery += return2sender(indexValue * 1); // get required code.
	var decode = mystery.split(","); // setup array from encoded.
	mystery = ""; // setup source variable as string.
	for (var e = 0; e < decode.length; e++)
	{
		mystery += String.fromCharCode(decode[e]); // decode as string.
	}
	document.location = mystery + train + coming; // Write call.
}