var SM="sm-nationwide.proficient.com";
SM_BASE=(SM==""?"":location.protocol+'//'+SM);
_pI=new Array(),_pUa=navigator.userAgent.toLowerCase();
function inA(s) {return _pUa.indexOf(s)!=-1;}

function _pIsSup(){return ((inA('msie')||inA('gecko'))&&(!inA('msie')||(parseInt(parseFloat(_pUa.substring(_pUa.indexOf('msie ')+5)))>=5)&&!inA('mac')));}

function _pLog(h,d) {
	var i=new Image(),u=SM_BASE+"/graphics/init/logSignal.gif?"+h;
	for (var p in d) u+="&"+p+"="+escape(d[p]);
	i.src=u;
	_pI[_pI.length]=i;}

function _pEr(e,p,l){var m={e:e,p:p,l:l,v:(typeof vid!='undefined'?vid:""),u:_pUa};_pLog("J_ERR",m);}
function _pLd(){
	var s=document.createElement('script');
	s.type='text/javascript';
	s.src=SM_BASE+'/cf/scripts/postLoadIwatch.js?c='+Math.round(new Date().getTime()/3600000);
	s.defer=true;
	((document.getElementsByTagName('head'))[0]).appendChild(s);}

if (_pIsSup()) {
	if (window.attachEvent) {
		window.attachEvent('onload',_pLd);
		window.attachEvent('onerror',_pEr);
	} else {
		window.addEventListener('load', _pLd, false);
		window.addEventListener('error',_pEr, false);}
} else _pLog('UNSUP',{u:_pUa});

var vOn = "psys_rm_control_on", vOff = "psys_rm_control_off", eOn = null, eOff = null, eAvailOn = false, pss_v = "visible", pss_h = "hidden";

function vCheckForElement() {
	if (document.getElementById(vOn)){eOn = document.getElementById(vOn); eAvailOn = true;}
	if (document.getElementById(vOff)){eOff = document.getElementById(vOff);}}
	
function vPollForHelp() {
	if (typeof isHelpAvailable!= "undefined" && isHelpAvailable()) {
		if(!eAvailOn){vCheckForElement();}
		if (eOn){eOn.style.visibility=pss_v; if(typeof assistDisplayed!= "undefined"){assistDisplayed();}}
	if (eOff){eOff.style.visibility=pss_h;}
	}else {
		if (eOn){eOn.style.visibility=pss_h;}
		if (eOff){eOff.style.visibility=pss_v;}}
	setTimeout("vPollForHelp();", 500);}
vPollForHelp();
