// JavaScript source code
//Copyright Brian Billadeau 2004
var news_header = new Array();
var news_msg = new Array();
var news_date = new Array();
var browser = "";
news_header[0] = "New support email address";
news_msg[0] = "<p>The support email address has changed to <a href='mailto:support@ezvideosplicer.com?subject=EZVideoSplicer'>support@ezvideosplicer.com</a></p><p>If you have sent an email to the old address within the past week please resend the email to the new address.</p><br>"
news_date[0] = "12/23/04";
news_header[1] = "New Years Promotion";
news_msg[1] = "<p>Get 5 dollars off of EZVideoSplicer during the first week of 2005. Simply entering the following code during checkout.</p><p>Coupon Code: NEWYR</p><p>Offer valid from <em>1/1/05</em> to <em>1/8/05</em>";
news_date[1] = "12/26/04"
news_header[2] = "Version 1.6.1 now available";
news_msg[2] = "<p>EZVideoSplicer version 1.6.1 is now available for download. Here is what's new:</p><ul><li>[Fixed] Program crashing during file split.</li><li>[Added] Drag and Drop support.</li></ul><br>";
news_date[2] = "12/26/04"

//functions
function CheckBrowserName(){
	if(navigator.appName == "Microsoft Internet Explorer"){
		browser = "ie";
	}
	else{
		browser = "other";
	}
}

//****Functions of the sidebar class

function NewsBox(header, msg, date, anchorNum)
{
	document.write('<a id="news' + anchorNum + '"></a>\n');
	document.write('<div class="news">\n<div class="header">\n<div class="date">' + date + '</div>');
	document.write(header + '\n</div>\n' + msg + '\n</div>\n');
}

function NewsItem(header, anchorNum)
{
	document.write('<a class="news_item" href="./Index.html#news'
		+ anchorNum + '">' + header + '</a><br>\n');
}


function DisplayNavigationSidebar()
{
	//Display navigation sidebar
	document.write('<div class="sidebar" style="LEFT: 5px; POSITION: absolute; TOP: 30px; HEIGHT: 200px">\n');
	document.write('<div class="header">Navigation</div>\n');
	//Display navigation links
	//Home
	document.write('<div class="navparent"><a href="./Index.html">Home</a></div>\n');
	if(this.m_page == "home"){
		document.write('<div class="navchild"><a href="#about">About</a></div>\n');
		document.write('<div class="navchild"><a href="#features">Features</a></div>\n');
		document.write('<div class="navchild"><a href="#requirements">Requirements</a></div>\n');
		document.write('<div class="navchild"><a href="#news">News</a></div>\n');
	}
	//Downloads
	document.write('<div class="navparent"><a href="./Downloads.htm">Downloads</a></div>\n');
	if(this.m_page == "downloads"){
		document.write('<div class="navchild"><a href="#fullinstall">Full Installer</a></div>\n');
		document.write('<div class="navchild"><a href="#liteinstall">Upgrade Installer</a></div>\n');
		document.write('<div class="navchild"><a href="#beta">Beta</a></div>\n');
	}
	//Register
	document.write('<div class="navparent"><a href="./Register.htm">Register</a></div>\n');
	//Support
	document.write('<div class="navparent"><a href="./Support.htm">Support</a></div>\n');
	//End navigation sidebar
	document.write('</div>\n');
}

function DisplayNewsSidebar()
{
	//Display the news sidebar box
	document.write('<div class="sidebar" style="LEFT: 5px; POSITION: absolute; TOP: 250px; HEIGHT: 150px">\n');
	document.write('<div class="header">News</div>\n');
	//Display news items
	for(i = (news_header.length - 1); i >= 0; i--)
	{
		NewsItem(news_header[i], i);
	}
	//End news sidebar sidebar
	document.write('</div>\n');
}

function DisplayAwardsSidebar()
{
	//Display award sidebar
	document.write('<div class="sidebar" style="LEFT: 5px; POSITION: absolute; TOP: 420px; HEIGHT: 280px; TEXT-ALIGN: center">\n');
	document.write('<div class="header">Awards</div>\n');
	//Display awards
	document.write('<a href="http://www.filetransit.com/" target="_blank"><IMG class="spaced" alt="Filetransit 5 star rating" src="http://www.ezvideosplicer.com/pictures/5star.gif"></a>\n');
	document.write('<a href="http://www.topshareware.com" target="_blank"><IMG class="spaced" alt="Topshareware 5 star rating" src="http://www.ezvideosplicer.com/pictures/cup_5.gif"></a>\n');
	document.write('<a href="http://www.golddownload.com" target="_blank"><IMG class="spaced" alt="BrotherSoft 5 star rating" src="http://www.ezvideosplicer.com/pictures/BrotherSoft_Rating5.gif"></a><br>\n');
	//End awards sidebar
	document.write('</div>\n');
}

