		function addFav(title,url) 
		{ 
			if (window.sidebar) { 
				window.sidebar.addPanel(title, url,""); 
			} 
			else if( document.all ) { 
				window.external.AddFavorite( url, title); 
			} 
			else if( window.opera && window.print ) { 
				return true; 
			} 
		}

		function init()
		{
			var img1 = new Image();
			img1.src = "http://newsletter.namaste.co.il/style/images/postButtons/open_arrow.gif"		
			var img2 = new Image();
			img2.src = "http://newsletter.namaste.co.il/style/images/postButtons/close_arrow.gif"
		}

		function blockPoping(letterID,categoryID,letterPostID)
		{
			var blockObj	= eval("document.all.block_"+categoryID+"_"+letterPostID);
			var imgObj		= eval("document.all.img_"+categoryID+"_"+letterPostID);
			var imgCounter  = eval("document.all.imgCounter_"+categoryID+"_"+letterPostID);
			var imgCounterHits  = eval("document.all.imgCounterHits_"+categoryID+"_"+letterPostID);

			if (blockObj.style.display == "")
			{
				imgObj.src="http://newsletter.namaste.co.il/style/images/postButtons/open_arrow.gif"

				blockObj.style.display="block";
				fullHeight = blockObj.offsetHeight;					
				blockObj.style.overflow = "hidden";
				blockObj.style.height = fullHeight + "px";
				closeBox(blockObj.id,fullHeight)
			}
			else
			{
				blockObj.style.display="block";
				fullHeight = blockObj.offsetHeight;					
				blockObj.style.overflow = "hidden";
				blockObj.style.display="";
				blockObj.style.height = "1px";
				showBox(blockObj.id,fullHeight )

				imgObj.src="http://newsletter.namaste.co.il/style/images/postButtons/close_arrow.gif"

				if (imgCounter.src != "http://newsletter.namaste.co.il/pub/redirecturl.asp?letterID="+letterID+"&letterPostID="+letterPostID+"&categoryID="+categoryID+"&urlType=block&url=block")
					imgCounter.src="http://newsletter.namaste.co.il/pub/redirecturl.asp?letterID="+letterID+"&letterPostID="+letterPostID+"&categoryID="+categoryID+"&urlType=block&url=block"

				imgCounterHits.src="http://newsletter.namaste.co.il/pub/redirecturl.asp?letterID="+letterID+"&letterPostID="+letterPostID+"&categoryID="+categoryID+"&urlType=blockHits&url=blockHits"
					
			}		

		}	
						
function showBox(id, Height) {
	var objContent = document.getElementById(id);

	var boxHeight = objContent.style.height;
	boxHeight = parseInt(boxHeight.replace('px',''));
	boxHeight = boxHeight + 4 + parseInt((Height - boxHeight)/8);

	if (boxHeight>=Height) boxHeight = Height;

	objContent.style.height = boxHeight+'px';
	//if ((boxHeight/Height)!=0) objContent.style.MozOpacity= (boxHeight/Height);

	if (boxHeight!=Height) {
		var boxInterval = "showBox('" + id + "','" + Height + "')";
		setTimeout(boxInterval, 10);
	} else {
		objContent.style.overflow = "visible";
		objContent.style.height = "";
	}
}

function closeBox(id, Height) {
	var objContent = document.getElementById(id);

	var boxHeight = objContent.style.height;
	boxHeight = parseInt(boxHeight.replace('px',''));
	boxHeight = boxHeight - 4 + parseInt((boxHeight - Height)/8);

	if (boxHeight<=0) boxHeight = 0;

	objContent.style.height = boxHeight+'px';
	//objContent.style.MozOpacity = (boxHeight/Height);

	if (boxHeight==0) {
		objContent.style.display='none';
	} else {
		var boxInterval = "closeBox('" + id + "','" + Height + "')";
		setTimeout(boxInterval, 10);
	}
}

	function checkEMail(eMail)//of add my e-mail to mailing list
	{
		var shtrudIdx = eMail.indexOf("@");
		
		if (shtrudIdx <= 0) return false;
		if (eMail.charAt(eMail.length-1) == "@") return false;
		
		var secondPart = eMail.substring(shtrudIdx+1,eMail.length);
		
		if (secondPart.indexOf(".") <= 0) return false;
		if (eMail.indexOf("..") != -1) return false;
		if (eMail.indexOf("@@") != -1) return false;
		if (eMail.indexOf(" ") != -1) return false;
		if (eMail.charAt(eMail.length-1) == ".") return false;

		return true;	
		
	}

	function checkForm()//of add my e-mail to mailing list
	{
		if (document.frm.txtEMail.value == "")
		{
			alert("Please enter a valid e-mail address in the textbox");
			document.frm.txtEMail.focus();
			return false;
		}
		else if (checkEMail(document.frm.txtEMail.value)==false)
		{
			alert("Please enter a valid e-mail address in the textbox");
			document.frm.txtEMail.value = "";
			document.frm.txtEMail.focus();
			return false;
		}
		else
		{
			return true;
		}
	}