<!--

	function isEmail(Email_ad){
		x = Email_ad.indexOf("@");
		y = Email_ad.indexOf(".");
		if ((x == -1 || y == -1))
			return false;
		else
			return true;
	}
	
	function isPhone(num){
		str = num;
		var re=/[a-zA-Zא-ת]/g;
    if (re.test(str))
  		 return false;  
		else if ((num.length < 9) || (num.length > 11))
			return false;
		else
			return true;
	}

	//checkFrm
	function checkFrm(frm,formType) {
		if (frm.field_fname.value == ""){
			alert("נא למלא שם פרטי");
			frm.field_fname.focus();
			return false;
		}
		else if (frm.field_lname.value == ""){
			alert("נא למלא שם משפחה");
			frm.field_lname.focus();
			return false;
		}
		else if (frm.field_mobile.value == ""){
			alert("נא למלא מספר טלפון נייד");
			frm.field_mobile.focus();
			return false;
		}
		if ((frm.field_mobile.value != "") && (!isPhone(frm.field_mobile.value))){
			alert("נא למלא מספר טלפון נייד תקין");
			frm.field_mobile.focus();
			return false;
		}
		if (formType == 1) {
			if (frm.field_email.value == ""){
				alert("נא למלא כתובת מייל");
				frm.field_email.focus();
				return false;
			}
			else if ((!isEmail(frm.field_email.value))){
				alert("נא למלא כתובת מייל תקינה");
				frm.field_email.focus();
				return false;
			}
		}
		if (formType == 1 || formType == 3) {
			if (frm.field_city.value == ""){
				alert("נא למלא עיר");
				frm.field_city.focus();
				return false;
			}
		}
		if (formType == 2 ) {
			if (frm.field_company.value == ""){
				alert("נא למלא שם העסק");
				frm.field_company.focus();
				return false;
			}
			if (frm.field_company_field.value == ""){
				alert("נא למלא תחום העסק");
				frm.field_company_field.focus();
				return false;
			}
			if (frm.field_address.value == ""){
				alert("נא למלא כתובת העסק");
				frm.field_address.focus();
				return false;
			}
		}
		
		return true;
	}

//ADD TO FAVORITES
function addFavorites(url,title) {
	window.external.addfavorite(url,title);
}

function openWindow(theURL,picname,winName,features) {
  var winHandle = window.open('',winName,features)

  if(winHandle != null){
    var htmlString = "<html><head><title>"+ picname +" </title></head><body bgcolor=#000000 topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src='" + theURL + "'></body></html>"
    winHandle.document.open()
    winHandle.document.write(htmlString)
    winHandle.document.close()
    }	
  if(winHandle != null) winHandle.focus() //brings window to top
  return winHandle
  }

	var g_oForm = null ;
	var nSum
	var bSecurePoll = 0;
	function new_win(id){
	window.open('site/info.asp?id='+id,'','width=350,height=400')
	}
	function popUpPoll(objForm,id,N,bSecurePoll){
		nSum=0
		this.bSecurePoll += bSecurePoll ;
		g_oForm = objForm.form;
			
		if (g_oForm != null){
			for (i = 0 ; i < N ; i++){
				if (g_oForm.option[i].checked) {
					nSum = g_oForm.option[i].value;
				}
			}
			objForm.disabled = true;
		}
		//alert(nSum);
			
		if (bSecurePoll == 1){
			popupWin = window.open ('site/Survey_login.asp?id='+id+'&Answer_id='+nSum,'aa','width=450,height=300')
		}
		else{
			popupWin = window.open ('site/Survey_result.asp?id='+id+'&Answer_id='+nSum,'aa','width=450,height=300')
		}
		//popupWin.focus();
	}
	//g_oForm.r1[0].checked=true

function up(x){
	HomePageNews.behavior="scroll"
	HomePageNews.scrollAmount = 2
	HomePageNews.direction= "up"
	x.src="images/Cube/moveprevious2.gif"
}
function down(x){
	HomePageNews.behavior="scroll"
	HomePageNews.scrollAmount = 2
	HomePageNews.direction="down"
	x.src="images/Cube/movenext2.gif"
}
function stop(){
	HomePageNews.scrollAmount = 0;
}
function validForm(){
	if (document.formi.searchAll.value == "" )
		return alert ("חובה להזין מילת חיפוש");
	formi.submit();  
}

fontSize = 2;

function change_font(x){
	if (x==1) {document.body.style.fontSize = parseFloat(12) + "px";fontSize=1;}
	else if (x==2) {document.body.style.fontSize = parseFloat(14) + "px"; fontSize=2;}
	else {document.body.style.fontSize = parseFloat(15) + "px"; fontSize=3;}
}

function change_font_arr(isSmall){
	if (isSmall == 1 && fontSize > 1){
		fontSize--;
	}
	if (isSmall == 0 && fontSize < 3){
		fontSize++;
	}

	if (fontSize==1) {document.body.style.fontSize = parseFloat(12) + "px";fontSize=1;}
	else if (fontSize==2) {document.body.style.fontSize = parseFloat(14) + "px"; fontSize=2;}
	else {document.body.style.fontSize = parseFloat(15) + "px"; fontSize=3;}
}

function getPrevNewsItem(){
	var liNewsNum = document.newsFrm.newsNum.value;
	var liNewsSelected = document.newsFrm.newsSelected.value;

	for (i=0; i<liNewsNum;i++){
		getElement("newsItem_"+i).style.display = 'none';
	}
	liNewsSelected--;

	if (liNewsSelected < 0)
		liNewsSelected = liNewsNum-1;
		
	getElement("newsItem_"+liNewsSelected).style.display = 'block';
	document.newsFrm.newsSelected.value = liNewsSelected;
}

function getNextNewsItem(){
	var liNewsNum = document.newsFrm.newsNum.value;
	var liNewsSelected = document.newsFrm.newsSelected.value;
	
	for (i=0; i<liNewsNum;i++){
		getElement("newsItem_"+i).style.display = 'none';
	}
	liNewsSelected++;

	if (liNewsSelected >= liNewsNum)
		liNewsSelected = 0;
		
	getElement("newsItem_"+liNewsSelected).style.display = 'block';
	document.newsFrm.newsSelected.value = liNewsSelected;
}

function getElement(aID){ 
  return (document.getElementById) ? document.getElementById(aID) : document.all[aID];
//	alert(document.getElementById(aID));
} 

//-->

