<!--
function validateOrder()
{
	var num;
	
	
		if(document.order1.fname.value=="")
		{
			alert("נא להכניס שם פרטי");
			document.order1.fname.focus();
			return false;
		}
		
		if(document.order1.lname.value=="")
		{
			alert("נא להכניס שם משפחה");
			document.order1.lname.focus();
			return false;
		}
		
		num = new String(document.order1.idnum.value);
		
		if(isNaN(num))
		{
			alert("נא להכניס תעודת זהות (רק מספרים)");
			document.order1.idnum.focus();
			return false;
		}
											
		if(num.length<9)
		{
			alert("נא להכניס תעודת זהות 9 ספרות בלבד");
			document.order1.idnum.focus();
			return false;
		}
		if(document.order1.address.value=="")
		{
			alert("נא להכניס כתובת למשלוח");
			document.order1.address.focus();
			return false;
		}	
	
										
	if(document.order1.phone.value=="")
	{
		alert("נא להכניס טלפון");
		document.order1.phone.focus();
		return false;
	}
							
	if(document.order1.email.value=="")
	{
		alert("נא להכניס דוא\"ל");
		document.order1.email.focus();
		return false;
	}
				
	if(!validMail(document.order1.email.value))
	{
		alert("נא להכניס דוא\"ל לא תקין");
		document.order1.email.focus();
		return false;
	}
							
	var collection;
	collection = document.all["radio1"];
	for (i=0;i<collection.length;i++)
	{
		if (collection[i].checked)
			radiovalue=collection[i].value;
	}
	if(radiovalue=="card")
	{
		if(document.order1.cardname.value=="")
		{
			alert("נא להכניס שם בעל הכרטיס");
			document.order1.cardname.focus();
			return false;
		}
								
		document.order1.idnumcard.value=num;
							
		if(document.order1.idnumcard.value=="")
		{
			alert("נא להכניס תעודת זהות");
			document.order1.idnumcard.focus();
			return false;
		}
							
		if(document.order1.cardnum.value=="")
		{
			alert("נא להכניס מספר כרטיס(ספרות בלבד)");
			document.order1.cardnum.focus();
			return false;
		}
							
		if(document.order1.backnum.value=="")
		{
			alert("נא להכניס המספר שמודפס בגב הכרטיס");
			document.order1.backnum.focus();
			return false;
		}
	}
	if(!document.all["tak"].checked)
	{
		alert("נא לסמן תנאי הרשמה");
		document.all["tak"].focus();
		return false;
	}															
	document.order1.submit();
	return true;
}

function cardshow()
{
	for(var i=0;document.getElementsByName("tdcard").length > i ;i++)
		document.getElementsByName("tdcard").item(i).style.display="";
}

function printorder(id,printorder){window.open("printorder.asp?id=" + id + "&printorder=" + printorder,null,"width=620, height=450, scrollbars=1");}
function cardhide()
{
	for(var i=0;document.getElementsByName("tdcard").length > i ;i++)
		document.getElementsByName("tdcard").item(i).style.display="none";
}
function del(id){window.location.href="basket_delitem.asp?id=" + id;}
function validcharscter(){if(event.keyCode < 48 || event.keyCode > 57) event.keyCode=0;	}
function updateQ(id,name)
{
	var collection="quantity" + name;
	if(document.all[collection].value!="")
		window.location.href="basketUpdateQ.asp?id=" + id + "&quantity=" + document.all[collection].value;
}

function plus(id)
{
	var collection="quantity" + id;
	document.all[collection].value=parseInt(document.all[collection].value) + 1;
}
					
function minus(id)
{
	var collection="quantity" + id;
	if(parseInt(document.all[collection].value)>1)
		document.all[collection].value=parseInt(document.all[collection].value) - 1;
}



function enlarge(id){window.open("enlarge.asp?id=" + id,null,"width=450, height=450, scrollbars=0");}
function enlarge2(id){window.open("enlarge2.asp?id=" + id,null,"width=450, height=450, scrollbars=0");}

function validNumber()
{
	if(event.keyCode < 48 || event.keyCode >57) event.keyCode=0;
}

function addToFavorites(url)
{
	window.external.AddFavorite('http://' + url,'Site name');
}

function validMail(strEmail) //if valid mail - return true
{
	var r, re;
	var email = new String(strEmail);
	re = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ig;
	if(email.search(re)==0) 
		return true;
	else
		return false;	
}

function printflash(src, w, h)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'" VIEWASTEXT>');
	document.write('<param name="movie" value="'+src+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="opaque">');
	document.write('</object>');	
}

function validform()
{
	if(document.contact.fname.value=="")
	{
	alert("נא לרשום שם פרטי");
	document.contact.fname.focus();
	return false;
	}
	if(document.contact.lname.value=="")
	{
	alert("נא לרשום שם משפחה");
	document.contact.lname.focus();
	return false;
	}
	
	if(document.contact.email.value=="")
	{
	alert("נא לרשום אי-מייל");
	document.contact.email.focus();
	return false;
	}
	if(!validMail(document.contact.email.value))
	{
	alert("נא לרשום אי-מייל");
	document.contact.email.focus();
	return false;
	}	
	
	if(document.contact.phone.value=="")
	{
	alert("נא לרשום טלפון");
	document.contact.phone.focus();
	return false;
	}
	document.contact.submit();
	return true;
}
function expand(s)
{
  var td = s;
  td.className = "menuHover";
  try 
	{
	var d = td.getElementsByTagName("div").item(0);
	d.className = "menuHover";
	}
  catch (e){}		
}

function collapse(s)
{
  var td = s;
  td.className = "menuNormal";
   try 
	{
	var d = td.getElementsByTagName("div").item(0);
	d.className = "menuNormal";
	}
  catch (e){}
}

//-->
