//////////////////////////////////////////////////////////////////////////////
// HYPERLINKS
//////////////////////////////////////////////////////////////////////////////

//add hyperlinks to hyperlink_clicked() function as new "if" statements
//hyperlink_clicked() represents ALL links throughout the entire lesson and can contain hyperlinks from multiple topics

//how to use:
/* 	In Blend/XAML, create or copy a rectangle in a layer over the text you wish to create as a link
	Name the rectangle something like "hyperlink03"
	Add "MouseLeftButtonDown = hyperlink_clicked" to XAML rectangle (see sample text/graphic page in lesson)
	Add reference to new hyperlink in hyperlink_clicked() function below as new "if" statement*/

function hyperlink_clicked (sender){
	if (sender.Name == "hyperlink01"){	//name of hyperlink object in XAML
		popupWin = window.open('http://go.microsoft.com/fwlink/?LinkId=110871');
	}
	if (sender.Name == "hyperlink02"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=148169');
	}
	if (sender.Name == "hyperlink03"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=144132');
	}
	if (sender.Name == "hyperlink04"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=148170');
	}
	if (sender.Name == "hyperlink05"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=148702');
	}
	if (sender.Name == "hyperlink06"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=148528');
	}
	if (sender.Name == "hyperlink07"){
		popUpWin = window.open('http://www.microsoft.com/windowsserver2008/default.mspx');
	}
	if (sender.Name == "hyperlink08"){
		popUpWin = window.open('http://learning.microsoft.com/manager/LearningPlanV2.aspx?resourceId=%7b0586a8c0-6880-11dc-8314-0800200c9a66%7d&clang=en-US');
	}
	if (sender.Name == "hyperlink09"){
		popUpWin = window.open('http://go.microsoft.com/fwlink/?LinkId=110682');
	}
	if (sender.Name == "silverlight_button"){
		popUpWin = window.open('http://www.silverlight.net');
	}
	//example of new link
	if (sender.Name == "hyperlinkObjectName"){			//replace "hyperlinkObjectName" with the name of the hyperlink object in the XAML
		popUpWin = window.open('http://www.yourlink.com');	//replace 'http://www.yourlink.com' with the URL of the hyperlink to open
	}
}


//global hyperlink functions
function hyperlink_rollOver (sender){
	//sender.Opacity = ".5";
	sender.Opacity = ".2";
}
function hyperlink_rollOut (sender){
	//sender.Opacity = ".2";
	sender.Opacity = "0";
}