function playT(target, id)
{
	var bVer = navigator.appVersion;
	ver = bVer.match(/MSIE ([0-9])/);
	if (ver != null)
	{
		if (ver[1] != undefined)
		{
			vNum = (ver[1] - 0);
			if (vNum == 6)
			{
				document.getElementById('screen').style.backgroundImage = 'url("http://resource.onetouchlending.com/graphics/us/screen2.gif")';
				document.getElementById('tWindow').style.backgroundImage = 'url("http://resource.onetouchlending.com/graphics/us/bubble.gif")';
			}
		}
	}

	var sY = f_scrollTop();
	var sTop = f_clientHeight();
	if (sY > sTop) sY = sTop;
	var vPos = sY / sTop;
	
	var locator = document.getElementById('bottomRight');
	var x = getElementLeft(locator) + 1;
	var y = getElementTop(locator) + 1;
	x = Math.max(x, f_clientWidth());
	y = Math.max(y, f_clientHeight());
	
	var screen = document.getElementById('screen');
	screen.style.height = y + 'px';
	screen.style.width = x + 'px';
	screen.style.display = 'block';

	var tWindow = document.getElementById('tWindow');
	var imgs = target.getElementsByTagName('IMG');
	var x = getElementLeft(target) - 490;
	var y = getElementTop(target) - 110;
	var y = Math.max(y, 0);
	tWindow.style.top = y + 'px';
	tWindow.style.left = x + 'px';
	tWindow.style.display = 'block';
	
	var target = document.getElementById('tWindowPlayer');
	removeAllChildren(target);
	var ptr = document.createElement('IFRAME');
	ptr.style.height = '20px';
	ptr.style.width = '200px';
//ptr.style.height = '600px';
//ptr.style.width = '750px';
	ptr.scrolling = 'no';
	ptr.frameBorder = 0;
	ptr.noresize = 'noresize';
	ptr.style.borderStyle = 'none';
	ptr.style.borderWidth = '0px';
	ptr.style.margin = '0';
	ptr.style.padding = '0';
	var srcStr = 'http://www.onetouchlending.com/source/getTestimonial.php?id='+id;
	ptr.src = srcStr;
	target.appendChild(ptr);
	
	return false;
}
function closeT()
{
	removeAllChildren(document.getElementById('tWindowPlayer'));
	document.getElementById('tWindow').style.display = 'none';
	document.getElementById('screen').style.display = 'none';
}
function browserWindowHeight()
{
	if ((document.all) && (document.getElementById))
	{
		return document.body.offsetHeight;
	} else {
		return window.innerHeight;
	}
}
function browserWindowWidth()
{
	if ((document.all) && (document.getElementById))
	{
		return document.body.offsetWidth;
	} else {
		return window.innerWidth;
	}
}
function removeAllChildren(theNode)
{ 
	while (theNode.childNodes[0]) { theNode.removeChild(theNode.childNodes[0]); } 
}
function getElementLeft(obj)
{
    var curleft = 0;
    if(obj.offsetParent)
    {
        while(true)
        {
                curleft += obj.offsetLeft;
                if(!obj.offsetParent) { break; }
                obj = obj.offsetParent;
        }
    } else if(obj.x) { curleft += obj.x; }
    return curleft;
}
function getElementTop(obj)
{
    var curtop = 0;
    if(obj.offsetParent)
    {
        while(true)
        {
                curtop += obj.offsetTop;
                if(!obj.offsetParent) { break; }
                obj = obj.offsetParent;
        }
    } else if(obj.y) { curtop += obj.y; }
    return curtop;
}
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
