function openVidWin(movieName)
     {
		var myVar = movieName;
		myWindow = window.open('vision/airforce-clips.html', 'newwindow','fullscreen=yes,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes');
		myWindow.document.location = "vision/airforce-clips.html?movieName=" + myVar;
	 }
	  
//=============================
//Window openers
//=============================
function openStandardWindow(input){
		window.open(input,'mywindow','width=750,height=600');
	}
	
function openCustomWindow(url, w, h) {
	var scrWidth = w;
	var scrHeight = h;
	var strOptions = "toolbar=no, status=yes, menubar=no, scrollbars=yes, width=" +scrWidth +",height=" +scrHeight +",left=0,top=0";
	window.open(url,"myWin",strOptions);
}
	
//=============================
//This function forces the save as dialogue box for images 
//=============================
function downloadFile(input){
		//str = input; //document.forms[0].input.value;
		theFile = window.open(input,'mywindow','width=120,height=10');
		theFile.document.write("opening file - please wait");
		//theFile.document.execCommand("saveAs",true);
		theFile.close();
		return false;
} 

//=============================
//Form Validation
//=============================
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }




	 

