// JavaScript Document


var curr_popup = "";

texts = new Array();
texts[0]="<img src='img/af_title_1.gif' class='margin_b_5'><br>It's not only about mixing exotic spices or creating delicate mousses.It is more than just an excellent gourmet product. Chocolate, more than any other food, is integrated in to many aspects of our lives. It is a symbol of contradicting emotions and sensations. On one hand, it is the most <strong>romantic</strong> gift, on the other hand it is a <strong>commodity</strong> which is traded on the stock exchange. It is sold like a <strong>prestigious</strong> piece of jewelry carefully selected from a glass case but also as an <strong>addictive</strong> snack available at every corner store. It is tasted like a <strong>fine</strong> wine and licked off of fingers dipped straight in to the bowl. It is <strong>sexy, nostalgic,</strong> and forever an object of <strong>fantasy</strong> for children and grownup children. These diverse chocolate associations are the inspiration behind Max Brenner's new chocolate culture.";
texts[1]="<img src='img/af_title_2.gif' class='margin_b_5'><br><strong>I don't invent anything in chocolate. It is all exists in people's minds and hearts.</strong> I just express it in the most evident way- a way that everyone imagines chocolate and wishes to experience it. Until now, chocolate was sold in a manner that contradicts its sensual, warm and joyful character.. Restrained ambiance. Untouchable. Closed behind a glass barrier. I have &quot;freed&quot; chocolate from its cage. I let people experience it to the fullest. I allow people to enjoy it to the max. It's so simple. <strong>All you have to do is just really love chocolate!!</strong>";
texts[2]="<img src='img/af_title_3.gif' class='margin_b_5'><br>In order to create a chocolate culture we must broaden our perceptions of chocolate. Chocolate should no longer be viewed solely as a gourmet product, but also as a symbol of diverse human emotions. The new Max Brenner chocolate culture is experimental and emotional and incorporates each aspect of chocolate and its relation to our lives. This new culture  respects the chocolate tradition, recognizing it as one of the many elements on which it is based, and it  has its own take on every chocolate product existing within the traditional market.";
texts[3]="<img src='img/af_title_4.gif' class='margin_b_5'><br>The chocolate bar is the shrine of the new chocolate culture.<br>Chocolate is expressed everywhere: in music, in design, and on the menu. It surrounds you and carries you away into the intimate excitement of your own <strong>chocolate mood.</strong> Imagine a world of huge chocolate bricks, delicate candles, fine pralines, French chansons, crates of cocoa beans from exotic countries, colorful toy tins with ribbons, and melted chocolate poured on warm pastries. Smell, see, listen, taste, and touch chocolate. Surrender yourself to a holistic <strong>sensual experience.<br><br>Taste now!!</strong> <a href= 'javascript:switchPopup()'>The chocolate bar menu</a>";
texts[4]="<img src='img/a_title_5.gif' class='margin_b_5'><br><strong>1991- 1995:</strong> Max works as an apprentice throughout Europe alongside world renowned pastry and chocolate experts such as Georg Maushagen in Germany, the chocolatier Michelle Chaudun in Paris, and at  Fauchon. Through his Work in Paris, Max is exposed to some of leading, young and trendy fashion designers of that time including Thierry Mougler and Jean Paul G. These figures serve as a stimulus for Max and awaken his passion for"+
		 " esthetics, design and contemporary branding.<br><br><strong>1996- 1999:</strong> Max opens the small workshop where he markets his first confections which he sells himself . He  offers tastes cut from huge chocolate slabs and melted chocolate right out of his mixing bowl. The store looks more like a top fashion designer's boutique more than a chocolate shop. Max begins to expose people to the wild sides of cocoa. Ten chocolate stores are opened"+
		 " during these years. The love expressed by the public towards the brand reveals the emotional connection achieved through his new presentation of the chocolate experience.<br><br>"+
		 "<strong>2000:</strong>  Max attends the Fancy Food Show in San Francisco. Based on the experience he has acquired throughout the previous years in Israel he decides to redefine the look and message of the company. Max aspires to take chocolate to a whole new level. For"+
		 " the first time people have the chance to experience all the  virtues, qualities and associations of chocolate to the max.<br><br><strong>2001:</strong> Strauss- Elite, one of the largest food cooperations in Israel, acquires the brand adding the professional management skills, operational production abilities and financial strength that will support the company's strategy for global growth.<br><br><strong>2002- 2005:</strong> The chocolate culture"+
		 " concept is continuously developed and enhanced, to fully realize the company's vision.<br><br><strong>2006:</strong> The chocolate culture concept and the Chocolate Bar experience is brought to the American market. <br><br><strong>Max's ultimate dream is, one day, to create his own chocolate bald man city.</strong><br>";
texts[5]="<img src='img/af_title_6_a.gif' class='margin_b_5'><br>(the chocolate bar)<br>Max Brenner chocolate culture is a holistic experience, its center is the chocolate bar which combines a bar and a shop allowing you to experience your shopping at the bar and shop your experience at the chocolate shop.<br><br>In the chocolate shop you can find the &quot;Hug Mug&quot; – a mug specially designed for the chocolate drinking ceremony, &quot;Suckao&quot;, &quot;Fresh&quot; – the very chocolaty Max Brenner truffle cream, Pralines, Pastries and cookies full of chocolate goodies.<br>Enjoy.<br><img src='img/af_title_6_b.gif' class='margin_b_5'><br>(the chocolate shop)";
	

