/****************************************************************************************/
/*																						*/
/*	Accordent Link Menu v2.00															*/
/*	=========================															*/
/*																						*/
/*	Last Edited: 4/4/2007																*/
/*	Please send all comments & bug reports to: support@accordent.com					*/
/*																						*/
/****************************************************************************************/
function hasP25() {
	var P25 = false;
	var plugin = navigator.mimeTypes && navigator.mimeTypes["application/x-ms-wmp"];
	var FFcheck = navigator.userAgent.indexOf("Firefox");
	if (plugin && FFcheck != -1)
		P25 = true;
	return P25;
}

var openThumbPage = false;

function openThumbWindow() {
	if (openThumbPage.window){
		openThumbPage.focus();
	} else {
		openThumbPage=window.open('thumbs.htm','thumbpage','scrollbars=yes,resizable=yes,width=225,height=630');
		openThumbPage.focus();
	}
}

function isBrowserIeWin() {
	var iewin = false;
	var ua = navigator.userAgent.toLowerCase();
	if ((ua.indexOf('ie') > -1) & (ua.indexOf('win') > -1))
		iewin = true;
	return iewin;
}

function isWin() {
	var win = false;
	var ua = navigator.userAgent.toLowerCase();
	if (ua.indexOf('win') > -1)
		win = true;
	//if(win){alert('is win');}else{alert('is NOT win');}
	return win;
}

function MenuCheck() {
	try{
		var WinSafari = navigator.userAgent.indexOf("Safari");
		if (!isWin() || WinSafari > -1){
			document.getElementById('chaptersBtnLayer').style.display = 'none';
		}
	} catch(e) {}
}

function bgCheck() {
	var customBG = '<<@mainBG@>>';
	var chkNocustomBGTag = customBG.indexOf("<<@");
	if(chkNocustomBGTag > -1)
		return;
	else if(customBG != '')
		document.getElementById("bgHolder").style.backgroundImage = "url(<<@mainBG@>>)";
}

function metaCheck() {
	var titleMeta = 'Introduction to 2008-2009 Business Pension Plan & Issues Tax Update';
	var speakerMeta = '<<@speaker@>>';
	var dateMeta = '<<@datetime@>>';
	var descMeta = 'In this course, Vern discusses the current cases and rules affecting pension and IRA contributions and distributions.';
	
	if (titleMeta == '')
		document.getElementById('r2Title').style.display = 'none';
	if (speakerMeta == '')
		document.getElementById('r2Speaker').style.display = 'none';
	if (dateMeta == '')
		document.getElementById('r2Date').style.display = 'none';
	if (descMeta == '')
		document.getElementById('r2Description').style.display = 'none';
}

function chaptersFocus() {
	document.getElementById('chaptersBtnLayer').innerHTML = "";
	document.getElementById('infoBtnLayer').innerHTML = "<a id=\"infoBtn\" href=\"#\" onClick=\"infoFocus();\" title=\"Event Information\"></a>";
	document.getElementById('chaptersLayer').style.left = "356px";
	document.getElementById('metaLayer').style.left = "-9999px";
}

function infoFocus() {
	document.getElementById('chaptersBtnLayer').innerHTML = "<a id=\"chaptersBtn\" href=\"#\" onClick=\"chaptersFocus();\" title=\"Topics List\"></a>";
	document.getElementById('infoBtnLayer').innerHTML = "";
	document.getElementById('chaptersLayer').style.left = "-9999px";
	document.getElementById('metaLayer').style.left = "356px";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Lvl_openWin(u,n,w,h,l,t,c,f) {
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}

function RefreshPage() {
	try {
			document.location.reload();
	} catch(e) {}
}

function RefreshTimer() {
	try {
			var timersec = '<<@prepublishrefresh@>>';
			var chkNoTag = timersec.indexOf("<<@");
			if (timersec != '' & chkNoTag < 0) {
				var timerms = timersec * 1000;
				if (timerms > 0) {
					setTimeout("RefreshPage()", timerms);
				}
			}
	} catch(e) {}
}
