function winpopup(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'MyWindow','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,width=580,height=350,screenX=0,screenY=0,left=210,top=200');	
	 newWin.focus();
}

function winpopup1(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'MyWindow1','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,width=580,height=350,screenX=0,screenY=0,left=210,top=200');	
	 newWin.focus();
}

function winpopupFull(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'FullWindow','x=0,y=0,toolbar=no,location=yes,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,channelmode=1,screenX=0,screenY=0,left=0,top=0');	
	 newWin.focus();
}
function winpopupHome(strUrl)
{	
	 var strUrl;
	 //alert("sdabk");
	 var newWin=window.open(strUrl,'MyWindow','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,width=580,height=350,screenX=0,screenY=0,left=210,top=200');	
	 //var newWin=window.open(strUrl,'MyWindow','fullscreen');	
	 newWin.focus();
}
function winpopupHome1(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'child','titlebar={no|0},channelmode=no,statusbar={no|0},toolbar=no,resizable=1,status=no,scrollbars=yes,fullscreen=no');

	 newWin.focus();
}

 var isNS = (navigator.appName == "Netscape") ? 1 : 0;
  if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
  function mischandler(){
   return false;
 }
  function mousehandler(e){
 	var myevent = (isNS) ? e : event;
 	var eventbutton = (isNS) ? myevent.which : myevent.button;
    if((eventbutton==2)||(eventbutton==3)) return false;
 }


function disableCtrlKeyCombination(e)
{
        //list all CTRL + key combinations you want to disable
        var forbiddenKeys = new Array('a', 'n', 'c', 'x', 'v', 'j');
        var key;
        var isCtrl;

        var code = 0;
        if (!e) var e = window.event;
        if (e.keyCode) key = e.keyCode;
	    else if (e.which) key = e.which;

            if(testKeyComb(e,65))return false;      // ctrl + A
            else if(testKeyComb(e,97))return false;// ctrl + a
            else if(testKeyComb(e,67))return false;// ctrl + C
            else if(testKeyComb(e,99))return false;// ctrl + c
                
        
        return true;
}
  function testKeyComb(e,Deskeycode) {  
    var keycode;  
    if (window.event) keycode = window.event.keyCode;  
    else if (e) keycode = e.which;  
    var e = e || window.event;  
    if(keycode==Deskeycode && e.ctrlKey)
    {  
        return true;  
    }  
    return false
  }  

var IncludeURLS = new Array("Admin/NewPinMailer_",
"/online/",
"Admin/Newpinmailer_",
"Admin/EmailInternetClients",
"admin/VIPinternetclients"
);

var ExcludeURLS = new Array("Admin/NewPinMailer_GetDetails.aspx");

var Allow = true;

for(var i = 0 ; i < IncludeURLS.length ; i++)
{
    if(window.location.href.toUpperCase().indexOf(IncludeURLS[i].toUpperCase()) != -1 )
    {
        Allow = false;
        break;
    }
}

for(var i = 0 ; i < ExcludeURLS.length ; i++)
{
    if(window.location.href.toUpperCase().indexOf(ExcludeURLS[i].toUpperCase()) != -1 )
    {
        Allow = true;
        break;
    }
}

if(!Allow)
{
    document.onkeydown = disableCtrlKeyCombination
    document.oncontextmenu = mischandler;
    document.onmousedown = mousehandler;
    document.onmouseup = mousehandler;
    
window.onload = function() {
  document.onselectstart = function() {return false;} // ie
  document.onmousedown = function() {return false;} // mozilla
}

}
