<!--
	function openwindow(ID) {
		window.open("CustomerEditor.aspx?nid=" + ID ,"CustomerEditor","menubar=no,scrollbars=yes,resizeable=yes,toolbar=no,status=no");
	}
	
	function openWrkExp(ID) {
		window.open("EditWrkExp.aspx?WrkExpID=" + ID, null,"height=320, width=510,status=no,toolbar=no,menubar=no,location=no,left=180, top=115, screenX=180, screenY=115, locationbar=no, scrollbars=no,resizable=no");
	}
	
	function openEdu(ID) {
		window.open("EditEdu.aspx?EduID=" + ID, null,"height=320, width=510,status=no,toolbar=no,menubar=no,location=no,left=180, top=115, screenX=180, screenY=115, locationbar=no, scrollbars=no,resizable=no");
	}

	function ClearTextbox(cID, cText) 
	{
		var txtControl = document.getElementById(cID);
		if (txtControl.value == cText)  {txtControl.value = "";}
	}
	function popup(url, windowname, width, height) {

		var wname = "";
		if (windowname == "")
		{
			wname = "_blank";
		}
		else
		{
			wname = windowname;
		}
		if (width == 0 && height == 0)
		{
			window.open(url, wname, "width=350,height=400,menubar=no,scrollbars=yes,resize=yes,toolbar=no,status=yes");
			
		}
		else
		{
			window.open(url, wname, "width=" + width +",height=" + height + "menubar=no,scrollbars=yes,resize=yes,toolbar=no,status=yes");
		}
		
	}

	var time_field_length = 0;
	function TabNext(obj, event, len, next_field)
	{
		if (event == "down")
		{
			time_field_length = obj.value.length;
		}
		else if(event == "up")
		{
			if(obj.value.length != time_field_length)
			{
				time_field_length = obj.value.length;
				if(time_field_length == len)
				{
					next_field.focus();
				}
			}
		}
	}	
		
	// Start Visibility Toggle
	
	var hotspots = document.getElementsByName('hotspot');
	var toggles = document.getElementsByName('toggle');

	function visibilitytoggle()
	{
		for (var i = 0; i < hotspots.length; i++)
		{
			hotspots[i].someProperty = i;
			hotspots[i].onclick = function() {toggle(this.someProperty)};
		}

		for (var i = 0; i < toggles.length; i++)
		{
			toggles[i].style.display = 'none';
		}
	}

	function toggle(i)
	{
		if (toggles[i].style.display == 'none')
		{
			toggles[i].style.display = ''
		}
		else
			toggles[i].style.display = 'none'
		} 

	function showall()
	{
		for (var i = 0; i < toggles.length; i++)
		{
			toggles[i].style.display = '';
		}
	}

	function hideall()
	{
		for (var i = 0; i < toggles.length; i++)
		{
			toggles[i].style.display = 'none';
		}
	}
	
	// End Visibility Toggle
	
	function allowNumbersOnly(ctrl)
	{
		var txtEntry = ctrl.value;
		
		if (txtEntry.length < 1){
			return;
		}
		
		var strMostRecentCharacter = txtEntry.substring(txtEntry.length - 1, txtEntry.length);
		if (IsNumeric(strMostRecentCharacter) == false) {
			txtEntry = txtEntry.substring(0, txtEntry.length - 1);
			ctrl.value = txtEntry;
			return;
		}
	}
	
	function IsNumeric(sText)
	{
		var ValidChars = "0123456789";
		var IsNumber=true;
		var Char;
			
		for (i = 0; i < sText.length && IsNumber == true; i++) 
		{ 
			Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) == -1) 
			{
				IsNumber = false;
			}
		}
		return IsNumber;
	}

	function clickButton(e, buttonid)
	{ 
		var bt = document.getElementById(buttonid); 
		if (typeof bt == 'object')
		{ 
			if(navigator.appName.indexOf("Netscape")>(-1))
			{ 
				if (e.keyCode == 13)
				{ 
					bt.click(); 
					return false; 
				} 
			}
			if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
			{ 
				if (event.keyCode == 13)
				{ 
					bt.click(); 
					return false; 
				} 
			} 
		} 
	}
	
