<!--


function  myprint(t,id)
{
	window.open("print.asp?id=" + id + "&t=" + t,null,"width=760, height=800, scrollbars=1")
}
function  myprintL()
{
	window.open("printL.asp",null,"width=760, height=800, scrollbars=1")
}
function ch()
{
	$.get("change.asp",function(data){$("#galery").html(data)})
	window.setTimeout("ch()",10000);
}
function nextm(dd)
{
	$.get(
			"ajax/calendar.asp",
			{d: dd}, 
			function(data)
			{
				$("#divACTIONS").html(data);
			}
		)
}


function setHomepage(url)
{
	if (document.all)
	{
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(url);
	}
	else if (window.sidebar)
	{
		if(window.netscape)
		{
			try
			{  
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			}  
			catch(e)  
			{  
				alert("This action was aviod by your browser.\n\rIf you want to enabl,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");  
			}
		} 
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage',url);
	}
}

function addToFavorites(url, title) 
{ 

	if(window.sidebar) 
	{ 
		// Mozilla Firefox Bookmark		
		window.sidebar.addPanel(title, url,"");	
	} 
	else 
	{
		if(window.external) 
			{ 
				// IE Favorite		
				window.external.AddFavorite(url,title); 
			}	
		else 
			if(window.opera && window.print) 
			{ 
				// Opera Hotlist		
				return true; 
			} 
	}		
}

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="transparent">');
	document.write('<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent">');
	document.write('</object>');	
}

function openclose(id)
{
	if(document.getElementById("_" + id).style.display=="none")
		document.getElementById("_" + id).style.display = "block";
	else
		document.getElementById("_" + id).style.display = "none";	
}


function validformR()
{
	if(document.contact.email.value=="")
	{
		alert("נא לרשום אי-מייל");
		document.contact.email.focus();
		return false;
	}
	document.contact.submit();
	return true;
}

function validformLogin()
{
	if(document.contact.username.value=="")
	{
		alert("נא לרשום שם המגמה");
		document.contact.username.focus();
		return false;
	}
	if(document.contact.password.value=="")
	{
		alert("נא לרשום סיסמא");
		document.contact.password.focus();
		return false;
	}
	document.contact.submit();
	return true;
}
							
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.phone.value=="")
	{
		alert("נא לרשום טלפון");
		document.contact.phone.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;
}
//-->
