/*

Enhancements/Fixes:

header: _header.js

 - 07/21/0209 jmart - MAIN-583: changed playText to use texthelp.

*/

var wndwSzW = 0, wndwSzH = 0;

function outClick() {
	window.location="/?logout=1&"+lcfid_str;
}

function helpClick() {
	var testWin;
	var str;
	str = "menubar=yes,scrollBars=1,width=750,height=500,resizable=yes";
	str=str+",toolbar=yes";
	testWin = window.open("","helpWin",str);
	testWin.location = HelpLink;
}

function aboutClick() {
	var testWin;
	var str;
	str = "menubar=no,scrollBars=1,width=700,height=500,resizable=yes";
	testWin = window.open("","helpWin",str);
	testWin.location = "/about.cfm?"+lcfid_str;
}

function contactClick() {
	var testWin;
	var str;
	str = "menubar=no,scrollBars=1,width=700,height=500,resizable=yes,toolbar=yes";
	testWin = window.open("","helpWin",str);
	testWin.location = "/contact.cfm?"+lcfid_str+"&logout=1";	
}

var playText = function (str) {
	try {
		$rw_speakText(unescape(str));
	}
	catch(e){}
};

var audioDelayID=0;

function playTextDelay(str,x) {
	clearAudioDelay();
	try{
		var textDelayTime = .5 * parseInt(x);
		if(!isNaN(textDelayTime)){
			audioDelayID=window.setTimeout("playText('"+str+"')",textDelayTime);
		}
	}catch(err){
		audioDelayID=window.setTimeout("playText('"+str+"')",x);
	}
}
	
function clearAudioDelay() {
	if (audioDelayID>0) {
		window.clearTimeout(audioDelayID);
	}
}

function wndwSz() {
	if (typeof(window.innerWidth) == 'number') {
		wndwSzW = window.innerWidth;
		wndwSzH = window.innerHeight;
	}
	else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    	wndwSzW = document.documentElement.clientWidth;
    	wndwSzH = document.documentElement.clientHeight;
	}
	else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		wndwSzW = document.body.clientWidth;
		wndwSzH = document.body.clientHeight;
	}
}