////////////////////////////////////////////////////
// הפונקציה מעלימה ומסתירה את תוצאות החיפוש
////////////////////////////////////////////////////
function show_Hide(divID){
 
  divID =document.getElementById(divID)
divID.style.display= (divID.style.display=="none") ? "block" : "none"
}
/////////////////////////////////
 
/////////////////// פונקציה שמוודאת דוא"ל
function fValidEmail(strEmail){
	return  /^[\w\-]+@[a-z0-9\-]+\.(?:[a-z0-9]+\.)*[a-z]{2,4}$/i.test(strEmail)
	
}

function fIsNumeric(strNum){
	return /^\d+$/.test(strNum);
}
///////////////האם הקלט הוא מספר עשרוני?
function fIsFloat(strNum){
	
	return /^\d+\.\d+$/.test(strNum);
}

/////////	// האם הקלט מורכב מאותיות ומספרים בלבד? )ישמש לבדיקת שמות המשתמש)
function fIsAlphanumeric(str){

	return /^[\da-zA-Zא-ת]+$/i.test(str);
}
///////////////  // בדיקת תקינות של קובץ
function fIsValidFileName(str){

	  return /(?:[^\\]*\\)*([a-z\d\-\_]+)\.(gif|jpg|png)/.test(str);
}

//////////////מסירה רווחים משני צידי הקלט
	
	function Trim(str)
{
	return str.replace(/^\s*(\S(?:.|\n)+\S)\s*$/,"$1");
}
 
	
///////////////////////פותחת חלון של תזכורת סיסמא

function fucForgetPass(){
window.open('/icom/flash/login/forgetPass.asp','forgetPass','location=no,status=no,left=280,top=200,scrollbar=no,width=350,height=200');
}

///////////////////// בודק תזכורת סיסמא
function checkForgetPass(strEmail1){
	
	a=true
	if(!fValidEmail(strEmail1) ){
		alert("אנא הכנס דואר אלקטרוני")
		forgetPassform.email.focus()
		a=false
		return false
	}
	  else{
	  	(a)? forgetPassform.submit():""
	  	}
	}

 
///////////////////// בודק לוגאין
function checkLogIn(userLogIn, userPass, vlogInForm){
	 
	a=true
	if(!fValidEmail(userLogIn.value) ){
		alert("הכנס שם משתמש תקין")
		userLogIn.focus()
		a=false
		return false
	}
	
	if(!fIsAlphanumeric( userPass.value  )){
		alert("הכנס סיסמא תקינה")
		userPass.focus()
		a=false
		return false
	}
	
	(a)? document.getElementById(vlogInForm).submit():""
	}
	
////////// מחזירה ארור לפקד

	function inputEror(strText, erorText){
		alert(erorText)
		strText.value=""
		strText.focus()
		a=false
		return false
		}// inputEror()
	 
	 
	 function show(section) {
	 //alert(section)
    for (var i = 0; i < sections.length; i++) {
        if (sections[i] == section) {
            document.getElementById(sections[i]).style.display = 'block';
        } else {
            document.getElementById(sections[i]).style.display = 'none';
        }//if
    }//for
}//show

/////////////////////////////////////////////////////////////////
	 function showAll(section) {
    for (var i = 0; i < sections.length; i++) {
        
            document.getElementById(sections[i]).style.display = 'block';
        
    }//for
}//showAll

//////////////////////////////////////
	 function closeAll(section) {
    for (var i = 0; i < moreDetail.length; i++) {
        
            document.getElementById(moreDetail[i]).style.display = 'none';
        
    }//for
}//closeAll
 ///////////////////////////////////////////
 function showD(section) {
		 // alert(section)
		//alert(moreDetail.length)
	  //return false
    for (var i = 0; i < moreDetail.length; i++) {
        if (moreDetail[i] == section) {
            document.getElementById(moreDetail[i]).style.display = 'block';
            document.getElementById(moreDetail[i]).style.posLeft = 30//event.x
            document.getElementById(moreDetail[i]).style.posTop	=30//event.y
        } else {
            document.getElementById(moreDetail[i]).style.display = 'none';
        }//if
    }//for
}//show
