//print current page
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4)
    window.print();
}

function PicChange(ImageName,NewImage) 
{
document.images[ImageName].src = eval(NewImage + ".src")
} 

//change button color on mouseover
function ButtonHL(obj,NewClass) {
   			obj.className=NewClass;
  }		

//user Home screen navigation to new page within frame "FEATURE"   -  onclick          
function framesNav(NewPage) {
		   parent.frames['FEATURE'].location=NewPage;
}  

//main site Home screen navigation to new page   -  onclick          
function mainNav(NewPage) {
		   parent.window.location=NewPage;
}

//main site Home screen navigation to new page   -  onclick          
function mainNav2(NewPage) {
		   window.location=NewPage;
}

//exam screen navigation to new page   -  onclick          
function examNav(NewPage) {
		   top.location=NewPage;
} 	

//exam screen navigation to new page w/variable
function studNav(NewPage,v_exam_id) {
var exam = eval(v_exam_id);
var queryStr = "?" + "i_exam_id=" + exam.value;
var newUrl = NewPage + queryStr;
		   top.window.location= newUrl;
}

function LogOut1() {
		 top.location="/exams/admin.log_out";
}	

//change screen for selected course - onchange
function courseSelect(NewPage,i_exam_id,i_course) {
var exam = eval(i_exam_id);
var course = eval(i_course);
var queryStr = "?" + "i_exam_id=" + exam.valeu + "&" + "i_course=" + course.value;
var newUrl = NewPage + queryStr;
		    parent.frames['QUESTION'].location= newUrl;		 
}	

//change refresh value for exam screen - onchange
function screenRefresh(NewPage,i_exam_id,i_value) {
var exam = eval(i_exam_id);
var refresh = eval(i_value);
var queryStr = "?" + "i_exam_id=" + exam.value + "&" + "i_value=" + refresh.value;
var newUrl = NewPage + queryStr;
		    top.location= newUrl;		 
}	

function verifyCourse1(course, i_exam_id) {
var exam = i_exam_id;
var queryStr = "/exams/custom.criteria_formEng" + "?" + "i_exam_id=" + exam + "&" + "i_course=" + course;	
if(course=="ENGLISH") 	
    			{parent.frames['QUESTION'].location= queryStr;}
}			

function verifyCourse(i_exam_id) 
{
var exam = eval(i_exam_id);
var selectedCourse = eval(document.forms[0].i_course);
var queryStr = "/exams/custom.criteria_formEng" + "?" + "i_exam_id=" + exam.value + "&" + "i_course=" + selectedCourse.value;	
if(selectedCourse.value=="ENGLISH") 
	{alert(selectedCourse.value +  " exam questions can only be selected by date.");	 	
      parent.frames['QUESTION'].location= queryStr;
	}				
}		

function allowSend() {
		 return window.confirm("Mail this info?");
}		

//exam screen navigation to new page   -  onclick          
function gobackCustom(NewPage,v_exam_id) {
var exam = eval(v_exam_id);
var queryStr = "?" + "i_exam_id=" + exam.value;
var newUrl = NewPage + queryStr;
		   parent.frames['QUESTION'].location= newUrl;
} 	 

//exam screen navigation to new page   -  onselect          
function gobackPrint(NewPage,v_exam_id,v_option) {
var exam = eval(v_exam_id);
var queryStr = "?" + "i_exam_id=" + exam.value + "&" + "i_column=" + v_option;
var newUrl = NewPage + queryStr + "#" + "columns";
		   window.location= newUrl;
} 

 function zoomOut(spanID) {
  el = document.getElementById(spanID);
  if (el != null) {
    if (el.style.display == "none") {
      el.style.display = "block";
    }
    else {		
      el.style.display = "none";

    }
  }
}

 function zoomIn(spanID) {
  el = document.getElementById(spanID);
  if (el != null) {
    if (el.style.display == "none") {
      el.style.display = "block";
    }
    else {
      el.style.display = "none";

    }
  }
} 

