﻿function newWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
 
function newWindowQuick(theURL, myWidth, myHeight) { 
	var winName = "newWindowQuick"
	var isCenter = 'true'
	var features = 'toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes'
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function logOut() {
	bodyTags = document.getElementsByTagName("body");
	bodyTags[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	var agree = confirm("Are you sure you wish to logout?");
	if (agree) {
	   return true;	
	} else {
		bodyTags[0].style.filter = "";
		return false;
	}
}
 
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function toggleElementDisplay(theElementID) {
	var theElement = document.getElementById(theElementID);	
	var displayStyle = theElement.style.display
	if (displayStyle == '') {
		theElement.style.display = "none";
	} else {
		theElement.style.display = "";
	}
}

var doIt = true;

function blinkText(ele) {
    var styleVal = document.getElementById(ele).style.color;
    if (doIt) {
        document.getElementById(ele).style.color = '#66FF33';
        doIt = false;
    }
    else {
        document.getElementById(ele).style.color = 'white';
        doIt = true;
    }
}

document.write('<img align="right" width="1" height="1" src="/images/log_analysis_screen_info.jpg?width=' + screen.width + '&height=' + screen.height + '&depth=' + screen.colorDepth + '">\n');

