﻿var pTestimonials, pFeatures;

function Setw700PageItems() {
    WireUpNavigationEvents();

    GetObject("Laptop_Left_Icon").addEventListener("MouseLeftButtonDown", function() { SelectedHighlightedLaptop('Left'); });
	GetObject("Laptop_Right_Icon").addEventListener("MouseLeftButtonDown", function() { SelectedHighlightedLaptop('Right'); });
	GetObject("Laptop_Front_Icon").addEventListener("MouseLeftButtonDown", function() { SelectedHighlightedLaptop('Front'); });
    GetObject("HighLight_Crosshair_Front_0").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Front', 0); });
	GetObject("HighLight_Crosshair_Front_1").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Front', 1); });
	GetObject("HighLight_Crosshair_Front_2").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Front', 2); });
	GetObject("HighLight_Crosshair_Left_0").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Left', 0); });
	GetObject("HighLight_Crosshair_Left_1").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Left', 1); });
	GetObject("HighLight_Crosshair_Right_0").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Right', 0); });
	GetObject("HighLight_Crosshair_Right_1").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Right', 1); });
	GetObject("HighLight_Crosshair_Right_2").addEventListener("MouseEnter", function() { DisplayHighlightText('in', 'Right', 2); });
	GetObject("HighLight_Crosshair_Front_0").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Front', 0); });
	GetObject("HighLight_Crosshair_Front_1").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Front', 1); });
	GetObject("HighLight_Crosshair_Front_2").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Front', 2); });
	GetObject("HighLight_Crosshair_Left_0").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Left', 0); });
	GetObject("HighLight_Crosshair_Left_1").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Left', 1); });
	GetObject("HighLight_Crosshair_Right_0").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Right', 0); });
	GetObject("HighLight_Crosshair_Right_1").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Right', 1); });
	GetObject("HighLight_Crosshair_Right_2").addEventListener("MouseLeave", function() { DisplayHighlightText('out', 'Right', 2); });

	var award = GetObject("HighLight_Award_Front_0");
	var awardOver = GetObject("HighLight_Award_Front_0_ovr");

	award.addEventListener("MouseEnter", function() { if (_HighlightedLaptop == 'Front') { award["Opacity"] = 0; awardOver["Opacity"] = 1; award["Cursor"] = "Hand"; } });
	award.addEventListener("MouseLeave", function() { if (_HighlightedLaptop == 'Front') { award["Opacity"] = 1; awardOver["Opacity"] = 0; award["Cursor"] = "Arrow"; } });
	award.addEventListener("MouseLeftButtonDown", function() { if (_HighlightedLaptop == 'Front') { window.open('http://www.pdngearguide.com/gearguide/content_display/reviews/e3i8a7ba6d185c56a440af305d2c682a56f'); } });
    
    var sbSpecs = new ScrollBar();
	sbSpecs.SetCanvas('Specs_SlideCanvas');
	sbSpecs.SetContent('Spec_Text_English');
	sbSpecs.SetNotch('Specs_BioScrollThumb');
	sbSpecs.SetTrack('Specs_BioScrollTrack');
	sbSpecs.SetScrollOffset(355);
	
	var sbTestimonials = new ScrollBar();
	sbTestimonials.SetCanvas('Testimonials_SlideCanvas');
	sbTestimonials.SetContent('Testimonials_Text');
	sbTestimonials.SetNotch('Testimonials_BioScrollThumb');
	sbTestimonials.SetTrack('Testimonials_BioScrollTrack');
	sbTestimonials.SetScrollOffset(90);

    SetAnimatedLink("Testimonials_IOIWeb", "Testimonials_IOIWeb_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.microsoft.com/prophoto/icons/borges/bio.aspx");
	SetAnimatedLink("Testimonials_PortfolioWeb", "Testimonials_PortfolioWeb_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.philborges.com/");

	GetObject("Testimonials_ReadFullBioButton").addEventListener("MouseLeftButtonDown", function() { window.open('http://www.microsoft.com/prophoto/icons/borges/bio.aspx'); }); 

	var sbNews = new ScrollBar();
	sbNews.SetCanvas('News_SlideCanvas');
	sbNews.SetContent('News_Text');
	sbNews.SetNotch('News_BioScrollThumb');
	sbNews.SetTrack('News_BioScrollTrack');
	sbNews.SetScrollOffset(355);

	SetAnimatedLink("news_resourcelinks_1", "news_resourcelinks_1_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.digitalphotopro.com/news/lenovo-releases-new-mobile-workstation.html");
	SetAnimatedLink("news_resourcelinks_2", "news_resourcelinks_2_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.dpreview.com/news/0808/08081204thinkpad.asp");
	SetAnimatedLink("news_resourcelinks_3", "news_resourcelinks_3_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://blog.nikonians.org/archives/2008/08/lenovo_thinkpad.html");
	SetAnimatedLink("news_resourcelinks_4", "news_resourcelinks_4_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.pcphotomag.com/news--previews/gear/lenovo-releases-new-mobile-workstation.html");
	SetAnimatedLink("news_resourcelinks_5", "news_resourcelinks_5_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.pdnonline.com/pdn/prodtech/news/article_display.jsp?vnu_content_id=1003837951");
	SetAnimatedLink("news_resourcelinks_6", "news_resourcelinks_6_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.photoreporter.com/article.asp?issueID=&amp;num=&amp;vol=&amp;articleType=n&amp;articleID=2385");
	SetAnimatedLink("news_resourcelinks_7", "news_resourcelinks_7_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", "http://www.robgalbraith.com/bins/content_page.asp?cid=7-9314-9557");

	GetObject("news_rss_button").addEventListener("MouseLeftButtonDown", function() { window.open('press_release.xml'); });

	SetAnimatedLink("features_resourcelinks_0", "features_resourcelinks_0_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", function() { ApplyStoryboard("sb_FadeIn_Excert", "features_excert_0", function() { pFeatures.FeatureVideo(0); }); });
	SetAnimatedLink("features_resourcelinks_1", "features_resourcelinks_1_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", function() { ApplyStoryboard("sb_FadeIn_Excert", "features_excert_1", function() { pFeatures.FeatureVideo(1); }); });
	SetAnimatedLink("features_resourcelinks_2", "features_resourcelinks_2_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", function() { ApplyStoryboard("sb_FadeIn_Excert", "features_excert_2", function() { pFeatures.FeatureVideo(2); }); });
	SetAnimatedLink("features_resourcelinks_3", "features_resourcelinks_3_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", function() { ApplyStoryboard("sb_FadeIn_Excert", "features_excert_3", function() { pFeatures.FeatureVideo(3); }); });
	SetAnimatedLink("features_resourcelinks_4", "features_resourcelinks_4_ovr", "sb_QuickFadeIn_Links", "sb_QuickFadeOut_Links", function() { ApplyStoryboard("sb_FadeIn_Excert", "features_excert_4", function() { pFeatures.FeatureVideo(4); }); });

    ApplyStoryboard("sb_FadeIn_Excert", "features_excert_0", function() { });
    
	pTestimonials = new Presentation('pTestimonials');
	pTestimonials.SetImageSize(76, 49);
	pTestimonials.SetMainCanvas('Testimonials_VidImgDisplayCanvas');
	pTestimonials.SetElementsCanvas('Testimonials_ElementsCanvas');
	pTestimonials.SetVideoBarCanvas('Testimonials_MovieControlsCanvas');
	pTestimonials.SetBackToMovieCanvas('Testimonials_BackToMovieCanvas');
	pTestimonials.SetVideoButtonHighlight('Testimonials_HighlightButton');
	pTestimonials.AddVideo({ 'source': 'videos/philborgesvid.wmv' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.1.png', 'source': 'images/w700/testimonials.image.1.png' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.2.png', 'source': 'images/w700/testimonials.image.2.png' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.3.png', 'source': 'images/w700/testimonials.image.3.png' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.4.png', 'source': 'images/w700/testimonials.image.4.png' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.5.png', 'source': 'images/w700/testimonials.image.5.png' });
	pTestimonials.AddImage({ 'thumb': 'images/w700/testimonials.imageicon.6.png', 'source': 'images/w700/testimonials.image.6.png' });
	pTestimonials.Init();

	pFeatures = new Presentation('pFeatures');
	pFeatures.SetVideoSize(76, 49);
	pFeatures.SetMainCanvas('Features_VidImgDisplayCanvas');
	pFeatures.SetElementsCanvas('Features_ElementsCanvas');
	pFeatures.SetVideoBarCanvas('Features_MovieControlsCanvas');
	pFeatures.SetVideoButtonHighlight('Features_HighlightButton');
	pFeatures.AddVideo({ 'thumb': 'images/w700/features.imageicon.1.png', 'source': 'videos/features.vid.1.wmv' });
	pFeatures.AddVideo({ 'thumb': 'images/w700/features.imageicon.2.png', 'source': 'videos/features.vid.2.wmv' });
	pFeatures.AddVideo({ 'thumb': 'images/w700/features.imageicon.3.png', 'source': 'videos/features.vid.3.wmv' });
	pFeatures.AddVideo({ 'thumb': 'images/w700/features.imageicon.4.png', 'source': 'videos/features.vid.4.wmv' });
	pFeatures.AddVideo({ 'thumb': 'images/w700/features.imageicon.5.png', 'source': 'videos/features.vid.5.wmv' });
	pFeatures.Init();
	
	_HighlightedLaptop = '';
	SelectedHighlightedLaptop('Front');
}
