var j;
var jprint;
var x;
var y;
var g;
var z;
var h;
var rr;
//---------------- PLATFORM DETECT --------------//

navigator.OS = '';
var platform;
platform = window.navigator.platform.toLowerCase();
if (platform.indexOf('win') != -1) {
      navigator.OS = 'win';
} else if (platform.indexOf('mac') != -1) {
      navigator.OS = 'mac';
}


//---------------- Print Page --------------//
function printPg(whichPg) {
//var j;
	//strip string
	
	whichPgSt = new String(whichPg);
	
	// search for a #
	for (var i = 0; i < whichPgSt.length; i++) {
	   	if (location.href.charAt(i) == "#") {
		   whichPgSt = whichPgSt.slice(0,i);
		}
	}
	slicedWhichPg = whichPgSt.slice(0,whichPgSt.length-5);
	whichPgP = new String("P.html");
	printPage = slicedWhichPg.concat(whichPgP);
	document.write('<br /><a title="Opens a printable version of the page in a new browser window" href="javascript:void(0);" onclick="printOpenedPage(\''+printPage+'\');">print</a>');
}
function printOpenedPage(printPage) {
//var j;
	if ((navigator.userAgent.indexOf("Mac") != -1) && (navigator.appName.indexOf("Microsoft") != -1)) {
			//This is the Mac IE window
		printwinop(printPage);
		
	} else {
		printwinop(printPage);
		window.jprint.print();
	}
}
//---------------- Print Page --------------//
//---------------- glossary Page --------------//
function winopGloss(url) {
var j;
if (j && !j.closed) {

  //j.close();

  }

j=window.open(url,'winnew','resizable,width=350,height=120,top=60,left=60,scrollbars=yes,menubar=no,toolbar=no,status=no');

j.focus();

}
//---------------- glossary Page --------------//
//---------------- Acronyms Page --------------//
function winopAcro(url) {
var n;
if (n && !n.closed) {

  //j.close();

  }

n=window.open(url,'nwinnew','resizable,width=450,height=200,top=60,left=60,scrollbars=yes,menubar=no,toolbar=no,status=no');

n.focus();

}
//---------------- Acronyms Page --------------//
//---------------- SiteMapOpen Page --------------//
function winopSiteMapOpen(url) {
	var m;
	if (m && !m.closed) {
	
	  //j.close();
	
	  }
	
	m=window.open(url,'mwinnew','resizable,width=580,height=400,top=100,left=100,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');
	
	m.focus();

}
//---------------- SiteMapOpen Page --------------//
//---------------- SiteMapClose Page --------------//
function winopSiteMapClose(myUrl) {
	window.opener.location=myUrl;
	window.self.close();
}
//---------------- SiteMapClose Page --------------//
//---------------- Footnote --------------//
function winopfootnote(url) {
	var j;
	if (j && !j.closed) {
	
	  //j.close();
	
	  }
	
	j=window.open(url,'winnew','resizable,width=250,height=80,top=60,left=60,scrollbars=yes,menubar=no,toolbar=no,status=no');
	
	j.focus();

}

//---------------- Win Op --------------//
function popupwinop(url) {
var j;
if (j && !j.closed) {

 // j.close();

  }

j=window.open(url,'externalLink','resizable,width=760,height=350,top=40,left=40,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}


function winop(url) {
//var j;
if (j && !j.closed) {

  //j.close();

  }

j=window.open(url,'winnew','resizable,width=760,height=350,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}
function printwinop(url) {
//var j;
if (jprint && !jprint.closed) {

  //j.close();

  }

jprint=window.open(url,'printwinnew','resizable,width=760,height=350,top=50,left=50,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

jprint.focus();

}
function winoptopic(url) {
var j;
if (j && !j.closed) {

  //j.close();

  }

j=window.open(url,'winnewTopic','resizable,width=760,height=350,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}




function winopsection(url) {
var j;
if (j && !j.closed) {

  //j.close();

  }

j=window.open(url,'winnewSectionA','resizable,width=760,height=350,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}

function winop687(url) {

if (j && !j.closed) {

  j.close();

  }

j=window.open(url,'winnew','resizable,width=760,height=350,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}


function winopb(url) {

if (j && !j.closed) {

  j.close();

  }

j=window.open(url,'winnew','resizable,width=760,height=350,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}
function winopb2(url) {

if (z && !z.closed) {

  z.close();

  }

z=window.open(url,'winnewz','resizable,width=760,height=450,top=70,left=70,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

z.focus();

}

function winopclear(url) {

if (y && !y.closed) {

  y.close();

  }

y=window.open(url,'winnewy','resizable,width=760,height=514,top=25,left=25,scrollbars=yes,menubar=no,toolbar=no,status=no');

y.focus();

}
function winop400(url) {

if (j && !j.closed) {

  j.close();

  }

j=window.open(url,'winnew','resizable,width=440,height=440,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=yes,status=yes');

j.focus();

}

function winop4by3(url) {

if (x && !x.closed) {

  x.close();

  }

x=window.open(url,'winnew','resizable,width=400,height=300,top=20,left=20,scrollbars=yes,menubar=yes,toolbar=no,status=yes,location=no');

x.focus();

}
function winopg(url) {

if (g && !g.closed) {

  g.close();

  }

g=window.open(url,'glossary','resizable,width=450,height=500,scrollbars=yes,menubar=yes,toolbar=no,status=yes,location=no');

g.focus();

}
function winopo(url) {

if (h && !h.closed) {

  h.close();

  }

h=window.open(url,'activity','resizable,width=650,height=500,scrollbars=yes,menubar=yes,toolbar=yes,status=yes,location=no');

h.focus();

}
function winopr(url) {

if (rr && !rr.closed) {

  rr.close();

  }

rr=window.open(url,'resources','resizable,width=750,height=500,scrollbars=yes,menubar=yes,toolbar=yes,status=yes,location=no');

rr.focus();

}




