﻿
function delConfirm(){
return confirm ("אשר מחיקת נתון \n  אזהרה: מחיקת נתון אינה ניתנת לביטול \n***********************************************************\n\n\n");
}


function showDD(myMenu){
document.getElementById(myMenu).style.display = "inline"
}
function hideDD(myMenu){
document.getElementById(myMenu).style.display = "none"
}

function checkForm(){
document.getElementById("first_name").style.backgroundColor = "#cccccc"
document.getElementById("last_name").style.backgroundColor = "#cccccc"
document.getElementById("cellular").style.backgroundColor = "#cccccc"
document.getElementById("email").style.backgroundColor = "#cccccc"


document.getElementById("first_name").style.border = "solid 1px #7F9DB9"
document.getElementById("last_name").style.border = "solid 1px #7F9DB9"
document.getElementById("cellular").style.border = "solid 1px #7F9DB9"
document.getElementById("email").style.border = "solid 1px #7F9DB9"




if(document.getElementById("first_name").value == ""){
document.getElementById("first_name").style.backgroundColor = "#FFC500"
alert("First name is required")
document.getElementById("first_name").focus()
return false
}

if(document.getElementById("last_name").value == ""){
document.getElementById("last_name").style.backgroundColor = "#FFC500"
alert("Last name is required")
document.getElementById("last_name").focus()
return false
}


if(document.getElementById("cellular").value == ""){
document.getElementById("cellular").style.backgroundColor = "#FFC500"
alert("Phone number is required")
document.getElementById("cellular").focus()
return false
}




if(document.getElementById("email").value == ""){
document.getElementById("email").style.backgroundColor = "#FFC500"
alert("Email addressfg is required")
document.getElementById("email").focus()
return false
}


}

i = 140
function enlargeMap(){
clearTimeout("myMapR")
i = i + 4
document.getElementById("map").style.position = "absolute"
document.getElementById("map").style.width = i + "px"
if(i>366){
clearTimeout("myMap")
}
else{
myMap = setTimeout("enlargeMap()", 1)
}
}

function reduceMap(){
clearTimeout("myMap")
i = i - 4
document.getElementById("map").style.position = "absolute"
document.getElementById("map").style.width = i + "px"
if(i<141){
document.getElementById("map").style.position = "relative"
clearTimeout("myMapR")
}
else{
myMapR = setTimeout("reduceMap()", 1)
}
}

function checkFormAdmin(){
if(document.getElementById("title").value == ""){
alert("חובה להקליד כותרת")
document.getElementById("title").focus();
return false
}
}

function checkFormAdminManot(){
if(document.getElementById("title").value == ""){
alert("חובה להקליד כותרת")
document.getElementById("title").focus();
return false
}
if(document.getElementById("top_id").value == ""){
alert("בחר קבוצה")
document.getElementById("top_id").focus();
return false
}
if(document.getElementById("price").value == ""){
alert("הקלד מחיר")
document.getElementById("price").focus();
return false
}


}


function changeManotGroup(myGroup){
window.location="admin_holder.asp?pid=3&id=" + myGroup
}

function changeTafritGroup(myGroup){
window.location="admin_holder.asp?pid=4&id=" + myGroup
}

function sh(t, a){

if(document.getElementById(t).style.display == "none"){
document.getElementById(t).style.display = "inline"
document.getElementById(a).innerHTML = "סגור / סגרי"
return false
}

if(document.getElementById(t).style.display == "inline"){
document.getElementById(t).style.display = "none"
document.getElementById(a).innerHTML = "לחצ/י לפרטים"
return false
}
}