// Browser check
IS_DOM = (document.getElementById) ? true : false;
IS_IE = (document.all) ? true : false;
IS_IE50 = (navigator.userAgent.indexOf("IE 5.0") != -1);
IS_Mac = (navigator.appVersion.indexOf("Mac") != -1);
IS_IE5Mac = IS_IE && IS_Mac && IS_DOM;

/* General Site Functions */
function imgOn(imgName) {
  if (IS_DOM) {
    document.getElementById(imgName).src = eval(imgName + "on.src");
  }
}
  
function imgOff(imgName) {
  if (IS_DOM) {
    document.getElementById(imgName).src = eval(imgName + "off.src");
  }
}


function OpenWindow(sPath, iHeight, iWidth ) {
  var winName = "newWind" + Math.round(Math.random() * 9999999);
  window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars=no,resizable=no,top=20,left=20')
  }

// image swapper
function changeImages() 
{
  if (document.getElementById) {
    for (var i = 0; i < changeImages.arguments.length; i += 2) { 
  		document.getElementById(changeImages.arguments[i]).src = eval(changeImages.arguments[i + 1] + ".src"); 
	}
  }
}

// old functions which may be needed on some pages

function setPointer(theRow, thePointerColor,thefontcolor) {
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }

    var row_cells_cnt = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;
		theRow.cells[c].style.cssText='font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: '+thefontcolor+'; text-decoration: none;cursor: hand;';

    }

    return true;
}

function MM_goToURL() {
	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_findObj(n, d) {
  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;
}
