<!--

// Scripts for changing sample pictures, showing and hiding the samples information window, and changing the text in the info window according to the currently displayed picture

var currentSample = 0;
var isInfoWindowVisible = true;
var sampleDescriptionText = "<h1>טוען דוגמא...</h1>";


// Changes to the next sample picture when the user clicks the navigation arrow
function showNextSample ()
{
	currentSample = currentSample + 1;
	if (currentSample > 7)
		currentSample = 0;
	updateSampleText (-1);
	updateSample ();
}

// Changes to the previous sample picture when the user clicks the navigation arrow
function showPreviousSample ()
{
	currentSample = currentSample - 1;
	if (currentSample < 0)
		currentSample = 7;
	updateSampleText (-1);
	updateSample ();
}

// Updates the current sample picture and text when the user clicks a navigation arrow. It loads the sample file that has the corresponding number as the current sample variable
function updateSample ()
{
	document.getElementById ("sampleImage").src = "Images/Sample" + currentSample + ".png";

	// Update the sample text only after the image has finished loading
	//if (document.getElementById ("sampleImage").complete)
	document.getElementById ("sampleImage").onload = function ()
	{
		updateSampleText (currentSample);
	}
}

// Updates the current sample description, according to the sample number
function updateSampleText (sampleNumber)
{
	switch (sampleNumber)
	{
		case -1:
			sampleDescriptionText = "<h1>טוען דוגמא...</h1>";
			break;

		case 0:
			sampleDescriptionText = "<h1>שובר מתנה ממוקד לקוח</h1><br /><p>ממוען אישית ללקוח קצה.<br />מאובטח למניעת שימוש לא כשר, באמצעות מספור אוטומטי.</p><br /><p>מאפיינים ראויים לציון:</p><h2>קוד פריט משתנה על פי הקידוד בחנות. אפשרות לברקוד, חד או דו-מימדי.</h2>";
			break;

		case 1:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>מופק בגירסה שונה, עבור כל לקוח קצה.<br />כל תכולתו: טבלאות, גרפים, תמונות ומלל, מיובאת מבסיס הנתונים ומעומדת אוטומטית בכפוף לעיצוב.</p><br /><p>מאפיינים ראויים לציון:</p><h2>הטמעת חשבונית מס כחלק מהדיווח החודשי, חוסכת משלוח חשבונית באופן נפרד.</h2>";
			break;

		case 2:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>מופק בגירסה שונה, עבור כל לקוח קצה.<br />כל תכולתו: טבלאות, גרפים, תמונות ומלל, מיובאת מבסיס הנתונים ומעומדת אוטומטית בכפוף לעיצוב.</p><br /><p>מאפיין ראוי לציון:</p><h2>תמונות לפי בחירת הלקוח, כרקע לגרפים.</h2>";
			break;

		case 3:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>מופק בגירסה שונה, עבור כל לקוח קצה.<br />כל תכולתו: טבלאות, גרפים, תמונות ומלל, מיובאת מבסיס הנתונים ומעומדת אוטומטית בכפוף לעיצוב.</p><br /><p>מאפיינים ראויים לציון:</p><h2>תמיכה בשפות זרות, שילוב פירסום משתנה לפי לקוח קצה, שילוב אוטומטי של ברכת יום הולדת בחודש המתאים.</h2>";
			break;

		case 4:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>מופק בגירסה שונה, עבור כל לקוח קצה.<br />כל תכולתו: טבלאות, גרפים, תמונות ומלל, מיובאת מבסיס הנתונים ומעומדת בכפוף לעיצוב.</p>";
			break;

		case 5:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>הפקת דוח על עשיית שוק במניה הנסחרת בבורסה. הנתונים של כ-100 מניות שונות מתעדכנים אוטומטית כל חודש.</p><br /><p>מאפיין ראוי לציון:</p><h2>הדוחות ממוענים אלקטרונית אל חברות האחזקות של המניות.</h2>";
			break;

		case 6:
			sampleDescriptionText = "<h1>דיווח פיננסי ממוקד לקוח</h1><br /><p>מופק בגירסה שונה, עבור כל לקוח קצה.<br />כל תכולתו: טבלאות, גרפים, תמונות ומלל, מיובאת מבסיס הנתונים ומעומדת אוטומטית בכפוף לעיצוב.</p><br /><p>מאפיין ראוי לציון:</p><h2>שיבוץ תמונה וחתימה אישית של איש קשר, המשתנים אוטומטית לפי לקוח הקצה.</h2>";
			break;

		case 7:
			sampleDescriptionText = "<h1>קטלוג מוצרים</h1><br /><p>קטלוג מוצרים ממוקד לקוח. מופק בגירסות שונות ללקוחות קצה שונים. תכולתו, ברמת התמונות והמלל, מיובאת מבסיס הנתונים ומעומדת אוטומטית בכפוף לעיצוב.</p><br /><p>מאפיין ראוי לציון:</p><h2>קטלוג יעודי חוסך בעלות יצור, בשטחי אחסון, ומצמצם למינימום השמדת עודפים בלתי מנוצלים.</h2>";
			break;

		case 8:
			sampleDescriptionText = "";
			break;
	}

	document.getElementById ("infoTextWindow").innerHTML = sampleDescriptionText;
}

// Shows or hides the sample information window
function toggleInfoWindow ()
{
	// If the window is visible
	if (isInfoWindowVisible)
	{
		// Hide it and change the toggle button text
		document.getElementById ("infoWindow").style.visibility = "hidden";
		document.getElementById ("infoTextWindow").style.visibility = "hidden";
		document.getElementById ("infoWindowToggleText").innerHTML = "להצגת מאפייני המוצר";
		isInfoWindowVisible = false;
	}
	else
	// If the window is hidden
	{
		// Update the window's contents, show it and change the toggle button text
		updateSample ();
		document.getElementById ("infoWindow").style.visibility = "visible";
		document.getElementById ("infoTextWindow").style.visibility = "visible";
		document.getElementById ("infoWindowToggleText").innerHTML = "להסתרת מאפייני המוצר";
		isInfoWindowVisible = true;
	}
}

//-->