titles = new Array();
titles[0] = "THE CHOCOLATE CULTURE PHILOSOPHY";
titles[1] = "MAX'S THOUGHTS ON THE CHOCOLATE CULTURE CREATION";
titles[2] = "CHOCOLATE VS. TRADITION";
titles[3] = "CHOCOLATE EXPERIENCE";
titles[4] = "A HISTORY OF A YOUNG COMPANY";
titles[5] = "THE CHOCOLATE SHOP";



function ShowPopup(which) {	
	var shade = top.document.getElementById("shade_cont");
	var popup = top.document.getElementById(which);
	shade.className = "shadow visible";
	popup.className = "popup visible";
	shade.style.height = document.body.scrollHeight;
	//var midy = shade.offsetHeight/2 - popup.offsetHeight/2;
	var midx = shade.offsetWidth/2 - popup.offsetWidth/2;
	var midy = document.body.scrollTop + 100;//shade.offsetHeight/2 - popup.offsetHeight/2;
	popup.style.top = midy+"px";
	popup.style.left = midx+"px";
}

function HidePopup(which) {
	var shade = top.document.getElementById("shade_cont");
	var popup = top.document.getElementById(which);
	shade.className = "shadow hidden";
	popup.className = "popup hidden";
	if (which == "s_popup" || which == "im_popup")  {
		var img = document.getElementById(which + "_img");
		img.src = "img/spacer.gif";
		var mtitle = document.getElementById(which + "_title");
		mtitle.src = "img/spacer.gif";
	}
}


function ImgPopup(which, pic) {	
	if (pic != '') {
		var img = document.getElementById(which + "_img");
		img.src = "img/b_" + pic + ".jpg";
	}
	window.setTimeout('Adjust("'+which+'")',100);
}

function SetSpecialPic(id) {
	switch (id) {
		case 1: document.getElementById("sp_pic").src = "img/loc_israel_hz.jpg"; break;
		case 2: document.getElementById("sp_pic").src = "img/loc_israel_tr.jpg"; break;
		case 3: document.getElementById("sp_pic").src = "img/loc_israel_tp.jpg"; break;
		case 4: document.getElementById("sp_pic").src = "img/loc_israel_rt.jpg"; break;
	}
}

function Adjust(who) {
	var shade = document.getElementById("shade_cont");
	var popup = document.getElementById(who);
	shade.className = "shadow visible";
	popup.className = "popup visible";
	popup.style.left = Math.round(document.body.scrollWidth/2 - popup.offsetWidth/2)+"px";
	popup.style.top = Math.round(document.body.scrollHeight/2 - popup.offsetHeight/2)+"px";
}


function aboutPopup(which, num)  {
	var txt_num = parseInt(num) - 1;
	var p_name = which;
	// change image
	if (p_name == "i_popup")  {
		var img = document.getElementById(p_name + "_img");
		img.src = "img/about_b_" + num + ".jpg";
		var title = document.getElementById(p_name + "_title");
		title.src = "img/a_title_" + num + ".gif";
	// change text
	}	else	{
		var title = document.getElementById(p_name + "_title");
		var txt = document.getElementById(p_name + "_txt");
		txt.innerHTML = texts[txt_num];
		
		title.src = "img/a_title_" + num + ".gif";
	}
	var shade = document.getElementById("shade_cont");
	var popup = document.getElementById(p_name);
	shade.className = "shadow visible";
	popup.className = "popup visible";
	var midx = shade.offsetWidth/2 - popup.offsetWidth/2;
	var midy = shade.offsetHeight/2 - popup.offsetHeight/2;
	popup.style.top = midy+"px";
	popup.style.left = midx+"px";	
	curr_popup = num;
}


function openAboutPopup(num){
	
	var title = document.getElementById("s_popup_title");
	title.src = "img/a_title_" + num + ".gif";
	
	var img = document.getElementById("s_popup_img");
	var imgCont = document.getElementById("s_popup_img_cont");
	imgCont.className = "visible";
	img.src = "img/about_b_" + num + ".jpg";
	
	var contTxt = document.getElementById("s_popup_txt_cont");
	contTxt.className = "popup_text hidden";
	
	var btn = document.getElementById("s_btn");
	btn.src = "img/btn_read.gif";
	
	var shade = document.getElementById("shade_cont");
	var popup = document.getElementById("s_popup");
	shade.className = "shadow visible";
	popup.className = "popup visible";
	var midx = shade.offsetWidth/2 - popup.offsetWidth/2;
	var midy = shade.offsetHeight/2 - popup.offsetHeight/2;
	popup.style.top = midy+"px";
	popup.style.left = midx+"px";	
	curr_popup = num;
}



function switch_Image_Text() {
	var txt = document.getElementById("s_popup_txt");
	var contTxt = document.getElementById("s_popup_txt_cont");
	var img = document.getElementById("s_popup_img");
	var contImg = document.getElementById("s_popup_img_cont");
	var btn = document.getElementById("s_btn");
	var txt_num = parseInt(curr_popup) - 1;
	
	if (contImg.className == "visible") {
		contTxt.className = "popup_text visible";
		contImg.className = "hidden";
		txt.innerHTML = texts[txt_num];
		btn.src = "img/btn_img_on.gif";
	} else {
		contImg.className = "visible";
		contTxt.className = "popup_text hidden";
		img.src =  "img/about_b_" + curr_popup + ".jpg";
		btn.src = "img/btn_read_on.gif";
	}
}


function  switchPopup()		{
	HidePopup('s_popup'); 
	ShowPopup('m_popup');
}