show=false;
snow =true;    // false-rain;   true-snow
//snowsym = "<img src='Images/SnowFlake_10.gif' />"    // Image snowflakes
snowsym ="*"    //Standard Flake
rainsym = "' ,    ' .  ' ,    '  ."  //You can put images here.
howmany = 25     //How many drops/snowflakes?

/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}
else{sym = rainsym; speed=5; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;

function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex;  yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}
	
// -->
function createSilverlight()
{
	var controlID = "SilverlightControl";
	Silverlight.createObjectEx({
		source: "Scene.xaml",
		parentElement: document.getElementById("silverlightControlHost"),
		id: controlID,
		properties: {
			width: "100%",
			height: "100%",
			version: "1.0"
		},
		events: {
			onError: function(sender, args) {
				var errorDiv = document.getElementById("errorLocation");
				if (errorDiv != null) {
					var errorText = args.errorType + "- " + args.errorMessage;
							
					if (args.ErrorType == "ParserError") {
						errorText += "<br>File: " + args.xamlFile;
						errorText += ", line " + args.lineNumber;
						errorText += " character " + args.charPosition;
					}
					else if (args.ErrorType == "RuntimeError") {
						errorText += "<br>line " + args.lineNumber;
						errorText += " character " +  args.charPosition;
					}
					errorDiv.innerHTML = errorText;
				}	
			}
		}
	});
	
	// Give the keyboard focus to the Silverlight control by default
	window.onload = function() {
		var silverlightControl = document.getElementById(controlID);
		if (silverlightControl)
			silverlightControl.focus();
	}
}
function createSilverlight2()
{
	var controlID = "SilverlightControl2";
	Silverlight.createObjectEx({
		source: "Page.xaml",
		parentElement: document.getElementById("silverlightControlHost2"),
		id: controlID,
		properties: {
			width: '100%',
			height: '100%',
			isWindowless: 'false',
			version: '1.0'			
		},
		events: {
			onError: function(sender, args) {
				var errorDiv = document.getElementById("errorLocation");
				if (errorDiv != null) {
					var errorText = args.errorType + "- " + args.errorMessage;
							
					if (args.ErrorType == "ParserError") {
						errorText += "<br>File: " + args.xamlFile;
						errorText += ", line " + args.lineNumber;
						errorText += " character " + args.charPosition;
					}
					else if (args.ErrorType == "RuntimeError") {
						errorText += "<br>line " + args.lineNumber;
						errorText += " character " +  args.charPosition;
					}
					errorDiv.innerHTML = errorText;
				}	
			}
		}
	});
	
	// Give the keyboard focus to the Silverlight control by default
	window.onload = function() {
		var silverlightControl = document.getElementById(controlID);
		if (silverlightControl)
			silverlightControl.focus();
	}
}

function createSilverlight3()
{
	var controlID = "SilverlightControl3";
	Silverlight.createObjectEx({
		source: "RightNav.xaml",
		parentElement: document.getElementById("silverlightControlHost3"),
		id: controlID,
		properties: {
			width: "100%",
			height: "100%",
			version: "1.0"
		},
		events: {
			onError: function(sender, args) {
				var errorDiv = document.getElementById("errorLocation");
				if (errorDiv != null) {
					var errorText = args.errorType + "- " + args.errorMessage;
							
					if (args.ErrorType == "ParserError") {
						errorText += "<br>File: " + args.xamlFile;
						errorText += ", line " + args.lineNumber;
						errorText += " character " + args.charPosition;
					}
					else if (args.ErrorType == "RuntimeError") {
						errorText += "<br>line " + args.lineNumber;
						errorText += " character " +  args.charPosition;
					}
					errorDiv.innerHTML = errorText;
				}	
			}
		}
	});
	
	// Give the keyboard focus to the Silverlight control by default
	window.onload = function() {
		var silverlightControl = document.getElementById(controlID);
		if (silverlightControl)
			silverlightControl.focus();
	}
}
