/*
----------------------------------------------------------------------------------------------------------------------
ENGLISH
This script is free usable as long as the copyright advice is displayed.
(c) 2005-2007 www.yaoti.com

DEUTSCH
Dieses Script ist kostenlos nutzbar solange der Copyright Hinweis angezeigt wird
(c) 2005-2007 www.yaoti.com
----------------------------------------------------------------------------------------------------------------------
*/



/*var FLV = "http://www.yaoti.org/flv/test.flv"; */

var FLV = "http://floridafriendlyplants.com/Yaoti/MY133.flv";

/*
ENGLISH
FLV: URL of the movie
VALUES: valid URL, e.g. "http://www.domain.tld/folder/file.flv";
Enter the addess of the clip you want to play. Usually our clipnames include the dimensions 
( width x height ) of the clip.

DEUTSCH
FLV: URL des Clips
WERTE: Gültige URL, z.B. "http://www.domain.tld/ordner/datei.flv";
Geben Sie hier die Adresse des Clips an, den Sie abspielen wollen. Unsere Clipnamen enthalten 
im allgemeinen die Größe (Breite x Höhe ) des Clips. 
*/



var CLIPNAME = "meinClip1";
/*
ENGLISH
Name of the clip. You have to give your clip a unique name, you can only use once.
For every additional clip please give other unique names, e.g. myClip1 
The following clips you can name for example myClip2, myClip3, ...

DEUTSCH
Name des Clips. Hier müssen Sie Ihrem Clip einen eindeutigen Namen zuweisen, der nur einmal 
verwendet werden darf, für jeden weiteren Clip vergeben Sie bitte weitere eindeutige Namen.
Bsp.: meinClip1. Die darauffolgenden Clips können Sie dann beispielsweise fortlaufend benennen 
meinClip2, meinClip3, ...
*/



var POSMODE = "STATIC"; 
/*
ENGLISH
POSMODE: Setting up the positioning
VALUES: OVERLAY, STATIC
If OVERLAY is adjusted the clip appears layed over the page and the text and is moved in dependency 
of the browser window size ( overlay.html ). If STATIC is adjusted the clip appears fixed in the place 
you put the code. ( static_div.html / static_table.html )

DEUTSCH
POSMODE: Einstellen der Positionierung. WERTE: "OVERLAY", "STATIC"
Wenn auf "OVERLAY" gestellt, verschiebt sich der Clip proportional zur Browserfenster Größe und
erscheint über der Seite und dem Text  ( overlay.html )
Wenn auf "STATIC" gestellt, erscheint der Film genau an der Stelle, wo das Script eingebaut ist.
( static_div.html / static_table.html )
*/



var PLSK = "3";
/* 
ENGLISH
Choose a player skin, valid are between 1 and 10. You find a preview of all available player 
http://www.yaoti.biz/player/

DEUTSCH
Wählen Sie eine Playeroberfläche aus. Zulässig ist ein Wert zwischen 0 und 10
Eine Vorschau zum Design der einzelnen Playeroberflächen finden Sie hier:
http://www.yaoti.biz/player/
*/



var POSX = 100; 
/*
ENGLISH
POSX: Setting up the horizontal position (only if POSMODE=OVERLAY!)
VALUES: 0-100
If "0" is adjusted the clip appears on the left side
If "50" is adjusted the clip appears in the middle
If "100" is adjusted the clip appears on the right side

DEUTSCH
POSX: Einstellen der horizontalen Position (nur wenn POSMODE=OVERLAY!)
WERTE: 0-100
Wenn auf "0" gestellt, erscheint der Film ganz links
Wenn auf "50" gestellt, erscheint der Film in der Mitte
Wenn auf "100" gestellt, erscheint der Film ganz rechts
*/




var POSY = 100;
/*
ENGLISH
POSY: Setting up the vertical position (only if POSMODE=OVERLAY!)
VALUES: 0-100
If "0" is adjusted the clip appears on the top of the page
If "50" is adjusted the clip appears in the middle of the page
If "100" is adjusted the clip appears on the bottom of the page

DEUTSCH
POSY: Einstellen der vertikalen Position (nur wenn POSMODE=OVERLAY!)
WERTE: 0-100
Wenn auf "0" gestellt, erscheint der Film ganz oben
Wenn auf "50" gestellt, erscheint der Film in der Mitte
Wenn auf "100" gestellt, erscheint der Film ganz unten
*/




