﻿function validate()
{
    if(confirm('Are You Sure?'))
        return true;
    else
        return false;
}
	
	//No RIGHT CLICK************************
	// ****************************

	function nocontextmenu()
	{ 
		event.cancelBubble = true 
		event.returnValue = false; 
		return false; 
	}
	 
	function norightclick(e) 
	{ 
		if (window.Event) 
		{ 
		if (e.which !=1) 
		return false; 
		} 
		else 
		if (event.button !=1) 
		{ 
		event.cancelBubble = true 
		event.returnValue = false; 
		return false; 
		} 
	} 
	
	function HandleKeys()
    {
	    //alert( window.event.keyCode)
    /*	if( window.event.keyCode==13)
	    //if( window.event.keyCode >= 111 && window.event.keyCode<=123 )
	    {
		    btnSubmit_onclick()
	    }
    */
	    //if(window.event.ctrlKey || window.event.altKey || window.event.shiftKey || window.event.keyCode==122)
	    if((window.event.ctrlKey && window.event.keyCode==78) || window.event.keyCode==122 || (window.event.ctrlKey && window.event.keyCode==86) || (window.event.ctrlKey && window.event.keyCode==118))
	    {
		    window.event.keyCode=0;
		    window.event.returnValue = false;
		    window.event.cancelBubble=true;
		    window.event.invalid=true;
		    return false;
	    }
    }

    document.onkeydown=HandleKeys
	
	document.oncontextmenu = nocontextmenu; 
	document.onmousedown = norightclick; 

	if (window.Event) 
	document.captureEvents(Event.MOUSEUP); 
	
	
	
	
	
	
	function goNewWin(sPath,sData,sLanguage) {

//***Get what is below onto one line***

	var newWin,sScript,isPrinted
	
	if(sLanguage=="EN")
	    sDir="LTR";
	else
	    sDir="RTL";
	
	newWin=window.open(sPath,'TheNewpop','width=10,height=10,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,maximized=0');  
	do
	{
	}while(newWin.document.all.targetGrid==null)
	if(newWin.document.all.targetGrid!=null)
	{
		newWin.document.all.targetGrid.innerHTML=sData
	    newWin.document.dir=sDir	
		isPrinted=newWin.Wait()
		if(isPrinted==true)
	    	newWin.close();
	
	}
	else
	{
			newWin.close();
	}
}