// JavaScript Document
/* function showLastUpdate(){
	txt="This site was designed by <a href=\"mailto:talweksler@gmail.com\">PANDA Designes</a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Last update: 3/9/2008";
	document.getElementById("bottom").innerHTML=txt;
    } */
function tdColor(idNum){
		document.getElementById(idNum).style.backgroundColor="#666699";
		if (idNum == "gallery"){
			document.getElementById("galleryRight").style.backgroundColor="#666699";
		}
	}
function showMenu(){
	document.getElementById("galleryTable").style.display="";
}
function hideMenu(){
	document.getElementById("galleryTable").style.display="none";
}	

function validateWorkForm(){
	var errors = false;
	if (document.workForm.name.value.length == 0){
		document.getElementById("nameError").innerHTML="אתה חייב למלא את שמך";
		errors=true;
	}
	if (document.workForm.buisness.value.length == 0){
		document.getElementById("buisnessError").innerHTML="אתה חייב למלא את שם העסק";
		errors=true;
	}
	if (document.workForm.phone.value.length != 0){
		if ( (isNaN(parseInt(document.workForm.phone.value))) || 
			(document.workForm.phone.value.length < 7) ){
				document.getElementById("phoneError").innerHTML= "מספר הטלפון שהכנסת שגוי";
				errors=true;
		}
	}
	mail = document.workForm.mail.value; 
	if (mail.length != 0){
		if (mail.indexOf("@") <= 0){
			document.getElementById("mailError").innerHTML= "הדואר האלקטרוני שהכנסת שגוי";
			errors=true;
		}else if (mail.charAt(mail.indexOf("@") - 1) == ' '){
			document.getElementById("mailError").innerHTML= "הדואר האלקטרוני שהכנסת שגוי";
			errors=true;
		}else if (mail.substring(mail.indexOf("@") + 1).indexOf(".") <= 0){
			document.getElementById("mailError").innerHTML= "הדואר האלקטרוני שהכנסת שגוי";
			errors=true;
		}
	}	
	return !errors;
}

function addMsg(){
	addmsg = window.open("addmsg.php", 'AddMessage', 'width=550, height=270');
}