function Get_Cookie(name)
{
	var start = document.cookie.indexOf(name + "=");
	var len = start + name.length + 1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null;
	var end = document.cookie.indexOf(";",len);
	if (end == -1) end = document.cookie.length;
	return document.cookie.substring(len,end);
}
function Delete_Cookie(name, path, domain) {
	if (Get_Cookie(name)) {
		document.cookie = name + "="+((path) ? ";path="+path : "")+((domain) ? ";domain="+domain : "")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";
	}
}
function setCookie( name, value, expires, path, domain, secure ) 
{
var today = new Date();
today.setTime( today.getTime() );

if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" + escape(value) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

//var graphicColor = Get_Cookie('styleset');
/*var graphicColor = '0'
if ( graphicColor ){
	var StyleFile = "setup" + graphicColor + ".css";
	document.writeln('<link rel="stylesheet" type="text/css" href="/css/' + StyleFile + '">');
	setCookie('defaultColor', '', '365', '/', '', '');
}
else {
	document.writeln('<link rel="stylesheet" type="text/css" href="/css/setup0.css">');
	setCookie('styleset', '0', '365', '/', '', '');
	setCookie('defaultColor', '0x0067C3', '365', '/', '', '');
	setCookie('lineColor', '0067C3', '365', '/', '', '');
}*/
document.writeln('<link rel="stylesheet" type="text/css" href="http://www.advancedaccess.com/css/setup0.css">');
setCookie('styleset', '0', '365', '/', '', '');
setCookie('defaultColor', '0x0067C3', '365', '/', '', '');
setCookie('lineColor', '0067C3', '365', '/', '', '');

/*function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
// Firefox page link fix
(function resizeDiv(){
	var cc = Get_Cookie('styleset');
	if( cc == 'v0' || cc == 'v2'){
		document.getElementById('topNav').style.height = '600px';
	}
*/
function downsizeDiv(){
	var cc = Get_Cookie('styleset');
	if( cc == 'v0' || cc == 'v2'){
		document.getElementById('topNav').style.height = '40px';
	}
}


document.writeln('<link rel="shortcut icon" href="/logo_browser.ico">');

var lcolor = String("0067c3");
document.writeln('<style>');
document.writeln('#Footer, #Footer2 {');
document.writeln('background-attachment: scroll;');
document.writeln('background-repeat: repeat-x;');
document.writeln('background-position: left top;');
document.writeln('background-image: url(http://www.advancedaccess.com/images/' + lcolor + '.gif);');
document.writeln('}');
document.writeln('#banner {');
document.writeln('border-top-color: #' + lcolor + ';');
document.writeln('}');
document.writeln('h1 {');
document.writeln('color: #' + lcolor + ';');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('font-weight: bold;');
document.writeln('font-size: 18pt;');
document.writeln('margin-top: 0px;');
document.writeln('margin-bottom: 0px;');
document.writeln('}');
document.writeln('h2 {');
document.writeln('color: #' + lcolor + ';');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('font-weight: bold;');
document.writeln('font-size: 12pt;');
document.writeln('margin-top: 0px;');
document.writeln('margin-bottom: 0px;');
document.writeln('}');
document.writeln('h3 {');
document.writeln('color: #' + lcolor + ';');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('font-weight: bold;');
document.writeln('font-size: 10pt;');
document.writeln('margin-top: 0px;');
document.writeln('margin-bottom: 0px;');
document.writeln('}');
document.writeln('b {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('hr {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('select {');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('}');
document.writeln('strong {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('.boldText {');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('a:link {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('a:visited {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('a:active {');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('#Advanced_Access_Logo {');
document.writeln('background: url(http://www.advancedaccess.com/images/aa'+lcolor+'.gif) no-repeat left top;');
document.writeln('}');
document.writeln('#Web_Hosting {');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('font-size: 9pt;');
document.writeln('font-weight: bold;');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('.boldText {');
document.writeln('font-family: Arial, Helvetica, sans-serif;');
document.writeln('font-weight: bold;');
document.writeln('color: #'+lcolor+';');
document.writeln('}');
document.writeln('#Mid_Line {');
document.writeln('border-top-color: #'+lcolor+';');
document.writeln('}');
if(Get_Cookie('styleset') == 'v2'){
	document.writeln('body {');
	document.writeln('background-color: #'+lcolor+';');
	document.writeln('}');
}
document.writeln('</style>');
// Modified 062306
function topNavSet(){
	if(document.getElementById('topNav')){
		downsizeDiv();
		clearInterval(doit);
	}
}
var doit = setInterval(topNavSet, 0);