﻿<!--
function enlarge2(id){window.open("enlarge2.asp?id=" + id,null,"width=800, height=700, scrollbars=0");}

function enlarge(id){window.open("enlarge.asp?id=" + id,null,"width=450, height=450, scrollbars=0");}

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){}
}

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.contactside.fullname.value=="" || document.contactside.fullname.value=="שם מלא:")
	{
	    alert("הכנס שם");
	    document.contactside.fullname.focus();
	    return false;
	}

//    if(document.contactside.phone.value=="" || document.contactside.phone.value=="טלפון:")
//	{
//	    alert("הכנס טלפון");
//	    document.contactside.phone.focus();
//	    return false;
//	}

	if(document.contactside.email.value=="" || document.contactside.email.value=="דואר אלקטרוני:")
	{
		alert("הכנס אימייל");
		document.contactside.email.focus();
		return false;
	}
	
	if(!validMail(document.contactside.email.value))
	{
		alert("אימייל שגויי");
		document.contactside.email.focus();
		return false;
	}	
	
    if(document.contactside.note.value=="" || document.contactside.note.value=="הודעה:")
	{
		alert("הכנס הודעה");
		document.note.email.focus();
		return false;
	}
	
	document.contactside.submit();
	return true;
}

function validformC()
{
	if(document.contact1.fullname.value=="")
	{
		alert("הכנס שם");
		document.contact1.fullname.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(document.contact1.message.value=="")
	{
		alert("הכנס הודעה");
		document.contact1.message.focus();
		return false;
	}

	document.contact1.submit();
	return true;
}


//Nested Side Bar Menu (Mar 20th, 09)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["boxcontent-ul"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas

function initsidebarmenu(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className+=" subfolderstyle"
  if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
   ultags[t].style.right=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
  else //else if this is a sub level submenu (ul)
    ultags[t].style.right=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
  for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
  ultags[t].style.visibility="visible"
  ultags[t].style.display="none"
  }
  }
}

if (window.addEventListener)
window.addEventListener("load", initsidebarmenu, false)
else if (window.attachEvent)
window.attachEvent("onload", initsidebarmenu)
//-->
