//Gets the NS6fix cookie.  If cookies are off causes display of error message
// '../../00resources/ssi/NS6nocookie_msg.incl'
function QF_GetNS6fix(a) { //v1.7 by PVII 'P7_getCSS'
  var i=0,j=0,e=0,theSheet="";
  a=a+"=",t="<",u="LINK";
  var alen=a.length,clen=document.cookie.length;
  while (i < clen) {
   j=i+alen;
   if(document.cookie.substring(i,j)==a) {
     e = document.cookie.indexOf(";",j);
     if (e==-1) {e=clen}
     theSheet = unescape(document.cookie.substring(j,e));
     document.write(t+u+' rel="stylesheet" type="text/css" href="' + theSheet + '">');
     break;}
   else {i=document.cookie.indexOf(" ",i)+1;
     if (i==0) break; } }
}
QF_GetNS6fix('QF_NS6fix');

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function popcenter(center, top, left, height, width, name, winName) {

var LeftPos;
var TopPos;

if(center)
	{
	if ((screen.height - height) > 0)
		{
		TopPos = (screen.height - height)/2;

		}
		else
		{
		TopPos = 0;
		}
	if ((screen.width - width) > 0)
		{
		LeftPos = (screen.width - width)/2;
		}
		else
		{
		LeftPos = 0;
		}
	}
else
	{
	if ((screen.height - height) > 0)
		{
		TopPos = top;
		}
		else
		{
		TopPos = 0;
		}
	if ((screen.width - width) > 0)
		{
		LeftPos = left;
		}
		else
		{
		LeftPos = 0;
		}
	}

  popupWin = window.open(name, winName,'menubar=0,status=1,toolbar=0,location=0,resizable=1,scrollbars=0,width=' + width +',height=' + height  +',top= ' + TopPos + ',left= ' + LeftPos)
  popupWin.focus()
}

//pops center WITH nav bar. FOR NS6 ONLY THIS FUNCTION IS SAME AS POPCENTER, AND DOES NOT ADD NAVBAR
//DUE TO INCOMPATIBILITY WITH AOL 10.2.1 MAC WHICH SNIFFS AS NS7
function popcenterNAV(center, top, left, height, width, name, winName) {

var LeftPos;
var TopPos;

if(center)
	{
	if ((screen.height - height) > 0)
		{
		TopPos = (screen.height - height)/2;

		}
		else
		{
		TopPos = 0;
		}
	if ((screen.width - width) > 0)
		{
		LeftPos = (screen.width - width)/2;
		}
		else
		{
		LeftPos = 0;
		}
	}
else
	{
	if ((screen.height - height) > 0)
		{
		TopPos = top;
		}
		else
		{
		TopPos = 0;
		}
	if ((screen.width - width) > 0)
		{
		LeftPos = left;
		}
		else
		{
		LeftPos = 0;
		}
	}

  popupWin = window.open(name, winName,'menubar=0,status=1,toolbar=0,location=0,resizable=1,scrollbars=0,width=' + width +',height=' + height  +',top= ' + TopPos + ',left= ' + LeftPos)
  popupWin.focus()
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
