function AdjustMenuHeight() {
var MenuHeight=document.getElementById("mainmenu").clientHeight;
var contentHeight=document.getElementById("content").clientHeight;
var intMargin=(contentHeight-MenuHeight)+75;

//	if (document.getElementById("content").clientHeight>700){
//		document.getElementById("content_wrapper").style.height=document.getElementById("content").clientHeight+'px';	
//	}
	if (navigator.appName!='Microsoft Internet Explorer'){
		if (MenuHeight>contentHeight){
			document.getElementById("content_wrapper").style.height=MenuHeight+'px';
		}
		if (contentHeight>MenuHeight){
			document.getElementById("content_wrapper").style.height=contentHeight+'px';
		}		
	}	
	if (contentHeight>MenuHeight){
		if (document.getElementById("PoweredDiv")!=null) {
			document.getElementById("PoweredDiv").style.marginTop=intMargin+'px';
		}
	}			
}

function checkPassword() {
var x=window.prompt("Enter Link Code");
	if (x=='bob7') {
		window.location.href='ftp://ftp.cbtdirect.com';
	}
	else {
		return false;
	}
	
}

function DemoButton() {
	var TheButton;
	var FormName = 'smallForm';
	var Course;
	var Catagory;

	TheButton = '<div id="smallForm">\
				<a href="#">\
				<img onclick="ShowsmallForm();" style="float:right;" id="Image" src="/images/DemoButton.gif" width="90" height="80" />\
				</a>\
				<div id="sForm">\
				<b>TO VIEW DEMO </b><br><b>Please Turn Off Popup Blockers</b><br><i>CBT customers</i> <br> or <i>returning guests;</i><br><br> <b>1.</b> Enter Email address <br><b>or</b> <br> <b>2.</b> Invoice Number<br><br><i> New visitors</i> register now.\
				<form action="/process/lookup_user.asp" method="post" name="register" id="register">\
				<div class="req"><label for="Email">Email</label><br><input type="text" id="Email" name="Email" size="15" maxlength="100" /></div>\
				<div class="req"><label for="Invoice">Invoice Nbr</label><input type="text" id="Invoice" name="Invoice" size="15" maxlength="20" /></div><br>\
				<input type="hidden" id="enroll" value="' + Course + '" name="enroll" size="15" maxlength="20" />\
				<input type="hidden" id="Action" value="Demo" name="Action" size="15" maxlength="20" />\
				<input type="hidden" name="Catagory" value="' + Catagory + '">\
				<input type="hidden" id="FromForm" value="' + Course + '" name="FromForm" size="15" maxlength="20" />\
				<input type="hidden" id="BackPage" value="' + window.location + '"  name="BackPage" size="15" maxlength="20" />\
				<input type="submit" name="ccSubmit" id="submit" value="Register Now!" />\
				</form>\
				</div>\
				</div>';
	document.write(TheButton);
}

function getScrollXY() {
	var scrOfX = 0, scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
	//Netscape compliant
	scrOfY = window.pageYOffset;
	scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	//DOM compliant
	scrOfY = document.body.scrollTop;
	scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	//IE6 standards compliant mode
	scrOfY = document.documentElement.scrollTop;
	scrOfX = document.documentElement.scrollLeft;
	}
	scrOfY=scrOfY+200;
	//return [ scrOfX, scrOfY ];
	return [scrOfY];
}

function MaintainState()  {
	setTimeout('RefreshPage()', 1100000);
}
function RefreshPage() {
	location.reload(true);
}
function ShowPricePopup() {
	document.getElementById("PricePopup").style.visibility='visible';
	document.getElementById("State").style.visibility='hidden';
	document.getElementById("country").style.visibility='hidden';
	document.getElementById("CourseSection").style.visibility='hidden';
}
function HidePricePopup() {
	document.getElementById("PricePopup").style.visibility='hidden';
	document.getElementById("State").style.visibility='visible';
	document.getElementById("country").style.visibility='visible';
	document.getElementById("CourseSection").style.visibility='visible';
}
function PageOffset() {
	document.getElementById('ChatPopup').style.top = getScrollXY();
	if (document.getElementById('ChatPopup').style.visibility != 'visible') {
		setTimeout('PageOffset()', 100);
	}
}
function PopUpChat() {
	if (getCookie("ChatPopUp") != 'True') {
		if (document.getElementById('ServerHour').value >= 8 && document.getElementById('ServerHour').value <= 18) {
			document.getElementById('ChatPopup').style.visibility = 'visible';
			document.getElementById('ChatPopup').style.left = (screen.width/2)-75;
		} else {
			setTimeout('PopUpChat()', 180000);
		}
	}
}
function CloseChatPopUp() {
	document.getElementById('ChatPopup').style.visibility = 'hidden';
	setCookie("ChatPopUp", "True");
	return false;
}

