﻿var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

/////////////////////////////////////////////////
/////////////////////////////////////////////////

function CloseWindow()
{
    window.close();
}

function UnselectCheckbox()
{
    var chkBox = document.getElementById('chkTimer');
    chkBox.checked=false;
    return true;
}

function getMessage()
 {
 
    var chkBox = document.getElementById('chkTimer');
    var ans;
    
    ans=window.confirm('You have shuffled through 100 Web pages. Continue shuffling?');
    //alert(ans);
    if (ans==true)
    {
        
        return true;
    }
    else
    {
    //alert('false');
    //alert(chkBox);
    
    //alert(chkBox.checked);
    //alert(chkBox.Selected);
    chkBox.checked=false;
        
        return false;
    }
 }

var chkNewParent="1";
var sList;
function RefreshParent(loc) {
 try 
 {
   
    if (window.opener && !window.opener.closed)
    {
      wObj = window.opener;
      //alert(wObj.location.href);
      //wObj.location.href='';
      //alert('empty'+wObj.location.href);
      wObj.location=loc;
      //alert(loc);
      //alert(wObj.location.href);
    }
    else
    {
        if (window.sList && window.sList.open && !window.sList.closed)
        {
          chkNewParent="1";
        }
        else
        {
          chkNewParent="0";
        }

        if(chkNewParent=="0")
        {
          //alert(loc);
          sList = window.open(loc, "ShuffleSNF", "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
          chkNewParent="1";
        }
        else
        {
          sList.location=loc;
        }
    }
 }
 catch(e){
		//if unable to read var show message
		//alert(e);
		
        sList = window.open(loc, "ShuffleSNF", "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
        chkNewParent="1";
        }
}


