<!--
//home page image rotation

function loadpage() {
browver= parseInt(navigator.appVersion);
browtype = navigator.appName;
browsertype = "old";
if (browtype == "Netscape" && !(browver < 3)) {
browsertype = "new"; 
}
if (browtype == "Microsoft Internet Explorer" && !(browver < 4)) {
browsertype = "new";
}
if (browsertype == "new") {
thetimer = setTimeout("changeimage()", 3000);
banneradcode = 0;
listofimages = new Array(6);
listofimages[0] = new Image(500,248)
listofimages[0].src = "homeimage-0.jpg"
listofimages[1] = new Image(500,248)
listofimages[1].src = "homeimage-1.jpg"
listofimages[2] = new Image(500,248)
listofimages[2].src = "homeimage-2.jpg"
listofimages[3] = new Image(500,248)
listofimages[3].src = "homeimages-3.jpg"
listofimages[4] = new Image(500,248)
listofimages[4].src = "homeimages-4.jpg"
listofimages[5] = new Image(500,248)
listofimages[5].src = "homeimages-5.jpg"
}
}

function changeimage(){
if (browsertype == "new") {
banneradcode = banneradcode + 1
if (banneradcode == "6") {
banneradcode = 0
}
imagesource = "homeimage-" + banneradcode + ".jpg"
window.document.bannerad.src = imagesource
thetimer = setTimeout("changeimage()", 5000);
}
else if (browsertype == "old") {
}
}

function changepage() {
if (browsertype == "new") {
if (banneradcode == 0) {
newlocation = "http://northmemorial.com/cancer/"
}
else if (banneradcode == 1) {
newlocation = "http://northmemorial.com/nmclinics/"
}
else if (banneradcode == 2) {
newlocation = "http://northmemorial.com/ets/"
}
else if (banneradcode == 3) {
newlocation = "http://northmemorial.com/heart_stroke/"
}
else if (banneradcode == 4) {
newlocation = "http://northmemorial.com/women_children/"
}
else if (banneradcode == 5) {
newlocation = "http://northmemorial.com/about/"
}
location = newlocation
}
else if (browsertype == "old") {
location = "http://northmemorial.com/cancer/"
}
}


//
function printThisPage(){
	window.print();
}

//
function popupWindow(url,windowWidth,windowHeight)
{
	arguments = 'status=yes,resizable=no,width=' + windowWidth + ',height=' + windowHeight + ',scrollbars=no,location=no';
	obj = window.open(url,'tour',arguments);
	obj.focus();
}

//
function validateSearchCriteria(form){
	if(form.siteSearch_criteria.value == "" || form.siteSearch_criteria.value == "search:"){
		alert("Please enter your search criteria before submitting.");
		return false;
	}
	else{
		return true;
	}
}

//
function clearField(formField,fieldValue){
	if(formField.value == fieldValue)
	{
		formField.value = "";
	}
}

//
function changeClass(id,newClass){
	identity = document.getElementById(id);
	identity.className = newClass;
}

//
function hideDiv(divName,style)
{
	if(style == 'block'){
		document.getElementById(divName).style.display = (document.getElementById(divName).style.display == 'block')? 'none':'block';
	}
	else if(style == 'inline'){
		document.getElementById(divName).style.display = (document.getElementById(divName).style.display == 'inline')? 'none':'inline';		
	}
}

//Pops up a confirmation box to make sure user really whishes to perform the requested action
function confirmDelete(confirmMessage){
	var confirmBox = confirm(confirmMessage);
	if(confirmBox){
		return true;
	}
	else{
		return false;	
	}
}

//Checks a field for specified value and onFocus sets it to blank, if it's value equals that passed
function optionalToBlank(formField, fieldValue){
	if(formField.value == fieldValue)
	{
		formField.value = "";
	}
}

//
function validateNewsForm(form){
  // Make sure title line one is not blank
  if (form.title1.value == "") {
    alert("Title (line 1) cannot be left blank.");
    form.title1.focus();
    return false ;
  }
  
  //Make sure the story body is not blank
  if (form.consumerCopy.value == "") {
    alert("Consumer copy cannot be left blank.");
    form.consumerCopy.focus();
    return false ;
  }
  
  return true ;
}

//-->