function mmLoadMenus() {

}

function MM_showMenu() {

}

function MM_startTimeout(){

}
function SystemReq() {
	var SysReq;
	
	SysReq = '<div id="SystemReq"><p><b>Recommended System Requirements:</b></p>\
				<ul>\
				<li>Intel® Pentium® 166 MHz processor or greater</li>\
				<li>64 MB RAM minimum, 128 MB recommended</li>\
				<li>Minimum video resolution of 800x600, with 16-bit color </li>\
				<li>Internet Connection</li>\
				<li>Connection speed of 40 Kbps minimum, 56 Kbps recommended</li>\
				<li>Windows® 95, 98, 2000, NT or XP</li>\
				<li>Valid Email address</li>\
				<li>Supported browser versions: Internet Explorer (5x - 6x), Netscape Communicator 4.7  - 7.2</li>\
				<li>Allow cookies</li>\
				<p><b>Java Runtime Support</b></p>\
				<li>Microsoft JVM is supported with Microsoft Internet Explorer 4.x and greater</li>\
				<p><b>Web Accessibility Support</b></p>\
				<li>Supports JAWS screen reader software, versions 3.7u, 4.0, and 4.50</li>\
				<li>JAWS 3.7u and Jaws 4.0 require 256 color resolution</li>\
				</ul></div>';
	document.write(SysReq);
}

function ITSwap(ImageName, ImageId)
{
	document[ImageName].src = '/images/' + ImageId;
}	
function BSwap(ImageName, ImageId)
{
	document[ImageName].src = '/images/business/' + ImageId;
}
function DefHeaderSwap(ImageName, ImageId)
{
	document[ImageName].src = '/images/DefaultHeader/' + ImageId;
}	
	
function callbutton() {
	var callb;
	
	callb = '<div id="callbutton">\
				<p><a href="/demos/default.asp"><img style=" float: right; padding-left: 8px" src="/images/MoreInfo-Button.gif" width="95px" height="30px"></a>\
				Please <b>call</b> one of our Training Advisors at <b style="color: #131DA1"><font size="4">1-877-872-4646</font></b> to discuss this <br>Boot \
				Camp or click the <b>More Info button</b> to receive more detailed information.</p>\
				</div>';
	document.write(callb);
}
function ShowLarge(ImageName)
{
	document.getElementById(ImageName).style.visibility = "visible";
}
function HideLarge(ImageName)
{
	document.getElementById(ImageName).style.visibility = "hidden";
}
function SwapCatalog (DivName, CatName)
{
	document.getElementById(DivName).innerHTML = CatName;
	document.getElementById(DivName).style.border='1px solid black';
}
function SwapDivCatalog (DivName, DivId)
{
	document.getElementById(DivName).innerHTML = document.getElementById(DivId).innerHTML;
	document.getElementById(DivName).style.border='1px solid black';
	//AdjustMenuHeight();
}

function mentoring() {
	var ment;
	
	ment = '<div id="mentoring">\
<p><font color="#000000"><b>The chart below indicates what mentoring services are available.</b></font></p>\
				</div>';
	document.write(ment);
}
function mentoringch() {
	var mentch;
	
	mentch = '<div id="mentoringch">\
	<p><font color="#000000"><b>Chart definitions:</b></font></p>\
	<p><b><u>24x7</u></b><br>\
	Live Chat available 24x7.<br>\
	Email My Mentor included with a guaranteed 6 hour response time.<br>\
    Daily E-mail with select courses; requires student activation.<br>\
    Test Prep if available.</p>\
	<p><b><u>9-5</u></b><br>\
	Live Chat available 9-5 EST M-F.<br>\
	Email My Mentor included with a guaranteed 6 hour response time between 9-5 EST M-F, <br>otherwise within 24 hours.<br>\
    Daily E-mail with select courses; requires student activation.<br>\
    Test Prep if available.</p>\
	<p><b><u>Tier 3</u></b><br>\
	No live chat.<br>\
	Email Support with a guaranteed 24 hour response time.<br>\
	Daily E-mail with select courses; requires student activation.<br>\
	Test Prep if available.</p>\
	<p><a href="/online-training/it-training/mentoring.asp">Click to see a detailed description of the mentoring services.</a></p>\
				</div>';
	document.write(mentch);
}
function detailedcourse() {
	var detail;
	
	detail = '<div id="detailedcourse">\
	<p><b><font size="3" color="#000000">Click on the link(s) to view curriculum outline.</font></b></p>\
				</div>';
	document.write(detail);
}

