function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}
function changeImages() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}
var preloadFlag = false;
function preloadImages() {
  if (document.images) {
    Splash_01_Roll = newImage("images/safeworks-employers-roll.jpg");
    Splash_02_Roll = newImage("images/safeworks-patients-roll.jpg");
    Splash_03_Roll = newImage("images/safeworks-insurance-tpa-case-roll.jpg");
    Splash_04_Roll = newImage("images/safeworks-attorneys-roll.jpg");
    Splash_05_Roll = newImage("images/safeworks-physicians-roll.jpg");
    Splash_06_Roll = newImage("images/employers-roll.jpg");
    Splash_07_Roll = newImage("images/patients-roll.jpg");
    Splash_08_Roll = newImage("images/insurance-tpa-case-roll.jpg");
    Splash_09_Roll = newImage("images/attorneys-roll.jpg");
    Splash_10_Roll = newImage("images/physicians-roll.jpg");
    preloadFlag = true;
  }
}

function redirection() {
	window.location="index.html";
}

function echeck(str) {

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		if (str.indexOf(at)==-1){
		   alert("Please enter a valid email address.");
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please enter a valid email address.");
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please enter a valid email address.");
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please enter a valid email address.");
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please enter a valid email address.");
		    return false;
		 }

 		 return true;				
	}

function OnChange(dropdown) {
    var myindex  = dropdown.selectedIndex
    var SelValue = dropdown.options[myindex].value
    top.location.href = SelValue;
    return true;
}
