var arrPreload = [];

function init() {
  arrAnchors = document.getElementsByTagName("a");
  for(i=0;i<arrAnchors.length;i++) {
    arrAnchors[i].onfocus = new Function("if(this.blur) this.blur()");
	if(arrAnchors[i].rel=="rollover") {
	  arrAnchors[i].onmouseover = new Function("doRollOver(this)");
	  arrAnchors[i].onmouseout = new Function("doRollOut(this)");
	  arrAnchors[i].rollImg = arrAnchors[i].getElementsByTagName("img")[0];
	  arrAnchors[i].outSrc = arrAnchors[i].rollImg.src;
	  arrAnchors[i].overSrc = arrAnchors[i].outSrc.replace("_0.","_1.");
	  preLoad(arrAnchors[i].overSrc);
	}
	if(arrAnchors[i].rel=="new") {
	  arrAnchors[i].target = "_blank";
	}
  }
}

function preLoad() {
  for(j=0;j<arguments.length;j++) {
    intTemp = arrPreload.length;
	arrPreload[intTemp] = new Image();
	arrPreload[intTemp].src = arguments[j];
  }
}

function doRollOver(tmpObj) {
  tmpObj.rollImg.src = tmpObj.overSrc;
}

function doRollOut(tmpObj) {
  tmpObj.rollImg.src = tmpObj.outSrc;
}

function openWin(strURL,intWidth,intHeight,strParams) {
  if(strParams!=null) {
    strParams = ","+strParams;
  }
  var popWin = window.open(strURL,"popup","width="+intWidth+",height="+intHeight+strParams);
}