var WIDTH = 240;
/*
ENGLISH
WIDTH: Setting up the width 
VALUES: All numbers > 0
Usually our clipnames include the dimensions ( width x height ) of the clip.
Enter the width of the FLV-file you want to be played

DEUTSCH
WIDTH: Einstellen der Breite
WERTE: Alle Zahlen > 0
Der Clipname enthält im allgemeinen die Größe (Breite x Höhe ) des Clips. 
Geben Sie hier die Breite der abzuspielenden FLV-Datei an
*/




var HEIGHT = 400; 
/*
ENGLISH
HEIGHT: Setting up the height
VALUES: All numbers > 0
Usually our clipnames include the dimensions ( width x height ) of the clip.
Enter the height of the FLV-file you want to be played

DEUTSCH
HEIGHT: Einstellen der Höhe
WERTE: Alle Zahlen > 0
Der Clipname enthält im allgemeinen die Größe (Breite x Höhe ) des Clips. 
Geben Sie hier die Höhe der abzuspielenden FLV-Datei an
*/




var AUTO_PLAY = "off"; 
/*
ENGLISH
AUTO_PLAY: Setting up the auto play
VALUES: "on","off"
If "on" is adjusted the clip will be played directly
If "off" is adjusted the user has to press the "play" button first


DEUTSCH
AUTO_PLAY: Einstellen der Abspielautomatik
WERTE: "on","off"
Wenn auf "on" gestellt, wird der Film direkt abgespielt
Wenn auf "off" gestellt, muss der User erst auf den "Play"-Button klicken
*/




var CLIP_END = "on";
/*
ENGLISH
CLIP_END : To adjust the visibility of the clip when played.
VALUES: "on","off"
Here you can adjust if the clip should stop at the last picture at the end or 
if it should disappear.
If 'on' is adjusted the clip will stop on the last picture
If 'off' is adjusted the clip will disappear after the last picture

DEUTSCH
CLIP_END : Einstellung zur Sichtbarkeit des Clips nach abspielen
WERTE: "on","off"
Hier können Sie einstellen, ob der Clip am Ende auf dem letzten Bild stehenbleiben 
soll oder verschwinden.
Wenn auf 'on' gestellt, bleibt der Clip auf dem letzten Bild stehen
Wenn auf 'off' gestellt, verschwindet der Clip nach dem letzten Bild
*/




var SHOW = "always"; 
/*
ENGLISH
SHOW: Setting up the display
VALUES: "always","session",  all numbers > 0
If "always" is adjusted the clip will be played always
If "session" is adjusted the clip will be played just once per browser session
If "5" is adjusted (for example) a cookie will be created and the clip will be shown
to the user every 5 days only

DEUTSCH
SHOW: Einstellen der Anzeige
WERTE: "always","session", Alle Zahlen > 0
Wenn auf "always" gestellt, wird der Film immer abgespielt
Wenn auf "session" gestellt, wird der Film nur einmal pro Browsersession gezeigt
Wenn auf z.B. "5" gestellt, wird ein Cookie erzeugt und der User sieht den Film nur alle 5 Tage.
*/




var BTN_URL = "#";
/*
ENGLISH
BTN_URL: Setting up the link if the user clicks on the clip
VALUES: "", valid URL, e.g. "http://www.yaoti.com";
If "" is adjusted the user can`t click on the clip. 

DEUTSCH
BTN_URL: Einstellen des Links, wenn User auf Film klickt
WERTE: "", Gültige URL, z.B. "http://www.yaoti.com";
Wenn auf "" gestellt, kann der User nicht auf den Film klicken
*/




var BTN_TARGET = "_self";
/*
ENGLISH
BTN_URL: Setting up the link if the user clicks on the clip (only if BTN_URL=valid URL)
VALUES: "_blank", "_parent","_self", "_top", own window
Analog to the HTML link target. Here you can set up in which window the link stated in 
BTN_URL should be opened.

DEUTSCH
BTN_URL: Einstellen des Links, wenn User auf Film klickt (nur wenn BTN_URL=Gültige URL)
WERTE: "_blank", "_parent","_self", "_top", eigene Fenster
Analog zu HTML link target. Hier können Sie einstellen, in welchem Fenster der unter BTN_URL 
angegebene Link geöffnet werde soll.
*/








/*
----------------------------------------------------------------------------------------------------------------------
ENGLISH
Please change the following variables only if you know what their values mean.
Otherwise the player may not work proper anymore

DEUTSCH
Bitte ändern Sie die nachfolgenden Werte nur, wenn Sie wissen was diese
Werte bedeuten. Es besteht sonst die Gefahr das der Player nichtmehr ordnungsgemäß läuft
----------------------------------------------------------------------------------------------------------------------
*/

