var last_div='bar';

function goFibi(url)
{
	location.href = url;
}

function changeDivStyle(divName,showHide)
{
	try
	{
		if(showHide)
		{
			document.getElementById("rightMenu"+divName).className  = "rightbartextHover";
			document.getElementById("rightMenuLink"+divName).className  = "rightbartextHover";
		}
		else
		{
			document.getElementById("rightMenu"+divName).className  = "rightbartext";
			document.getElementById("rightMenuLink"+divName).className  = "rightbartext";
		}
	}
	catch(e)
	{
		alert("changeDivStyle: "+e.message);
	}
}

function chng_div(divName)
{
	try
	{
		divName = "ben";
		if(document.getElementById(""+divName).style.visibility == "visible")
			document.getElementById(""+divName).style.visibility = "hidden"
		else
			document.getElementById(""+divName).style.visibility = "visible"
		
			
		
	}
	catch(e)
	{
		//alert("chng_div: "+e.message);
	}
}

function openWind(winHref, winName, winWidth, winHeight,winLeft,winTop)
{
	if (winName==null)  winName="";
	if (winWidth==null) winWidth=516;
	if (winHeight==null)winHeight=505;
	if (winLeft==null)  winLeft=10;
	if (winTop==null)   winTop=10;
	if (! window.focus) return true;
	var href;
	if (typeof(winHref) == 'string')
	   href=winHref;
	else
	   href=winHref.href;
	winStr="width=" + winWidth + ", height=" + winHeight + ", scrollbars=yes, left= " + winLeft + ", top= " + winTop
	window.open(href, winName, winStr);
}
function doSearch(sInput)
{	
	var input;
	input=document.getElementById(sInput);
	//alert(input.value);
	if(input.value=='')
	{
		alert('אנא הכנס מילת חיפוש');
		input.focus();
		return;
	}
	if(input.value.indexOf("script")>-1)
	{
		alert('מילה לא חוקית');
		document.all[sInput].value="";
		document.all[sInput].focus();
		return;
	}
	else
	{
		//alert(input.value);
		document.SearchForm.submit();
	}
}

function onEnter(sInput){
	if(event.keyCode==13) doSearch(sInput);
}
function displayDiv(myOwnDiv,divToHide,offClass,onClass)
{
	if(document.all(""+divToHide).style.display == "")
	{
		document.all(""+divToHide).style.display = "none";
		document.all(""+myOwnDiv).className = offClass;			
	}
	else
	{
		document.all(""+divToHide).style.display = "";
		document.all(""+myOwnDiv).className = onClass;
	}
}
function showHideTR(trId)
{		
	try
	{
		var documentNumber = trId.indexOf("_",4)+1;
		var nameOfDiv      = "";
		var nameOfSpacer   = "";
		var originalName   = "";
		documentNumber     = trId.substring(documentNumber);
		documentNumber     = parseInt(documentNumber)
			
		for(var i=0;i<=documentNumber;i++)
		{
			nameOfDiv    = trId.indexOf("_",4);
			nameOfDiv    = trId.substring(0,nameOfDiv);
			nameOfDiv   +="_"+i;			
			nameOfSpacer = nameOfDiv +"_spacer";
			var el       = document.getElementById(nameOfDiv);		
			var elSpacer = document.getElementById(nameOfSpacer);	
			
			if(el != null)
			{
				if(el.style.display == "")
				{
					el.style.display = "none";
					elSpacer.style.display = "none";
				}
				else
				{
					el.style.display = "";
					elSpacer.style.display = "";
				}
			}
		}
	}
	catch(e)
	{
		alert(e.message);
	}
}
function open_win()
{
	window.open("message3.html","message","width=450,height=160,fullscreen=0,resizable=yes,scrollbars=0,menubar=0,toolbar=0,status=0,location=0,top=137,left=250")
}
function open_win1()
{
	window.open("flash.html","flash","width=176,height=131,fullscreen=0,resizable=yes,scrollbars=0,menubar=0,toolbar=0,status=0,location=0,top=150,left=350")
}
function open_win2()
{
	window.open("message4.html","message4","width=450,height=210,resizable=no,scrollbars=0,menubar=0,toolbar=0,status=0,location=0,top=137,left=400")
}

function chng(pic_location,pic)
{
	document[pic_location].src=pic
}

function changeEnDivStyle(divName, showHide)
{
	try
	{
		if(showHide)
		{
			document.getElementById(divName).className  = "rightbartextHover";
			document.getElementById(divName).className  = "rightbartextHover";
		}
		else
		{
			document.getElementById(divName).className  = "rightbartext";
			document.getElementById(divName).className  = "rightbartext";
		}
	}
	catch(e)
	{
		alert("changeDivStyle: "+e.message);
	}
}














