// JavaScript Document

var strgblVideoFileName = 'linuxworld-widgets-574';
var strgblMenuHighlight = '1';


//**********************
function myTestConnection()
{
   var strMsg = 'connected to accordion.js 11/17/08 - 6:31';
   alert(strMsg);
}
//***************************

function accordionExpand(strMenuNumber)
{
	if(strMenuNumber != strgblMenuHighlight)//don't execute code if the menu gets clicked again
	{
		var strBorderExpand = 'border:1px solid #76b900; ';
		var strPaddingExpand = 'padding:1px;';	
//var strHeightExpand = '218'; //for 3 clips
		var strHeightExpand = '362'; //for 5 clips
		
		var strScrolling = 'auto';
		
		if(strMenuNumber == '1')
		{
			strScrolling = 'no';
		}//end if menu check
		
		var strFrameCode = '<div class="accordion_child" style="' + strBorderExpand  + strPaddingExpand + 'height: ' + strHeightExpand + 'px; ' + '"><iframe src="accordion/' + strMenuNumber + '-content.html" align="center" width="100%" height="' + strHeightExpand + '" frameborder="0" marginwidth="0" marginheight="0" scrolling="' + strScrolling +'"></iframe></div>';
		
		parent.document.getElementById(strMenuNumber + '-content').innerHTML = strFrameCode;
		
		parent.document.getElementById(strMenuNumber + '-header').setAttribute('class', 'header_highlight');
	
		
		parent.document.getElementById(strMenuNumber + '-header').innerHTML = '<img src="accordion/images/'+ strMenuNumber + '-tab_selected.gif" border="0" alt="" class="header_image" style="border-bottom:0px; border-top:1px solid #cccccc;"/>';
		
	//	style="background-image:url('accordion/images/tab_selected.gif');"
		
		var strBorderCollapse = 'border:0px; ';
		var strPaddingCollapse = 'padding:0px;';	
		var strHeightCollapse = '0';
	
		strFrameCode = '<div class="accordion_child" style="' + strBorderCollapse +  strPaddingCollapse + 'height: ' + strHeightCollapse + 'px; ' +'"><iframe src="accordion/' + strgblMenuHighlight + '-content.html" align="center" width="100%" height="' + strHeightCollapse + '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>';
		
		parent.document.getElementById(strgblMenuHighlight + '-content').innerHTML = strFrameCode;	
		parent.document.getElementById(strgblMenuHighlight + '-header').setAttribute('class', 'accordion_headings');
		
		parent.document.getElementById(strgblMenuHighlight + '-header').innerHTML = '<img src="accordion/images/'+ strgblMenuHighlight + '-tab_unselected.gif" border="0" alt="" class="header_image" style="border-bottom:1px solid #cccccc; border-top:1px solid #cccccc;" />';
		
		strgblMenuHighlight = strMenuNumber;
	}//end if
}// end function
//***************************/

function accordionGallery(iGalleryIndex)
{
	var strThumbnailCode = '<span class="view-all-clip-block">';
	
	strThumbnailCode += '<img src="images/' + arygblGallery[iGalleryIndex][igblvid_ID] + '.jpg" class="accordion-thumb" alt="" onclick="accordionPlay(\'' + arygblGallery[iGalleryIndex][igblvid_ID] + '\');"/>';
	
	strThumbnailCode += '<a onclick="accordionPlay(\'' + arygblGallery[iGalleryIndex][igblvid_ID] + '\');">';
	strThumbnailCode += '<span class="accordion-title">' + arygblGallery[iGalleryIndex][igblvid_TITLE] + '</span>';
	strThumbnailCode += '<span class="accordion-description">' + arygblGallery[iGalleryIndex][igblvid_SYNOPSIS] + '</span></a>';
	strThumbnailCode += '<span class="accordion-duration">Duration: ' + arygblGallery[iGalleryIndex][igblvid_DURATION] + '</span>';
	strThumbnailCode += '<span class="accordion-clip-divider"></span></span>';
	strThumbnailCode += '<!---*********-->';	
	
	document.write(strThumbnailCode);
}//end function