var JS_PATH = "clip_js/";
/*
ENGLISH
If you want to change the directory where to put the 'yaoti_config.js', 'yaoti_movie.js' and 'yaoti.js' files,
you can use a relative or absolut path here. 
Relative path example: "../mySkriptFolder/myJavascriptFolder/"
absolutes path example: "http://www.myDomain.com/mySkriptFolder/myJavascriptFolder/"

DEUTSCH
Falls Sie die Datei 'yaoti_config.js', 'yaoti_movie.js' 'yaoti.js' in einen anderen Ordner legen möchten, 
dann können Sie hier den relativen oder absoluten Pfad zu dieser Datei angeben
Relatives Pfadbeispiel: "../meinScriptordner/MeinJavascriptordner/"
Absolutes Pfadbeispiel: "http://www.meineDomain.de/meinScriptordner/MeinJavascriptordner/"
*/




var SWF_PATH = "clip_player/";
/*
ENGLISH
If you want to change the directory where to put the 'yaoti_player.swf' file,
you can use a relative or absolut path here. 
relative path example: "../myMediaFolder/myFlashFolder/"
absolutes path example: "http://www.myDomain.com/myMediaFolder/myFlashFolder/"

DEUTSCH
Falls Sie die Datei 'yaoti_player.swf' in einen anderen Ordner legen möchten, 
dann können Sie hier den relativen oder absoluten Pfad zu dieser Datei angeben.
Relatives Pfadbeispiel: "../meinMedienordner/MeinFlashordner/"
Absolutes Pfadbeispiel: "http://www.meineDomain.de/meinMedienordner/MeinFlashordner/"
*/








/*
----------------------------------------------------------------------------------------------------------------------
ENGLISH
Please do not change anything at the following lines.

DEUTSCH
An den nachfolgenden Zeilen bitte nichts ändern. 
----------------------------------------------------------------------------------------------------------------------
*/
var PAGE = document.URL;
var AUTO_PLAY;
var SHOW;
var WIDTH;
var HEIGHT;
var show_movie = new Boolean(true);
var UID = CLIPNAME;
var MOVEON = '<script language="JavaScript" src="' + 
    JS_PATH + 
	'yaoti_movie.js"></script>';

// Auslesen Cookie - Standardfunktion
function getCookie(name){
 var i=0; //Suchposition im Cookie
 var suche = name+"=";
 while (i<document.cookie.length){
 if (document.cookie.substring(i, i+suche.length)==suche){
 var ende = document.cookie.indexOf(";", i+suche.length);
 ende = (ende>-1) ? ende : document.cookie.length;
 var cook = document.cookie.substring(i+suche.length, ende);
 return unescape(cook);
 }
 i++;
 }
 return null;
}
// Schreiben Cookie - Standardfunktion
function setCookie(name, wert, domain, expires, path, secure){
 var cook = name+"="+unescape(wert);
 cook += (domain) ? "; domain="+ domain : "";
 cook += (expires) ? "; expires="+expires.toGMTString() : "";
 cook += (path) ? "; path="+path : "";
//  alert(cook);
 top.window.document.cookie = cook;
}

// Anwenden der Cookie-Funktionen 
if (SHOW == "always")	{  // Wenn always eingestellt, keine Cookies - Film immer anzeigen
	show_movie = true;
}
else if (SHOW == "session")	{  // Wenn session eingestellt, Cookie auslesen
  if (getCookie("YAOTI_MOVIE_C_" + CLIPNAME) == null) { // kein Cookie gesetzt
    setCookie("YAOTI_MOVIE_C_" + CLIPNAME, UID, null, 0); // Setze Session-Cookie
  }
  else { // Session-Cookie schon gesetzt
    show_movie = false; // Keine Anzeige Film
   }
}
else if (SHOW >= 0)	{  // Wert für Intervall gesetzt
  if (getCookie("YAOTI_MOVIE_C_" + CLIPNAME) == null) { // Intervall groß genug
    var ablauf = new Date();
    var zeit = ablauf.getTime() + (SHOW * 24 * 60 * 60 * 1000);
    ablauf.setTime(zeit);
    setCookie("YAOTI_MOVIE_C_" + CLIPNAME, UID, null, ablauf);
 }
 else { // Intervall zu klein
   show_movie = false;
  }
} // Ende der Anwendung von Cookie-Funktionen

//  Wenn Film gezeigt werden soll, wird die Skriptreferenz auf yaoti_movie.js in die Webseite geschrieben
if (show_movie == true)	{
  document.write(MOVEON);
}
	
