﻿// JScript File

function getMyPortalVal(ID)
{
    var myPortal = ID.value;
	if (myPortal != "My Portals")
	{
	   // window.showModalDialog(myPortal,"myPortal","dialogWidth:780;dialogHeight:580, scrollbars=1,status=no");
	   window.open(myPortal,"myPortal","dialogWidth:780;dialogHeight:580, scrollbars=1, Status = 0, resizable=1");
	}
}

function QAIPopup(ID)
{
 
   window.open("http://www.qaiglobal.com/"+ID,"ILT","Width=620, Height=600, scrollbars=1, Status = 0, resizable=1");
   
	
}

function ILT(ID)
{
 
   window.open("http://www.qaiglobal.com/Training_HTML/"+ID,"ILT","Width=620, Height=600, scrollbars=1, Status = 0, resizable=1");
   
	
}

function Elearning(ID)
{
 
   window.open("http://www.edistalearning.com/training/"+ID,"Elearning","left=20,top=20,width=620,height=600,toolbar=1,resizable=1, location=1");
	
}

function Downloads(ID)
{
 
   window.open("http://www.qaiglobal.com/downloads/"+ID,"Downloads","Width=620, Height=600, scrollbars=1, Status = 0, resizable=1");
	
}

function Internal(ID)
{
 
   window.open("downloads/"+ID,"Downloads","Width=620, Height=600, scrollbars=1, Status = 0, resizable=1");
	
}

function Images(ID)
{
 
   window.open("images/"+ID,"Downloads","Width=950, Height=670, scrollbars=1, Status = 0, resizable=1");
	
}

function ChangeCalendarView(sender,args)
{
   sender._switchMode("years", true);           
}

function checkKey(e)
    {
        var keycode;
        if (window.event) keycode = window.event.keyCode;
        else if (e) keycode = e.which;
        else return true;

        var selection=document.selection.createRange();
        var selected_text = selection.text;
        
        if( (keycode>=48 && keycode <=57) || (keycode>=97 && keycode <=122) || (keycode>=65 && keycode <=90) )
        {
           
            return false;
        }    
        
        else return true;
    }
    
    

//function OnCheckEmailID(src, msg)
//    {
//        var ctrl=src; 
//        var message= msg;   
////        var filter =/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
// //       if (!filter.test(email.value)&& !email.value=="") 
//        if (!ctrl.value=="") 
//        {         
//           alert(message.value);
//           ctrl.value="";
//           ctrl.focus();   
//           return false;            
//        }
//        else
//         return true;
//  
//     }


