﻿//function PrintPreview(url)
//        {
//           //  debugger;
//            var activeTab;
//            var printPageName='PrintPreview.aspx';
//            var RelativeURL = url+'/'+printPageName;
//            var txtActiveTab = 'txtActiveTab';
//            //if(txtActiveTab != null && txtActiveTab != undefined)
//            //{
//            if(document.getElementById(txtActiveTab) != null)
//            {
//                activeTab = document.getElementById(txtActiveTab).value; 
//                RelativeURL= RelativeURL +'?TabID='+activeTab;
//            }
//            else
//            {
//             RelativeURL= RelativeURL +'?TabID=emp';//+activeTab
//            }
//            //}
//            window.open(RelativeURL,'Print','width=740,height=600,left=100,top=100,screenX=0,screenY=100,scrollbars=yes,resizable=yes');
//             return false;
//            
//        }

//    function isNumberKey(evt)
//      {
//         var charCode = (evt.which) ? evt.which : event.keyCode
//         if (charCode > 31 && (charCode < 48 || charCode > 57))
//         {
//         event.keyCode=31;
//            return false;
//         }

//         return true;
//      }

    
function openCenterWindowCommon(url,Width,Height)
        {
                var theWidth=Width;
                var theHeight=Height;
                var theTop=(screen.height/2)-(theHeight/2);
                var theLeft=(screen.width/2)-(theWidth/2);
                var features;
                              
                 features='height='+ theHeight +',width='+ theWidth +',top='+ theTop +',left='+ theLeft +",scrollbars=no,resizable=no";
                    
                var theWin=window.open(url,'General_Open',features);
                
                return false; //bcoz we doen't postback after clicking on button
         }
     
  function OpenCarrierUrl(url)
        {
           
            window.open(url);
            return false;
            
        }
        
        function changeLocation(dropdown) {
            location.href = dropdown.options[dropdown.selectedIndex].value;
        }
        