﻿// JScript File
 /*function onyes()
    {
        var hid=document.getElementById('Hidden1');
        hid.value='yes'
        window.open('Questionsdisplay.aspx','quiz','menubar=no,resizable=0,status=yes,toolbar=no,scrollbars=yes,location=yes,titlebar=yes'); 
    }
    function onno()
    {
       window.open('Questionsdisplay.aspx','quiz','menubar=no,resizable=1,status=yes,toolbar=no,scrollbars=yes,location=yes,titlebar=yes'); 
       
    } */
       
       /*window.opener = self;
       setTimeout("self.close();",20000);*/
function nocontextmenu()
	{
		return false;
	}
document.oncontextmenu= nocontextmenu

/*function ShowModalPopup(){var modal=$find('ModalPopup1');modal.show(); }*/
function onno(){window.close();}
          
function clearloading() 
{
    //debugger;
    $get("tablecontainer").style.display = "none";
    $get("Progress").style.display = "";
}
    
   
function load()
{
    $get("tablecontainer").style.display = "";
    $get("Progress").style.display = "none";
}
            
 
//To disable keyboard events 
document.onkeydown = KeyCheck;     
function KeyCheck(e)
{
//debugger;
var KeyID = (window.event) ? event.keyCode : e.which;
var ffctrl = (window.event) ? false : e.ctrlKey;
var pressedKey = String.fromCharCode(KeyID).toLowerCase();
if (ffctrl || event.ctrlKey) {
// disable key press porcessing
return false;
event.returnValue = false;
}
}  
  
//display pages in <iframe>  
function DispSideMenu()
{
  var button=document.getElementById("cmdFinishtest")
  var frm=document.getElementById("iframe")    
  frm.src=""
  selectedoption= button.Text
      //ShowFrame(1)
  if (selectedoption=="FinishTest")
  {   
    moption="FinishTest->"
    frm.src="Resultpage.aspx"    
  }
}    

function onUpdating()
{
    // get the update progress div
    var updateProgressDiv = $get('updateProgressDiv'); 
  //  get the gridview element        
    var divquickscreenBounds = $get('divquickscreen');
  // make it visible
   updateProgressDiv.style.display = '';	    
  // get the bounds of both the gridview and the progress div
	var divquickscreenBounds = Sys.UI.DomElement.getBounds(divquickscreen);
	var updateProgressDivBounds = Sys.UI.DomElement.getBounds(updateProgressDiv);
    var x;
	var y;     
	x = (divquickscreenBounds.x + divquickscreenBounds.width - updateProgressDivBounds.width);
	y = divquickscreenBounds.y;
	Sys.UI.DomElement.setLocation (updateProgressDiv, x, y);           
}
function onUpdated() 
{
 // get the update progress div
 var updateProgressDiv = $get('updateProgressDiv'); 
 // make it invisible
 updateProgressDiv.style.display = 'none';
}
	   
/*function Disablekeyevents()
{
var nav = window.Event ? true : false; 
//alert(nav);
if (nav) 
{ 
    window.captureEvents(Event.KEYDOWN); 
    window.onkeydown = NetscapeEventHandler_KeyDown; 
} 
else 
{ 
    document.onkeydown = MicrosoftEventHandler_KeyDown; 
} 
}

//function NetscapeEventHandler_KeyDown(e) {
//debugger;
      //if (typeof(e.keyCode  == 17) {
     // alert(e.charCode + String.fromCharCode( e.charCode );
     //  return false; }
     // return true;
    //}
    
function MicrosoftEventHandler_KeyDown() 
{ 
//debugger;
    //alert(event.keycode)
    if (event.ctrlKey) 
    event.returnValue= false; 
    //return true; 
}    */     