/**
* flashcookie-framework
*
*
* Benötigt: swfobject.js
**/

if (typeof(SWFCookie) == "undefined") {
  SWFCookie = new function (){
    this.divname = "flashcookie";
  }
}
/**
* Initialisierung des SWFCookie-Frameworks:
* - Einfügen eines Platzhalter-DIVs
* - Generieren des SWF-Objekts
*
* Diese Methode bitte zur Initialisierung am Seitenende integrieren.
**/
SWFCookie.init = function (apppath){
	if (apppath.charAt(apppath.length - 1) != '/') {
		apppath = apppath + '/';
	}
    //document.write("<div id='flashcookie'></div>");
    var flashvars = {};
    var params = {};
    params.menu = 'false';
    params.allowScriptAccess = 'always';
    params.allowFullScreen = 'false';
    params.bgcolor='#ff0000';
    var attributes = {};
    swfobject.embedSWF(apppath + 'flashcookie.swf', this.divname , '1', '1', '8.0.0', false, flashvars, params, attributes);
}

/**
* Liefert den SWF-Clip zurück. Alle grundlegenden Methoden werden
* direkt auf dem SWF-Clip ausgeführt.
**/
SWFCookie.getSWF = function () {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[this.divname]
    }
    else {
        return document[this.divname]
    }
}

/**
* Allgemeine Hilfsfunktion für wahlfreien Zugriff auf (SWF-)Objekte.
**/
function getSWF(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

