function ShowHide(obj)
{
	if (obj.style.display=="none")
		{
			obj.style.display="inline"
		}
	else
		{
			obj.style.display="none"
		}
}

function ShowHide(events)
{
	if (events.style.display=="none")
		{
			events.style.display=""
		}
	else
		{
			events.style.display="none"
		}
}
function color(thetext,pos)
{
	if (pos==1)
		{
			thetext.style.color="red"
		}
	else
		{
			thetext.style.color="#000099"
		}
}

function UBB($bericht){
	$bericht = str_replace("[b]", "<b>", $bericht);
	$bericht = str_replace("[/b]", "</b>", $bericht);
	$bericht = str_replace("[i]", "<i>", $bericht);
	$bericht = str_replace("[/i]", "</i>", $bericht);
	$bericht = str_replace("[u]", "<u>", $bericht);
	$bericht = str_replace("[/u]", "</u>", $bericht);
	$bericht = str_replace("[center]", "<center>", $bericht);
	$bericht = str_replace("[/center]", "</center>", $bericht);
	$bericht = str_replace("[move]", "<marquee>", $bericht);
	$bericht = str_replace("[/move]", "</marquee>", $bericht);
	$bericht = preg_replace("!\\[url\\]www.(.*)\\[/url\\]!Usi", "<a href=\"http://www.\\1\" target=_blank>\\1</a>",$bericht);
	$bericht = preg_replace("!\\[url\\](.*)\\[/url\\]!Usi","<a href=\"\\1\" target=_blank>\\1</a>",$bericht);
	$bericht = preg_replace("!\\[url=(.*)\\](.*?)\\[/url\\]!Usi","<a href=\"\\1\" target=_blank>\\2</a>",$bericht);
	$bericht = preg_replace("!\\[email\\](.*)\\[/email\\]!Usi", "<a href=\"mailto:\\1\">\\1</a>",$bericht);
	$bericht = preg_replace("!\\[img\\](.*)\\[/img\\]!Usi","<img src=\"\\1\" border=0>",$bericht);
	$bericht = preg_replace("!\\[swf width=(.*) height=(.*?)\\](.*?)\\[/swf\\]!Usi","<param name=quality value=high><param name=\"SRC\" value=\"\\3\"><embed src=\"\\3\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"\\1\" height=\"\\2\"></embed></object>", $bericht);
	
	return $bericht;
}
	
	function MaakOp($bericht){
	if(!$html)
		$bericht = htmlspecialchars($bericht);
	
	$bericht = ereg_replace("\n","<br>",$bericht);
	$bericht = UBB($bericht);
	$bericht = Smile($bericht);
	
	return $bericht;
}
function Add2Favorites(){
            var title = 'Brasiloca.co.il - פורטל ברזילאי';
            var url = 'http://www.Brasiloca.co.il';
            if (window.sidebar){
                // Mozilla Firefox Bookmark
                window.sidebar.addPanel(title, url,"");}
            else if( window.external ){
                // IE Favorite
                window.external.AddFavorite(url, title);}
}

var browser = navigator.appName;
var version = navigator.appVersion.substring(0, 1);
var ie =
  ((browser == "Microsoft Internet Explorer") &&
  (version >= 4))
;
var ns =
  ((browser == "Netscape") &&
  (version >= 4 && version < 5));
  
function setHomePage(siteURL) {
  if (ie) {
    document.body.style.behavior = "url(#default#homepage)";
    document.body.setHomePage('http://www.Brasiloca.co.il');
  } else
    alert(
      "הפוך לדף הבית היא אופצייה קיימת לדפדפני אקספלורר בלבד"
    );
}