// Copyright 2003-2009 Michael Woods and Spectrum IT Consulting, LLC.  All rights reserved worldwide.



function DisableSelfReference(
) {
	var objElement;
	var objTagsA;

	objTagsA = document.all.tags("a");
	for (var i = 0; i < objTagsA.length; i++) {
		 objElement = objTagsA[i];
		if (objElement.href == document.location) { // document.URL has backslashes
			objElement.removeAttribute("href");
//			objElement.href = null;
		}
	}
}
function WatermarkLogoResize(
	i_strImage  // The id of the element
) {
return;
	i_objImage = document.getElementById(i_strImage);
	i_objImage.style.height = (i_objImage.style.width = document.body.clientWidth - 25 * 2);
	i_objImage.style.left = 25;
	i_objImage.style.top = document.all.tags('hr')[0].offsetTop + document.all.tags('hr')[0].offsetHeight + 25;
}
function WatermarkLogoFadeIn(
	i_strImage,    // The id of the element
	i_dblPercent,  // Optional.  The percent for each step
	i_lngSpeed     // Optional.  The speed to step at
) {
return;
	opacity(i_strImage, 0, 100, i_lngSpeed * 100);
}
//	<body OnLoad="FadeIn(Image1);">
//		Watch the logo fade in:<br/>
//		<img name="Image1" src="logo.gif" width="500" height="500" border="0" style="filter:alpha(opacity = 0); z-index:1;"/>
//	</body>



// Begin from "Cross-browser BlendTrans Filter JavaScript" (http://brainerror.net/scripts/javascript/blendtrans/).
function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}
// End from "Cross-browser BlendTrans Filter JavaScript" (http://brainerror.net/scripts/javascript/blendtrans/).



// Pads a number with the zeros passed in
function Format(
	i_lngNumber,
	i_strFormat
) {
	return Right(i_strFormat + i_lngNumber, i_strFormat.length);
}



function Right(
	i_strString,
	i_n
) {
	return i_strString.substr(i_strString.length - i_n);
}