//*************************
function accordionPlay(strVideo)
{
/*var strTitle = 'No title found';
	var strSynopsis = 'No synopsis found';
	var strDuration = '0:00';
	var strLink = 'http://www.access-company.com';
	var strLinkText = 'Go to the ACCESS Website &raquo;';
	var strDate = 'No date found';
	*/
	var strTitle = arygblGallery[strVideo][igblvid_TITLE];
	var strSynopsis = arygblGallery[strVideo][igblvid_SYNOPSIS];
	var strDuration = arygblGallery[strVideo][igblvid_DURATION];
	var strLink = arygblGallery[strVideo][igblvid_LINK];
	var strLinkText = arygblGallery[strVideo][igblvid_LINKTEXT];
	var strDate = arygblGallery[strVideo][igblvid_DATE];
	
	var strEmbed = 'No embedded URL found';
	var strEmail = 'No email found';
	var strCurrentVideoFileName = strgblVideoFileName;
	strgblVideoFileName = strVideo + '-574-auto';

/*	switch(strVideo)
	{
		case 'linuxworld-dlna':	
		case 'living-connect':
		case 'nfb-mylo-start':
		case 'nfb-mylo-bookmarks':	
		case 'nfb-mylo-youtube':
		case 'nfb-mylo-fittoscreen':
		case 'nfb-stb-dtvprofilebml':
		case 'nfb-sne-start':
		case 'nfb-sne-bookmarks':	
			strTitle = arygblGallery[strVideo][1];
			strSynopsis = arygblGallery[strVideo][3];
			strDuration = arygblGallery[strVideo][2];
			strLink = arygblGallery[strVideo][4];
			strLinkText = arygblGallery[strVideo][5];
			strDate = arygblGallery[strVideo][6];
			break;	

		
/*		case 'linuxworld-dlna':			
			strTitle = 'NetFront&trade; Living Connect';
			strSynopsis = 'DLNA demo at LinuxWorld 2008 in San Francisco.';
			strDuration = '4:13';
			strLink = 'http://www.access-company.com/products/internet_appliances/livingconnect/index.html';
			strLinkText = 'Learn more about NetFront Living<br/> Connect &raquo;';
			strDate = 'November 30, 2008';
			break;	

		case 'living-connect':			
			strTitle = 'NetFront&trade; Living Connect';
			strSynopsis = 'DLNA solution for multimedia home networks.';
			strDuration = '3:02';
			strLink = 'http://www.access-company.com/products/internet_appliances/livingconnect/index.html';
			strLinkText = 'Learn more about NetFront Living<br/> Connect &raquo;';
			strDate = 'December 2, 2008';
			break;		
			
		case 'nfb-mylo-start':			
			strTitle = 'Accessing the NetFront&trade; Browser';
			strSynopsis = 'Learn how to access the NetFront Browser on a Sony Mylo.';
			strDuration = '1:25';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 17, 2008';
			break;	

		case 'nfb-mylo-bookmarks':			
			strTitle = 'NetFront&trade; Browser Bookmarks';
			strSynopsis = 'Find out how to use NetFront Browser Bookmarks on a Sony Mylo.';
			strDuration = '0:28';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 17, 2008';
			break;	

		case 'nfb-mylo-youtube':			
			strTitle = 'View YouTube with NetFront&trade; Browser';
			strSynopsis = 'See how to use NetFront Browser to view YouTube on a Sony Mylo.';
			strDuration = '0:39';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 17, 2008';
			break;

		case 'nfb-mylo-fittoscreen':			
			strTitle = 'NetFront&trade; Browser&rsquo;s Fit To Screen Feature';
			strSynopsis = 'See how to fit a web page on a Sony Mylo.';
			strDuration = '0:59';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 17, 2008';
			break;

		case 'nfb-stb-dtvprofilebml':			
			strTitle = 'NetFront&trade; Browser BML Profile';
			strSynopsis = 'Enhance your television viewing with NetFront Browser BML Profile.';
			strDuration = '0:41';
			strLink = 'http://www.access-company.com/products/internet_appliances/netfrontdtv/dtv_profile.html';
			strLinkText = 'Learn more about NetFront Browser BML Profile &raquo;';
			strDate = 'December 22, 2008';
			break;
	
		case 'nfb-psp-start':			
			strTitle = 'Accessing the NetFront&trade; Browser';
			strSynopsis = 'Learn how to access the NetFront Browser on a Sony PSP.';
			strDuration = '1:49';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 22, 2008';
			break;

		case 'nfb-psp-smartfit':			
			strTitle = 'NetFront&trade; Browser Advanced Rendering';
			strSynopsis = 'Learn how to use NetFront Browser&rsquo;s advanced rendering on a Sony PSP.';
			strDuration = '0:59';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 22, 2008';
			break;

		case 'nfb-sne-start':			
			strTitle = 'Accessing the NetFront&trade; Browser';
			strSynopsis = 'Learn how to access the NetFront Browser on a Sony Ericsson Walkman phone.';
			strDuration = '0:34';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 23, 2008';
			break;

		case 'nfb-sne-bookmarks':			
			strTitle = 'NetFront&trade; Browser Bookmarks';
			strSynopsis = 'Find out how to use NetFront Browser Bookmarks on a Sony Ericsson Walkman phone.';
			strDuration = '0:36';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 23, 2008';
			break;

		case 'nfb-sne-fullscreen':			
			strTitle = 'NetFront&trade; Browser in Full Screen Mode';
			strSynopsis = 'Use NetFront Browser in Full Screen Mode on a Sony Ericsson Walkman phone.';
			strDuration = '0:30';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'December 23, 2008';
			break;
		
		case 'nfb-kindle':			
			strTitle = 'NetFront&trade; Browser - Kindle';
			strSynopsis = 'See how the NetFront Browser works on the Amazon.com Kindle.';
			strDuration = '2:24';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'January 9, 2009';
			break;			
		
		case 'nfw-htctf':			
			strTitle = 'NetFront&trade; Widgets';
			strSynopsis = 'See NetFront Widgets on an HTC TouchFlow.';
			strDuration = '1:22';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/widgets.html';
			strLinkText = 'Learn more about NetFront Widgets &raquo;';
			strDate = 'January 9, 2009';
			break;	
			
		case 'nfb-kindle-start':			
			strTitle = 'NetFront&trade; Browser - Kindle';
			strSynopsis = 'See how the NetFront Browser works on the Amazon.com Kindle.';
			strDuration = '1:04';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';			
			strDate = 'January 16, 2009';
			break;			

		case 'corp-profile':			
			strTitle = 'ACCESS - Corporate Profile';
			strSynopsis = 'ACCESS history and technologies';
			strDuration = '6:46';
			strLink = 'http://www.access-company.com/about/index.html';
			strLinkText = 'Learn more about ACCESS &raquo;';			
			strDate = 'January 21, 2009';
			break;	


		case 'nfb-mgd-start':			
			strTitle = 'NetFront&trade; Browser on Gaming Device';
			strSynopsis = 'Learn how to access the NetFront Browser on a popular gaming device.';
			strDuration = '1:49';
			strLink = 'http://www.access-company.com/products/mobile_solutions/netfrontmobile/browser/index.html';
			strLinkText = 'Learn more about NetFront Browser &raquo;';
			strDate = 'January 22, 2009';
			break;

		case 'alp-board-widget':			
			strTitle = 'ACCSSS Linux Platform - Widgets';
			strSynopsis = 'See how to use widgets on ALP.';
			strDuration = '1:15';
			strLink = 'http://www.access-company.com/products/platforms/linux/alp.html';
			strLinkText = 'Learn more about ALP &raquo;';
			strDate = 'January 23, 2009';
			break;
			
		case 'alp-board-browser':			
			strTitle = 'ACCSSS Linux Platform - Browser';
			strSynopsis = 'See how to use the browser on ALP.';
			strDuration = '3:04';
			strLink = 'http://www.access-company.com/products/platforms/linux/alp.html';
			strLinkText = 'Learn more about ALP &raquo;';
			strDate = 'January 23, 2009';
			break;

		case 'alp-board-photos':			
			strTitle = 'ACCSSS Linux Platform - Photos';
			strSynopsis = 'See how to use view photos on ALP.';
			strDuration = '3:10';
			strLink = 'http://www.access-company.com/products/platforms/linux/alp.html';
			strLinkText = 'Learn more about ALP &raquo;';
			strDate = 'January 23, 2009';
			break;

		case 'ipi-ramesh-intro':			
			strTitle = 'IP Infusion - Ramesh';
			strSynopsis = 'Meet IP Infusion&rsquo;s K. Ramesh Babu - Vice President of Professional Services and Support.';
			strDuration = '1:10';
			strLink = 'http://www.ipinfusion.com/';
			strLinkText = 'Learn more about IP Infusion &raquo;';
			strDate = 'January 26, 2009';
			break;

		default:
			//undo global change because no video match found
			strgblVideoFileName = strCurrentVideoFileName;
			break;				
	}//end switch
*/	
	strEmbed = strgblVideoFileName + '.swf';
	strEmail = 'mailto:?subject=' + strTitle + '&body=http://www.access-company.com/video/swf/' + strgblVideoFileName + '.swf';
	
	var strObjectSwfText = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="574" height="363"  align="middle">';
		
	strObjectSwfText += '<param name="allowScriptAccess" value="sameDomain" />';
	strObjectSwfText += '<param name="allowFullScreen" value="false" />';
	strObjectSwfText += ('<param name="movie" value="swf/' + strgblVideoFileName + '.swf" />');
	strObjectSwfText += '<param name="quality" value="high" />';
	strObjectSwfText += '<param name="bgcolor" value="#ffffff" />';
	strObjectSwfText += ('<embed src="swf/' + strgblVideoFileName +'.swf" quality="high" bgcolor="#ffffff" width="574" height="363" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');   
	strObjectSwfText += '</object>';
	

	parent.document.getElementById('video_title').innerHTML = strTitle;
	parent.document.getElementById('video_synopsis').innerHTML = strSynopsis;
	parent.document.getElementById('video_duration').innerHTML = 'Duration: ' + strDuration;
	parent.document.getElementById('video_link').innerHTML = '<a class="footer" href="' + strLink + '">' + strLinkText + '</a>';	
	parent.document.getElementById('video_date').innerHTML = strDate;	
	parent.document.getElementById('video_embed').innerHTML = '<input type="text" id="text-url" name="text-url" class="text-url" value="http://video.access-company.com/video/swf/' + strEmbed + '" />';
	parent.document.getElementById('video_email').innerHTML = '<a href="' + strEmail + '" class="video_email">&nbsp;</a>';		
	
	parent.document.getElementById('object-swf').innerHTML = strObjectSwfText;

}// end function
//****************************************//