/* [FOOTER] START */
function Footer_inc(chk)
{
	if (!(chk == 1))
	{
		document.write("<div id=D1 style='Z-INDEX: 1; POSITION: absolute; visibility: visible;'>");
		document.write("	<a href='javascript:GoTop();'><img src='images/button_top.gif' border='0'></a>");
		document.write("</div>");
		MovePosition();
	}
}
/* [FOOTER] END */

/* RIGHT TOP BUTTON START */
function GoTop()
{
	window.scrollTo(0,0);
}

function CheckUIElements()
{
	var chk_i;
	var yMenu1From, yMenu1To, yOffset, timeoutNextCheck;
	var wndWidth = parseInt(document.body.clientWidth);
	yMenu1From = parseInt (D1.style.top, 10);
	yMenu1To = document.body.scrollTop + 350; 
	timeoutNextCheck = 500;

	if ( yMenu1From != yMenu1To )
	{
		yOffset = Math.ceil( Math.abs( yMenu1To - yMenu1From ) / 20 );

		if ( yMenu1To < yMenu1From )
		{
			yOffset = -yOffset;
		}

		if ((yOffset > 0) && ((parseInt (D1.style.top, 10)) < (chk_vlue=document.body.scrollHeight - (150))))
		{
			D1.style.top = parseInt (D1.style.top, 10) + yOffset;
		}

		else if ((yOffset < 0) && ((parseInt (D1.style.top, 10)) > 400))
		{
			D1.style.top = parseInt (D1.style.top, 10) + yOffset;
		}
		
		timeoutNextCheck = 10;
	}
	D1.style.left = 590;  
	setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function MovePosition()
{
	var wndWidth = parseInt(document.body.clientWidth);
	
	D1.style.top = document.body.scrollTop + 400;
	D1.style.left = 590;
	D1.style.visibility = "visible";
	
	CheckUIElements();
	
	return true;
}
/* RIGHT TOP BUTTON END */


/* POPOUTS FOR TAKE COURSE AND DEMO COURSE START */
function aniViewer01(url_loc)
{
	mini1 = window.open(url_loc, 'aniViewer', 'width='+'500'+',height='+'500'+',marginwidth=10,marginheight=0,border=0,scrollbars=no,resizable=yes');
}

function aniViewer02(url_loc)
{
	mini1 = window.open(url_loc, 'aniViewer', 'width='+'992'+',height='+'647'+',marginwidth=10,marginheight=0,border=0,scrollbars=no,resizable=yes');
}

function aniViewer03(url_loc)
{
	mini1 = window.open(url_loc, 'aniViewer', 'width='+'924'+',height='+'668'+',marginwidth=10,marginheight=0,border=0,scrollbars=yes,resizable=yes');
}

/* POPOUTS FOR TAKE COURSE AND DEMO COURSE END */

/* DUMBASS 'ALARM' FUNCTION START */
function alarm()
{
	alert("Please contact us at (734) 478-2615 or dharkins(@)mdcontent.com.     ");
}
/* DUMBASS 'ALARM' FUNCTION END */
