/****************************************************************************************/
/*																						*/
/*	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 == false){

		openThumbPage=window.open('thumbs.htm','thumbpage','scrollbars=yes,resizable=yes,width=225,height=630');
		openThumbPage.focus();
	} else {
		openThumbPage.focus();

	}
}

function exit(){
	top.window.close();
}

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 metaCheck() {
	var titleMeta = "MiNE LLC Modern Energy Investor Forum 09";
	var speakerMeta = "Green Energy Corp.";
	var dateMeta = "9/10/2009 10:05:48 AM";
	var descMeta = "MiNE LLC Modern Energy Investor Forum 09";
	
	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 seek(timestr) { // Modified For FullScreen***
	if(window.top.video) window.top.video.seek(timestr);
	else if(window.top.mainFrame.video) window.top.mainFrame.video.seek(timestr);
	else if(window.opener.top.video) window.opener.top.video.seek(timestr);
	else if(window.opener.top.mainFrame.video) window.opener.top.mainFrame.video.seek(timestr);
}
function seekasx(asx){
	alert(asx);
}

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) {}
}

function vidFull() {
	try{
		if (top.window.video) {
			top.window.video.full_screen();
		}
	} catch(e) {
		alert("error");
		var err = e;
	}
}

function _largeslideCall() {
 try{
		if(top.video && top.video.currentSlide != ''){
			top.video.lg_slide();
		}
	} catch(e) {
		alert("This feature is not ready, please try again in a few seconds");
	}
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function toggleThb() {
	if(window.top.region1){
		window.top.region1.toggleView(window.top.region1.hasSlideInfo)
	}
}

function callPopUp() { 
  if (window.top.video){
		window.top.video.openThumbWindow();
	}
}		

function launchCheck() {
	var WinSafari = navigator.userAgent.indexOf("Safari");
	var customBG = 'Temp_Bkgd_Image.jpg';
	var chkNocustomBGTag = customBG.indexOf("<@");
	var customlogo = 'Template_Header_Image.jpg';
	var chkNoTag = customlogo.indexOf("@");
	
	try{

		if (!isWin() || WinSafari > -1) // hide thumbnails link for non Windows and Windows Safari users;
			document.getElementById('slideGroup').style.display = 'none';	
			
		if (!isBrowserIeWin()) {
			// hide zoom slide from non-windows os and non-ie browsers
			document.getElementById('zoomSlide').style.display = 'none';
			if(!hasP25()){
				document.getElementById('zoomVid').style.display = 'none';
				document.getElementById('swapVid').style.display = 'none';
			}
		}
		if (!captionsVisibility)
				document.getElementById('captions').style.display = 'none';
		
		if (customlogo != '' & chkNoTag < 1) {
			document.getElementById('logoimage').src = customlogo;
		}
		else {
			document.getElementById('logoImage').src = 'logo.jpg';
		}
		if (top.window.name != 'presMode') {
			document.getElementById('closeLayer').style.display = 'none';
			document.getElementById('bgOuter').style.border = 'none';
		}
		
		if(chkNocustomBGTag > -1)
			return;
		else if(customBG != '')
			document.getElementById("bgOuter").style.backgroundImage = "url(Temp_Bkgd_Image.jpg)";
	} catch(e) {}
}

function closeThumbWindow() {
	if (window.top.openThumbPage){
		window.top.openThumbPage.close();
	}
}