/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos,resize){
  if(pos=="random"){
    LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):700;
    TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):500;
  }
  if(pos=="center"){
    LeftPosition=(screen.width)?(screen.width-w)/2:500;
    TopPosition=(screen.height)?(screen.height-h)/2:500;
  }
  else if((pos!="center" && pos!="random") || pos==null){
    LeftPosition=0;
    TopPosition=20
  }
  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable='+resize;
  win=window.open(mypage,myname,settings);
}

function OpenChat(){
  NewWindow('http://navaldomination.com/chat/index.php','_chat',700,460,'no','center','no');
}

/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
function submitonce(theform){
  //if IE 4+ or NS 6+
  if (document.all||document.getElementById){
    //screen thru every element in the form, and hunt down "submit" and "reset"
    for (i=0;i<theform.length;i++){
      var tempobj=theform.elements[i]
      if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
      //disable em
      tempobj.disabled=true
    }
  }
}

window.status = "Naval Domination";