function DisplayLinksSidebar()
{
	//Display links sidebar
	document.write('<div class="sidebar" style = "POSITION: absolute; LEFT: 5px; TOP: 900px; HEIGHT: 350px; TEXT-ALIGN: center">\n');
	document.write('<div class="header">Links</div>\n');
	//Display links
	document.write('<br><a href="http://www.digital-digest.com" target="_blank"><img class="spaced" alt="Digital Digest" src="./pictures/Digital_Digest.gif"/></a>');
	document.write('<br><a href="http://www.divx.com/divx/" target="_blank"><IMG class="spaced"  alt="http://www.divx.com/divx/" src="./pictures/downloaddivx_blk.gif"></a>');
	document.write('<br><a href="http://www.povray.org" target="_blank"><img class="spaced" src="./pictures/povnow_c.gif" alt="POV-Ray"></a>');
	document.write('<br><a href="http://www.gimp.org/" target="_blank"><img class="spaced" alt="GIMP - Free" src="http://www.gimp.org/images/gimp_free_button.png" border="0" width="88" height="31" /></a>');
	document.write('<br><a href="http://www.blender.org/" target="_blank"><img class="spaced" alt="Download Blender Now" src="./pictures/blender.jpg"></a>');
	document.write('<br><a href="http://security.kolla.de/" target="_blank"><img class="spaced" src="./pictures/spybotsd-120x34.gif" width="120" height="34" border="0" alt="Fight spyware with SpybotSD"></a>');
	//End links sidebar
	document.write('</div>\n');
}

function DisplayAffiliatesSidebar()
{
	//Display links sidebar
	document.write('<div class="sidebar" style = "POSITION: absolute; LEFT: 5px; TOP: 720px; HEIGHT: 160px; TEXT-ALIGN: center">\n');
	document.write('<div class="header">Affiliates</div>\n');
	//Display links
	//Opera browser
	document.write('<a href="https://secure.bmtmicro.com/ShoppingCart/00310/buy-opera.html?AID=814588"><img src="http://promote.opera.com/banners/opera/windows/ow-get-00-en-mic.gif" alt="[Buy Opera!]" width="88" height="31" style="margin-top: 10px;"></a>\n');
	//WindowBlinds
	document.write('<br><a href="https://store.stardock.com/prodDescription.asp?PRODUCT_ID=ESD-SDS-W073&REFERER=bbillade" target="_blank"><img style="margin-top: 10px;" alt="Windowblinds" src="./pictures/button_wb.gif"</a>');
	//Firefox browser
	document.write('<br><a href="http://www.spreadfirefox.com/?q=affiliates&amp;id=29727&amp;t=61" target="_blank"><img style="margin-top: 10px" border="0" alt="Get Firefox!" title="Get Firefox!" src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/110x32/trust.gif"/></a>');
	//End links sidebar
	document.write('</div>\n');
}

/*Sidebar class
	"page" specifies what page the sidebar is being displayed on
	"page" should be one of the following:
	'home', 'downloads', 'purchase', 'support'
*/
function Sidebar(page)		 
{
	this.m_page = page;
	this.DisplayNavigationSidebar = DisplayNavigationSidebar;
	this.DisplayNewsSidebar = DisplayNewsSidebar;
	this.DisplayAwardsSidebar = DisplayAwardsSidebar;
	this.DisplayLinksSidebar = DisplayLinksSidebar;
	this.DisplayAffiliatesSidebar = DisplayAffiliatesSidebar;
}

function DisplayFooter()
{
	//Create a box for displaying footer
	document.write('<br><div class="footer" style="TOP: 100%; MARGIN-TOP: 100px" >');
	//Text
	document.write('<p>This site was tested to work with Microsoft Internet Explorer 6.0, Mozilla Firefox 1.0PR, and Opera 7.x</p>');
	document.write('<p>Best viewed at 800x600 or greater resolution</p>');
	//Close footer
	document.write('</div>');
}