<!--
function MacIE(){
    browser = navigator.appName;
    platform = navigator.platform;
    if (browser == "Microsoft Internet Explorer" && platform == "MacPPC") {
	return(true);
    }
}

function PCIE(){
    browser = navigator.appName;
    platform = navigator.platform;
    if (browser == "Microsoft Internet Explorer" && platform != "MacPPC") {
	return(true);
    }
}

function opera(){
    if(navigator.userAgent.indexOf('Opera') != -1	){
	return(true);
    }
}

function setStyle(strRelPath){
    var IE_Mac=MacIE();
    var IE_PC=PCIE();
    var isOpera=opera();
    var strBrowser = "NonIE"
	
    var X = screen.width;
    var Y = screen.height;
    var strStyle ='<link rel="stylesheet" href="'+strRelPath+'/' ;

    if(IE_Mac==true || IE_PC==true){
	strBrowser="IE";
    }

    if(isOpera==true){
	strBrowser="NonIE";
    }

    strStyle=strStyle+strBrowser;

    if (X != 800){
	strStyle=strStyle+"1024";
    } else {
    	strStyle=strStyle+"800";
    }

    strStyle=strStyle+'.css" type="text/css" />';
    document.write(strStyle);
}

function InsertStdPageHeader(strRelPath, strHeader, intColSpan){
    document.write('<tr>');
    document.write('<td class="StdPageTitleBox" colspan="'+intColSpan+'">');
    document.write(strHeader);
    document.write('</td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td class="StdPageUnderlineBox" colspan="'+intColSpan+'">');
    document.write('<img class="StdPageLine" src="'+strRelPath+'/images/System/Lines/YellowLine.gif">');
    document.write('</td>');
    document.write('</tr>');
}

function autoIframe(containerId,frameId,intAdjust){
	try{
		hght=document.getElementById(containerId).offsetHeight - (intAdjust);
		frame = document.getElementById(frameId);

		objToResize = (frame.style) ? frame.style : frame;
		objToResize.height = hght;
	}
	catch(err){
		window.status = err.message;
	}
}

/* BEGIN: [Ordinal Number Format v.1 :: Author: Addam Driver :: Date: 10/5/2008 ]
    ** Disclaimer:  Use at your own risk, copyright Addam Driver 2008  
    ** Example on calling this function:
    ** ordinal(this, {subScript: true});
    ** The Ordinal script will append the proper ordinal to any number like: 1st, 2nd, 33rd, etc.
    ** If you pass the "subScript:true" option, then it will use the html subscript for the new ordinal
*/
function ordinal(num, options){		
    var options = options || {}; // setup the options
    var sScript = options.sScript; // get subscript if needed
    
    var mod1 = num%100; // get the divided "remainder" of 100
    var mod2 = num%10; // get the divided "remainder" of 10
    var ord; // ste the ordinal variable
    
    if((mod1-mod2) == 10){ // capture 10
        ord = "th"; // set the oridnal to th as in: 10th
    }else{// for everything else
        switch(mod2){  // check the remainder of the 10th place
            case 1: // if 1 as in 1st
                ord = "st"; // set the ordinal
            break;
            case 2: // if 2 as in 2nd
                ord = "nd";// set the ordinal
            break;
            case 3: // if 3 as in 3rd
                ord = "rd";// set the ordinal
            break;
            default: // for everything else
                ord = "th";// set the ordinal
            break;
        }
    }
    switch(sScript){
        case "sub":
            return num+"<sub>"+ord+"<\/sub>";	// put the ordinal in the HTML sub script
        break;
        case "sup":
            return num+"<sup>"+ord+"<\/sup>";	// put the ordinal in the HTML super script
        break;
        default:
            return num+ord;
        break;
    }	
}

function prepareStaticTabs() {
	var stuffToTab = document.getElementById("StaticTabs");
	if (! stuffToTab) { return false; };
	stuffToTab.style.display = "none";
	document.getElementById("dynamic_wrapper").style.display = "block";
	/* somehow the absolute positioning broke IE6 */
	var menuHTML = '<div id="menuhead"></div>\n';
	for (i=0;i<stuffToTab.getElementsByTagName("div").length;i++){
		var tabItem = stuffToTab.getElementsByTagName("div")[i];
		var tabTitle = 'Part ' + (i+1);
		if (tabItem.getElementsByTagName("h2")[0]){
			tabTitle = tabItem.getElementsByTagName("h2")[0].firstChild.data;
		};
		menuHTML += '<p><a href="#" onclick="showStaticTab(\'';
		menuHTML += i +'\'); return false;">'+ tabTitle +'</a></p>\n';
	};
	menuHTML += '<div id="menufoot">&nbsp;</div>\n';

	var myMenu = document.getElementById("menu");
	myMenu.style.display="block";
	setClass(myMenu,'menu_on');

	var myView = document.getElementById("view");
	myView.style.display="block";

	document.getElementById("menu").innerHTML = menuHTML;
	showStaticTab(0);
};

function showStaticTab(someInteger){
	var stuffToTab = document.getElementById("StaticTabs");
	var tabItem = stuffToTab.getElementsByTagName("div")[someInteger];
	if(! tabItem) { return false; };
	document.getElementById("view").innerHTML = tabItem.innerHTML; 
	var myMenu = document.getElementById("menu");

	for(var i=0;i<myMenu.getElementsByTagName("a").length;i++){
		if (myMenu.getElementsByTagName("a")[i].getAttribute('class') && myMenu.getElementsByTagName("a")[i].getAttribute('class') != 'handsoff') {
			setClass(myMenu.getElementsByTagName("a")[i],'off');
		};
		if(i == someInteger){
			setClass(myMenu.getElementsByTagName("a")[i],'on');
		};
	};

	for(var i=0;i<myMenu.getElementsByTagName("p").length;i++){
		setClass(myMenu.getElementsByTagName("p")[i],'off');
		if(i == someInteger){
			setClass(myMenu.getElementsByTagName("p")[i],'on');
		};
	};
};

function setClass(obj,className){
	obj.setAttribute('class',className);
	obj.className = className;
};

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

-->
