﻿function DoNothing(){return false}function GoBack(){var a=document.referrer;if(a!=""){if(((a.toLowerCase().indexOf("sexpage",0)>-1)||(a.toLowerCase().indexOf("sex-index",0)>-1)||(a.toLowerCase().indexOf("sex-center",0)>-1)||(a.toLowerCase().indexOf("coursim",0)>-1)||(a.toLowerCase().indexOf("car",0)>-1))&&(a.toLowerCase().indexOf("warning.aspx",0)==-1)){history.back();return false}}window.location.href="../Home.aspx";return false}
//function bookmarksite()
//{

//if(window.sidebar)
//{

//window.sidebar.addPanel("http://coursim.co.il","Coursim.co.il: קורסים - אינדקס הקורסים הגדול במדינה. נקודה.","")
//alert('dd');
//}

//else 
//if(window.external)
//{
//    
//   window.external.AddFavorite("http://coursim.co.il","Coursim.co.il: קורסים - אינדקס הקורסים הגדול במדינה. נקודה.")
//}
//}


function bookmarksite()
{   
 if(window.sidebar && window.sidebar.addPanel)
     {        
 
       window.sidebar.addPanel("Coursim.co.il: קורסים - אינדקס הקורסים הגדול במדינה. נקודה.","http://coursim.co.il","");
 } 
 else
  if(window.opera && window.print ) 
  {   
        var e=document.createElement('a');  
        e.setAttribute('href',"http://coursim.co.il");    
        e.setAttribute('title',"Coursim.co.il: קורסים - אינדקס הקורסים הגדול במדינה. נקודה.");   
        e.setAttribute('rel','sidebar');  
        e.click();
}
 else 
 if(window.external) {   
            try {     
               
            window.external.AddFavorite("http://coursim.co.il","Coursim.co.il: קורסים - אינדקס הקורסים הגדול במדינה. נקודה.");   
            }        catch(e){alert("Ctrl+D בשביל להוסיף את אתר קורסים למועדפים לחץ.");}
}
else       
 alert(" Ctrl+D בשביל להוסיף את אתר קורסים למועדפים לחץ.");
}



function OnClientCommandExecuting(editor, commandName, oTool)         
    {         
 
      if (commandName == "PasteFromWord"          
        || commandName == "PasteFromWordNoFontsNoSizes"          
                 
        || commandName == "PasteAsHtml"          
      )         
        {         
           alert('נא להקיש על מקש ימני של עכבר ולבצע הדבקה רגילה')
            return false;         
        }         
    }    
      
    function OnClientLoad(editor)   
    {   
   
   


        editor.AttachEventHandler("onkeydown", function(e)   
        {   
            
            if (e.ctrlKey && e.keyCode == 86)   
            {   
                if (document.all)   
                {   
                    e.cancelBubble = true;   
                    e.returnValue = false;  
                alert('נא להקיש על מקש ימני של עכבר ולבצע הדבקה רגילה') 
                    return false;   
                }   
                else  
                {   
                    e.preventDefault();  
                     alert('נא להקיש על מקש ימני של עכבר ולבצע הדבקה רגילה')  
                    return false;   
                }   
            }    
        });   
           
    }   
    
    
    function ShowInstantSale(InstantSale)
    {
        //alert('קורס זה משתתף במבצע הדקה ה-90: '+InstantSale+'\r\nמלא פרטים לקבלת פרטים נוספים.');
        var Content = '<div dir="rtl" style="display:inline">קורס זה משתתף במבצע הדקה ה-90: '+InstantSale+'<br><br>מלא/י פרטים לקבלת פרטים נוספים.</div>'
       alert(InstantSale);
       // window.radalert( Content , 450 , 120 , 'מצבע הדקה ה-90' );
        //var Url = 'diaLead.aspx?lid='+ LeadID;
//        oWnd.SetUrl(Url);
    }
    
    
    
  function setFocusAfterValidation(val,group)
    {
     
       if(Page_ClientValidate(group)==false   )
       {
      
       setTimeout("timeCount('"+val+"')",1);
       }
       else
       {
       
       document.getElementById('ctl00$ContentMain$bSendLead').style.display='none';
       document.getElementById('bFake1').style.display='block';
        document.getElementById('ctl00$ContentMain$bSendLead2').style.display='none';
       document.getElementById('bFake2').style.display='block';
       }
       
    }
    
    function timeCount(id)
    {
      document.getElementById(id).focus();
    }
    
    function css_browser_selector(u)
    {
    var ua = u.toLowerCase(),
    is=function(t)
    {
    return ua.indexOf(t)>-1;
    },g='gecko',w='webkit',s='safari',o='opera',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

function disableEnterKey(e)
{

     var key;      
     if(window.event)
          key = window.event.keyCode; //IE
     else
          key = e.which; //firefox      

     return (key != 13);
    
}
function IsDigit(e)
{
  
     var key;      
     if(window.event)
          key = window.event.keyCode; //IE
     else
          key = e.which; //firefox   
        
return(((e.keyCode>=48&&e.keyCode<=57)||(e.keyCode==46))) ;

     
    
}
