function walkover(pValue, pInput) {
    //alert("name " + pValue.name + " checked: " + pValue.checked);
    var pObj = document.forms['updateTabForm'];

    //disable gf/ga
    if (pValue.checked == true) {
        pObj[pInput + "GF"].disabled = true;
        pObj[pInput + "GA"].disabled = true;
    } else {
        pObj[pInput + "GF"].disabled = false;
        pObj[pInput + "GA"].disabled = false;
    }
    
    
    if (pValue.name.indexOf("walkfor") >= 0) {
        //alert("for");
        if (pValue.checked == true) {
            pObj[pInput + "walkagainst"].disabled = true;
        } else {
            pObj[pInput + "walkagainst"].disabled = false;
        }
    } else {
    //alert("against");
        if (pValue.checked == true) {
            pObj[pInput + "walkfor"].disabled = true;
        } else {
            pObj[pInput + "walkfor"].disabled = false;
        }
        
    }
    //alert("pObj " + pObj + " pInput " + pInput);
    //pObj[pInput].focus(); //ie8 fix, need to move focus
}

function changeLink(vlink, vtype) {
	var varlink = document.getElementById(vlink);
	if (vtype == 'on') {
		varlink.className = 'cMenuOn';
	} else {	
		varlink.className = 'cMenuOff';
	}
}

function getRealLeft(el) {
    xPos = el.offsetLeft;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function getRealTop(el) {
    yPos = el.offsetTop;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        yPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return yPos;
}

function showObj(obj)
{
	if (bTypeNs) {
		var pObj = (NN4) ? document[obj] : document.getElementById(obj).style;
	} else {
		var pObj = document.all[obj].style;
	}
	pObj.visibility = VISIBLE;
}

 
function hideObj(obj)
{
 if (bTypeNs) {
  var pObj = (NN4) ? document[obj] : document.getElementById(obj).style;
 } else {
  var pObj = document.all[obj].style;
 }
 pObj.visibility = HIDDEN;
}

function moveObj(obj,oLeft,oTop)
{
	if (bTypeNs) {
		var pObj = (NN4) ? document[obj] : document.getElementById(obj).style;
	} else {
		var pObj = document.all[obj].style;
	}
	//alert("object+"+pObj.left +" "+ pObj.top);
	//alert(oLeft +" "+oTop);
	pObj.left = oLeft+'px';
	pObj.top = oTop+'px';
    //alert("object+"+pObj.left +" "+ pObj.top);	
}

// determine browser version
var bTypeNs = (navigator.appName=="Netscape" && parseInt(navigator.appVersion) >= 4);
var NN4 = false;
var NN6 = false;
var IE4 = false;
if (bTypeNs) {
 if (parseInt(navigator.appVersion) < 5) {
  NN4 = true;
 } else {
  NN6 = true;
 }
} else {IE4 = true;}
 
// determine platform
var isMac = navigator.appVersion.indexOf('Mac') > 0 ? 1 : 0 ;
 
// setup defaults
var HIDDEN = (NN4) ? 'hide' : 'hidden';
var VISIBLE = (NN4) ? 'show' : 'visible';
var navVersion = parseInt(navigator.appVersion);

var popUpWin=0;


function popUpReport(reportid, popupurl) {
    URLStr = popupurl + reportid;
    if (popUpWin) {
        if (!popUpWin.closed) popUpWin.close();
    }
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1,copyhistory=yes,width=800,height=550,left=0, top=0,screenX=0,screenY=0');
}

function NewWindow(path)
{
  URLStr = path;
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1,copyhistory=yes,width=750,height=500,left=0, top=0,screenX=0,screenY=0');
}


