﻿<!--
function enlarge(id){window.open("enlarge.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.name.value=="")
	{
	alert("נא לרשום שם ");
	document.contact.name.focus();
	return false;
	}
	if(document.contact.pelephone.value=="")
	{
	alert("נא לרשום טלפון");
	document.contact.pelephone.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 send(value)
{
	var str=new String(value);
	arr = str.split(";")
	window.location.href="faq.asp?category=" + arr[0].substring(0,4);
}	

function validform_small()
{
	if(document.contact.name.value=="")
	{
	alert("נא לרשום שם ");
	document.contact.name.focus();
	return false;
	}
	if(document.contact.tel.value=="")
	{
	alert("נא לרשום טלפון");
	document.contact.tel.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;
	//}	
	
	
	document.contact.submit();
	return true;
}
function numbersOnly(e) {
      var evt = (e) ? e : window.event;
      var key = (evt.keyCode) ? evt.keyCode : evt.which;

      if(key != null) {
        key = parseInt(key, 10);

        if((key < 48 || key > 57) && (key < 96 || key > 105)) {
          if(!isUserFriendlyChar(key))
            return false;
        }
        else {
          if(evt.shiftKey)
            return false;
        }
      }

      return true;
    }

    function isUserFriendlyChar(val) {
      // Backspace, Tab, Enter, Insert, and Delete
      if(val == 8 || val == 9 || val == 13 || val == 45 || val == 46)
        return true;

      // Ctrl, Alt, CapsLock, Home, End, and Arrows
      if((val > 16 && val < 21) || (val > 34 && val < 41))
        return true;

      // The rest
      return false;
    }
    function validform_big()
{
	if(document.contact1.name.value=="")
	{
	alert("נא לרשום שם מלא");
	document.contact1.name.focus();
	return false;
	}
	if(document.contact1.pelephone.value=="")
	{
	alert("נא לרשום טלפון");
	document.contact1.pelephone.focus();
	return false;
	}
	if(document.contact1.email.value=="")
	{
	alert("נא לרשום אי-מייל");
	document.contact1.email.focus();
	return false;
	}
	if(!validMail(document.contact1.email.value))
	{
	alert("נא לרשום אי-מייל");
	document.contact1.email.focus();
	return false;
	}	
	
	if(isNaN(document.contact1.pelephone.value))
	{
		alert("רק מספרים");
		document.contact1.pelephone.focus();
		return false;
	}
	num=new String(document.contact1.pelephone.value);									
	if(num.length < 9)
	{
		alert("נא לרשום טלפון");
		document.contact1.pelephone.focus();
		return false;
	}
	//if(num.length > 7)
	//{
	//	alert("נא לרשום טלפון");
	//	document.contact1.pelephone.focus();
	//	return false;
	//}

	document.contact1.submit();
	return true;
}

function validform_tipul()
{
	if(document.contact.name.value=="")
	{
	alert("נא לרשום שם מלא");
	document.contact.name.focus();
	return false;
	}
	if(document.contact.telephone.value=="")
	{
	alert("נא לרשום טלפון להתקשרות");
	document.contact.telephone.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.rishuy.value=="")
	{
	alert("נא לרשום מםפר רישוי");
	document.contact.rishuy.focus();
	return false;
	}
	document.contact.submit();
	return true;
}
//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="lightYellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}

//-->
