﻿function jsfSIS(array,o,i)
{o.src=array[i].src;}
var sBg1='#FFFFFF';var sBg2='#F7F7F7';var sBg3='#F2F7FB';function jsfP(o,bgColor)
{o.bgColor=bgColor;}
function jsfNum(e)
{key=(document.layers)?e.which:window.event.keyCode;if(window.event.shiftKey)return false;if(key!=0)
{return((key>=96&&key<=105)||(key>=48&&key<=57)||(key==109)||(key==8)||(key==9)||(key==27)||(key==46))?true:false;}}
function jsfMoney(e)
{key=(document.layers)?e.which:window.event.keyCode;if(window.event.shiftKey)return false;if(key!=0)
{return((key>=96&&key<=105)||(key>=48&&key<=57)||(key==109)||(key==110)||(key==190)||(key==8)||(key==9)||(key==27)||(key==46))?true:false;}}
function jsfEna(sData)
{if(null==(o=document.getElementById('M_SET_S_P_oTxtData')))jsfReloadPage();o.value=sData;__doPostBack('M$SET$S$P$oLbtnEna','');}
function jsfDel()
{if(null==(o=document.getElementById('M_SET_S_P_oTxtData')))jsfReloadPage();o.value=jsfDelIDs('chbsDel');if(o.value.length==0)
{alert('לא נבחרו רשומות למחיקה.\nתהליך מחיקת רשומות נכשל.');return false;}
return window.confirm('אתה בטוח כי ברצונך למחוק'+'\n'+'רשומות מסומנות?');}
function jsfDelIDs(sChbsName)
{var checkboxes=document.getElementsByName(sChbsName);var s='';for(i=0;i<checkboxes.length;i++)
{if(checkboxes.item(i).checked)
{if(s.length>0)s+=':';s+=checkboxes.item(i).id.split('$')[1];}}
return s;}
function jsfCheckDelIDs(oChb,sChbsName)
{var checkboxes=document.getElementsByName(sChbsName);for(i=0;i<checkboxes.length;i++)
{checkboxes.item(i).checked=oChb.checked;}}
function jsfSetImage(imgId,fileId)
{xxx='file://localhost/'+document.getElementById(fileId).value;xxx=xxx.toLowerCase();if(xxx.substring(0,xxx.lastIndexOf('.png'))||xxx.substring(0,xxx.lastIndexOf('.jpg'))||xxx.substring(0,xxx.lastIndexOf('.jpeg'))||xxx.substring(0,xxx.lastIndexOf('.gif')))
{var img=document.getElementById(imgId);img.style.display="";img.setAttribute('src',xxx);img.setAttribute('width',50)
img.setAttribute('height',50)}}
function jsfReload()
{alert("אחד שמות האובייקטים שגוי.");window.location.reload();}
function jsfSDTC(sID,sColor)
{if(null!=(o=document.getElementById(sID)))
o.style.color=sColor;}
function jsfSHM(sID)
{if(null!=(o=document.getElementById(sID)))
o.style.display=(o.style.display=='none')?'':'none';}
function jsfSH(id)
{if(null!=(e=document.getElementById(id)))
e.style.display=(e.style.display=='none')?'':'none';}
function jsfED(id)
{if(null!=(e=document.getElementById(id)))
e.parentNodes[0].disabled^=1;}
function jsfPIWC(path,wndWidth,wndHeight)
{var wndLeft=(screen.width-wndWidth)/2;var wndTop=(screen.height-wndHeight)/2;win=window.open("CmsPopupImg.aspx?path="+path,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,"+
"resizable=no,copyhistory=no,width="+wndWidth+",height="+wndHeight+",top="+wndTop+",left="+wndLeft,true);win.focus();}
function jsfEmpty(id,ids)
{aid=ids.split(':');for(i=0;i<aid.length;i++)
if(null!=(e=document.getElementById(id+aid[i])))
if(e.value=='')return true;return false;}
function jsfTrim(s)
{s=this!=window?this:s;return s.replace(/^\s+/g,'').replace(/\s+$/g,'');}
function jsfGetClientWidth()
{return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;}
function jsfGetClientHeight()
{return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;}
function jsfOnLoad()
{jsfOnResize();window.onresize=jsfOnResize;}
function jsfOnResize()
{if((null!=(e0=$get('divWaiting0')))&&(null!=(e1=$get('divWaiting1'))))
{if(e0.style.height!='0px'&&e0.style.width!='0px')
{jsfWaiting();}}}
function jsfWaiting()
{if((null!=(e0=$get('divWaiting0')))&&(null!=(e1=$get('divWaiting1'))))
{e0.style.width=e1.style.width=jsfGetClientWidth()+'px';e0.style.height=screen.height+'px';e1.style.paddingTop=((jsfGetClientHeight()-24)/2)+'px';e1.style.display='';}}
function jsfOWC(wndUrl,wndWidth,wndHeight,wndScrollbar,wndMenubar)
{var wndLeft=(screen.width-wndWidth)/2;var wndTop=(screen.height-wndHeight)/2;win=window.open(wndUrl,"","toolbar=no,location=no,directories=no,status=no,menubar="+wndMenubar+",scrollbars="+wndScrollbar+
",resizable=no,copyhistory=no,width="+wndWidth+",height="+wndHeight+",top="+wndTop+",left="+wndLeft);win.focus();}
