window.onload = checkURL

//window.onload = goURL()


function checkURL() {
 var theURL = document.URL
 var checker = 'true';
 
 if(!isNaN(theURL.charAt(8))){
 	return;
 	}

for(t=7; t<9; t++){

    if (theURL.charAt(t) == 'w'){
      checker='true';
      }
        else {
          checker='false';
          }
       }
    redirPage(checker, theURL);
}

/*if (theURL.charAt(7) == 'w' && theURL charAt(8) == 'w'){
	checker='true';
	      }
	        else {
	          checker='false';
	          }
	       }
	    redirPage(checker, theURL);
}*/

function redirPage(checker, theURL){
    if(checker=='false'){
      t=theURL.length;
      splitURL1 = theURL.substring(0,7);
      splitURL2 = theURL.substring(7,t);
      newURL = splitURL1 + 'www.' + splitURL2;

      window.location = newURL;

      }
      else {
        return true;
        }
}



function goURL() 
{
var theURL = document.URL + 'downforservice.htm';	
 window.location = theURL;
 }