﻿
if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
{
	document.styleSheets[0].addRule('img', 'behavior: url(/core/style/iepngfix.htc)');
	document.styleSheets[0].addRule('div', 'behavior: url(/core/style/iepngfix.htc)');
	document.styleSheets[0].addRule('input', 'behavior: url(/core/style/iepngfix.htc)');
}


var pPreviousImage = '';
function LoadExternalImage(pLink)
{
	var obj = document.getElementById('_LinksMouseOverImage');
	if (obj != null)
	{
		pPreviousImage = obj.style.backgroundImage;
		obj.style.backgroundImage = 'url(' + pLink + ')';
	}
}

function LoadInitialImage()
{
	var obj = document.getElementById('_LinksMouseOverImage');
	if (obj != null)
	{
		obj.style.backgroundImage = pPreviousImage;
	}
}

function WatermarkFocus(txtElem, strWatermark)
{
	if (txtElem.value == strWatermark) txtElem.value = '';
}

function WatermarkBlur(txtElem, strWatermark)
{
	if (txtElem.value == '') txtElem.value = strWatermark;
}


function calculateIframeHeight(iframe)
{
	try
	{
		iframe.height = iframe.contentWindow.document.body.scrollHeight + 150;
	}
	catch (e)
	{
	}
}
