<!--

var color1out = null;
var color2out = null;
function chgColor(rowNum) {
 thisRow = "row" + rowNum;
 var color = ((rowNum)%2)+1;
 if (color==1) {
  if (color1out==null) {
   color1out = document.getElementById(thisRow).style.backgroundColor;
  }
  document.getElementById(thisRow).style.backgroundColor="#f7f9ff";
 }
 else {
  if (color2out==null) {
   color2out = document.getElementById(thisRow).style.backgroundColor;
  }
  document.getElementById(thisRow).style.backgroundColor="#f0f5ff";
 }
}

function chgColorOut(rowNum) {
 var color = ((rowNum)%2)+1;
 if (color==1) {
  document.getElementById(thisRow).style.backgroundColor=color1out;
 }
 else {
  document.getElementById(thisRow).style.backgroundColor=color2out;
 }
}

function validateNew(form, object) {
 //if ( form.title.value!="" && form.description.value!="" ) {
  return true;
 //}
 //else {
 // alert('You must enter a title and a description for the new '+ object);
 // return false;
 //}
}

var img = /(.*\.(jpeg|jpg|gif)$)/i;
var originalSRC = null;
function DoPreview(imageSelect, imgJPG) {
 var filename = imageSelect.value;
 var Img = new Image();
 if (navigator.appName == "Netscape") {
  alert("Previews do not work in Netscape.");
 }
 else {
  if (originalSRC == null) {
   originalSRC = imgJPG.src;
  }
  if ( img.test(filename) ) {
   Img.src = filename;
   imgJPG.src = Img.src;
  }
  else {
   if ( filename.length > 0 ) {
    alert("Only jpg, and gif images are supported.");
   }
   imgJPG.src = originalSRC;
  }
 }
}
  

//-->