//////////////////////////////////
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 0; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("http://www.redcross.org/images/portal/tornado3.jpg");
image_list[image_index++] = new imageItem("http://www.redcross.org/images/portal/tornado3_5.jpg");
image_list[image_index++] = new imageItem("http://www.redcross.org/images/portal/tornado4.jpg");
image_list[image_index++] = new imageItem("http://www.redcross.org/images/portal/tornado5.jpg");
image_list[image_index++] = new imageItem("http://www.redcross.org/images/portal/tornado6.jpg");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
//////////////////////////////////

//////////////////////////////////
function openWindow() {
  window.open("","x","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=620,height=470");

}
//////////////////////////////////
function validate_3() {

//check the email
        if (isEmpty(document.subscribe.email.value)){
                alert('Please fill in your e-mail');
                return false;   
        }

// check for valid email address
	else if ( document.subscribe.email.value.length <= 6 ||
      	document.subscribe.email.value.indexOf ('@', 0) == -1 ||
      	document.subscribe.email.value.indexOf ('.', 0) == -1){

      	alert("'' " + subscribe.email.value + " '', is not valid Email Address.");
      	return false;
}

        //if we got to here the form is ok
        document.subscribe.submit();
}
function isEmpty(s) {
   return ((s == null) || (s.length == 0));
}


function openwin()
{ 
	window.open("/popups/need.html","x",'toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=545,height=425,left=100,top=100,screenX=100,screenY=50,resizable=0')
}
//////////////////////////////////

//////////////////////////////////
if (window!= top)

top.location.href=location.href
//////////////////////////////////

//////////////////////////////////

  if (document.images) { 
  image2on = new Image(); 
  image2on.src = "/images/youth_zone2.gif";
  image2off = new Image(); 
  image2off.src = "/images/youth_zone.gif";
} 

function changeImages() { 
if (document.images) { 
  for (var i=0; i<changeImages.arguments.length; i+=2) { 
   document[changeImages.arguments[i]].src = 
eval(changeImages.arguments[i+1] + ".src"); 
    		} 
  	} 
} 
//////////////////////////////////