function TimerContinue(
	i_objElement
) {
	if (!i_objElement.datStart) { // If paused
		i_objElement.datStart = (new Date) - i_objElement.lngMilliseconds;
	}
}
function TimerPause(
	i_objElement
) {
	if (i_objElement.datStart) { // If running
		i_objElement.lngMilliseconds = (new Date) - i_objElement.datStart;
		i_objElement.datStart = null;
	}
	TimerShow(i_objElement);
}
function TimerReset(
	i_objElement
) {
	i_objElement.datStart = null;
	i_objElement.lngMilliseconds = 0;
	TimerShow(i_objElement);
}
function TimerShow(
	i_objElement
) {
	if (DisplayTimer.checked) {
		i_objElement.innerHTML = "<span title=\"Hours\">" + Math.floor(i_objElement.lngMilliseconds / 3600000) + ":</span><span title=\"Minutes\">" + Format(Math.floor((i_objElement.lngMilliseconds % 3600000) / 60000), "00") + ":</span><span title=\"Seconds\">" + Format(Math.floor((i_objElement.lngMilliseconds % 60000) / 1000), "00") + (i_objElement.intResolution <= 0 ? "</span>" : ":</span><span style=\"font-size:18pt;\" title=\"" + i_objElement.strResolution + "\">" + (new String(10000 + (i_objElement.lngMilliseconds % 1000))).substr(2, i_objElement.intResolution) + "</span>"); // {hours}:{minutes}:{seconds}:{milliseconds}
	}
	else {
		i_objElement.innerHTML = "<span title=\"Hours\">" + Math.floor(i_objElement.lngMilliseconds / 3600000) + ":</span><span title=\"Minutes\">" + Format(Math.floor((i_objElement.lngMilliseconds % 3600000) / 60000), "00") + "'</span><span title=\"Seconds\">" + Format(Math.floor((i_objElement.lngMilliseconds % 60000) / 1000), "00") + "\"</span><span style=\"font-size:18pt;\" title=\"" + i_objElement.strResolution + "\">" + (new String(10000 + (i_objElement.lngMilliseconds % 1000))).substr(2, i_objElement.intResolution) + "</span>"; // {hours}:{minutes}'{seconds}"{hundredths-of-a-second}
	}
}
function TimerTick(
	i_objElement
) {
	if (i_objElement.datStart) { // If running
		i_objElement.lngMilliseconds = (new Date) - i_objElement.datStart;
		TimerShow(i_objElement);
//window.status=i_objElement.lngSpeed - (i_objElement.lngMilliseconds % i_objElement.lngSpeed)
		setTimeout("TimerTick(" + i_objElement.id + ")", i_objElement.lngSpeed - (i_objElement.lngMilliseconds % i_objElement.lngSpeed));
	}
}
//	<body onload="TimerReset(Timer1);">
//		<table align="center" bgcolor="gray" border="10">
//			<tbody>
//				<tr>
//					<td id="Timer1" bgcolor="black" colspan="4" style="text-align:center; color:#ff0000; font-family:Lucida Console,Lucida Sans Unicode,Arial Black,LCD,Sans Serif; font-size:24pt;" intResolution="1" lngSpeed="100">
//					</td>
//				</tr>
//				<tr>
//					<td>
//						<input type="button" title="Start (Alt+S or Cmd+S)" value="Start" accesskey="S" onclick="if (!Timer1.datStart) {TimerReset(Timer1); TimerContinue(Timer1); TimerTick(Timer1);} else {TimerReset(Timer1); TimerContinue(Timer1);}"/>
//					</td>
//					<td>
//						<input type="submit" title="Continue (Alt+C or Cmd+C)" value="Continue" accesskey="C" onclick="if (!Timer1.datStart) {TimerContinue(Timer1); TimerTick(Timer1);}"/>
//					</td>
//					<td>
//						<input type="button" title="Pause (Alt+P or Cmd+P)" value="Pause" accesskey="P" onclick="TimerPause(Timer1);"/>
//					</td>
//					<td>
//						<input type="button" title="Reset (Alt+R or Cmd+R)" value="Reset" accesskey="R" onclick="TimerReset(Timer1);"/>
//					</td>
//				</tr>
//				<tr>
//					<td colspan="2" valign="top">
//						<font size="-1">
//							<span title="Display Style"><optgroup label="Display Style">Style</span><br/>
//								<span title="Timer (Alt+; or Cmd+;)" onclick="TimerShow(Timer1);"><input name="Display" id="DisplayTimer" type="radio" accesskey=";" checked>0:00:00:000</input></span><br/>
//								<span title="Stopwatch (Alt+' or Cmd+')" onclick="TimerShow(Timer1);"><input name="Display" id="DisplayStopwatch" type="radio" accesskey="'">0:00'00"000</input></span>
//							</optgroup>
//						</font>
//					</td>
//					<td colspan="2" valign="top">
//						<font size="-1">
//							<optgroup label="Display Resolution"><span title="Display Resolution">Resolution</span><br/>
//								<span title="Seconds (Alt+0 or Cmd+0)" onclick="Timer1.intResolution = '0'; Timer1.lngSpeed = '1000'; TimerShow(Timer1);"><input name="DisplayResolution" id="DisplayResolution0" type="radio" accesskey="0">1</input></span><br/>
//								<span title="Tenths of a second (Alt+1 or Cmd+1)" onclick="Timer1.intResolution = '1'; Timer1.lngSpeed = '100'; TimerShow(Timer1);"><input name="DisplayResolution" id="DisplayResolution1" type="radio" accesskey="1" checked>1/10</input></span><br/>
//								<span title="Hundredths of a second (Alt+2 or Cmd+2)" onclick="Timer1.intResolution = '2'; Timer1.lngSpeed = '10'; TimerShow(Timer1);"><input name="DisplayResolution" id="DisplayResolution2" type="radio" accesskey="2">1/100</input></span><br/>
//								<span title="Thousandths of a second (Alt+3 or Cmd+3)" onclick="Timer1.intResolution = '3'; Timer1.lngSpeed = '1'; TimerShow(Timer1);"><input name="DisplayResolution" id="DisplayResolution3" type="radio" accesskey="3">1/1000</input></span>
//							</optgroup>
//						</font>
//					</td>
//				</tr>
//			</tbody>
//		</table>
//	</body>



function Typematic(
	i_objElement // The element that will receive the text
) {
	if (!i_objElement.booInitialized) {
		i_objElement.value = ""; // Clear old because Refresh (F5) does not restore the original value
		if (!i_objElement.strText) i_objElement.strText = "Hello, world!";
		if (!i_objElement.lngSpeed) i_objElement.lngSpeed = 100;
		i_objElement.lngIndex = 0;
		i_objElement.booInitialized = true;
	}
	if (i_objElement.lngIndex < i_objElement.strText.length) {
		i_objElement.value += i_objElement.strText.charAt(i_objElement.lngIndex++);
		setTimeout("Typematic(" + i_objElement.name + ");", i_objElement.lngSpeed);
	}
}
//<body onload="Typematic(TextArea1);">
//<p class="Figure">
//	<textarea name="TextArea1" rows="4" cols="10" strText="a b c d ef g h i j k l m n o p q r s t u v w x y z" lngSpeed="50"></textarea>
//</p>
//<p class="Caption">Figure 1:&nbsp; Computer Typematic</p>



//Expires: Thu, 01 Dec 1994 16:00:00 GMT
//Expires: 0
//Cache-Control: 1#must-revalidate
