
<!--
/////TAB FUNCTION
//	To use, simply place the following on a page, where
//	"Startnum" is the number of the tab to load as active.
//	Then on html tabs call with doTab(n) etc.
//
//	doTab(startnum);



///WRITES THE INFO TO THE IFRAME IN THE POPUP
function doExtra() {
	var info = document.getElementById('lyrShare').innerHTML;
	var strHTML = '<h2><a href="javascript:closeExtra()">Close Instructor Info</a></h2>';
	strHTML += info;

	parent.writeLayer('EXTRA',strHTML)
	parent.showLayerBlock('EXTRA','block')
	parent.showLayerBlock('CONT3','none')
}


function closeExtra() {
	showLayerBlock('EXTRA','none')
	writeLayer('EXTRA','')
	showLayerBlock('CONT3','block')
}

if (document.images) 
{
    arrow = new Image();
    arrow.src = "../Common/Images/arrow_up.gif";
    arrowb = new Image();
    arrowb.src = "../Common/Images/arrow_down.gif";
}
	
function doTab(index) {
	var isTab = returnLayer('lyrTab');
	var isTabAV = returnLayer('lyrTabAV');
	
	if (isTab) 
	{
	    el = document.getElementById("lyrTab");
		var tabs = el.childNodes;
	}
	
	if (isTabAV) 
	{
	    el = document.getElementById("lyrTabAV");
		var tabs = el.childNodes;
	}
	
	if (isTab || isTabAV)
	{
    	var isExtra = returnLayer('EXTRA');
	    if (isExtra)
	    {
	        closeExtra();
	    }
	
	    for (var i = 1; i <= (tabs.length+1) / 2; i++)
	    {
	        if (i == index)
	        {
			    showLayerBlock('CONT'+i,'block');
			    swapClass('tab'+i,'tabon');
			    swapImg('arrow'+i,'arrowb');
	        }
	        else
	        {
			    showLayerBlock('CONT'+i,'');
    			swapClass('tab'+i,'tab');
	    		swapImg('arrow'+i,'arrow');
	        }
	    }
    }
}


//////HELP FUNCTION
mouseX = 0;
mouseY = 0;

//check stylesheet to make sure this is set correctly

var helpwidth = 300;

function showHelp(id) {
	  var width = getwindowWidth()-helpwidth;
	  var scrollheight = getscrollY();

		showLayer('help' + id,'visible','');
		moveLayer('help' + id,mouseX-helpwidth,mouseY+scrollheight);
	  
}
function hideHelp(id) {
		showLayer('help' + id,'hidden','');
	}
	

function setup() {
	startMouseCapture();
}

document.onmouseover = setup;


/////////POPUP
function popUp(url, name, width, height, toolbar) {

  var windowh = parent.getwindowHeight()
  var windoww = parent.getwindowWidth()
  var screenx = parent.getscreenX()
  var screeny = parent.getscreenY()
  var screenw = parent.getscreenWidth()
  
  newposx = screenw - width - 15 //scrollbars;
  newposy = 0;


  var str = 'width=' + width + ',';
  str += 'height=' + height + ',';
  str += 'top=' + newposy + ',';
  str += 'left=' + newposx + ',';
  str += 'scrollbars=1,';
  if (toolbar) {
  str += 'toolbar=1'
  }
  return window.open(url, name, str);
}


var sAction;
var sTarget;
var newWin;

function submitForm(sAction,sTarget,toolbar) {
		
	if (!sTarget) {
	document.forms[0].target = parent.window.name;
	}
	
	///POPUP
	if (sTarget == '1'){
	popWin = popUp('', newWin, 750, 500, toolbar);
	document.forms[0].target = newWin;
	if (popWin) popWin.focus();
	}
	
	///IFRAME
	if (sTarget == '2') {
	document.forms[0].target = 'ifrInfo';
	}
	
	///PARENT	
	if (sTarget == '3') {
	document.forms[0].target = window.opener.name;
	}
	
	///PARENT + CLOSE WINDOW	
	if (sTarget == '4') {
	document.forms[0].target = window.opener.name;
	self.close();
	}

	
	if (sAction != '') {
		document.forms[0].action = sAction;
		document.forms[0].submit();
	}
	
}


function submitFormDemo (sAction,sTarget,toolbar) {
	d = document.forms.frmDemo;
	popWin = popUp('', newWin, 750, 500, toolbar);
	d.target = newWin;
	if (popWin) popWin.focus();
	d.action = sAction;
	d.submit();
}



///////BLOCK FUNCTION

function showBlockOld(which)
	{
	  alert(which);
		if (isExp)
		{
			current = (document.all[which].style.display == 'block') ? 'none' : 'block';
			document.all[which].style.display = current;
		}
		
		else if (isW3C)
		{
			current = (document.getElementById(which).style.display == 'block') ? 'none' : 'block';
			document.getElementById(which).style.display = current;
		}
	}
	
 function showBlock(which)
	{
		if (isExp)
		{
			current = eval('document.'+pre+which+suf+'.display') == 'block' ? 'none' : 'block';
			eval ('document.'+pre+which+suf+'.display="'+current+'"');
		}
		else if (isW3C)
		{
			current = (document.getElementById(which).style.display == 'block') ? 'none' : 'block';
			document.getElementById(SCellid).style.display = current;
		}
	}
	
 function showFAQBlock(which)
	{
	   var SCellid = 'ctl00_CPHContent_' + which;
		if (isExp)
		{
			current = (document.all[SCellid].style.display == 'block') ? 'none' : 'block';
			document.all[SCellid].style.display = current;
		}
		
		else if (isW3C)
		{
			current = (document.getElementById(SCellid).style.display == 'block') ? 'none' : 'block';
			document.getElementById(SCellid).style.display = current;
		}
	}








//-->
