﻿var create_rmc = Class.create
(
	{
		initialize:function(options)
		{
		    this.options = options;
            var thisObject = this;
            this.def_vals = this.options['default_values'];
            this.ctrl_id = this.get_p('prefix') + this.get_p('controlhost_id');
            this.tryorder_length = this.get_p('tryorder').length;
            this.tryorder_count = 0;
            this.rmc_active_flag = false;
            this.sl_active_flag = false;
            this.fla_active_flag = false;
            if($(this.ctrl_id+"_img")!=null){
	        $(this.ctrl_id+"_img").style.display="none";
	        }
	        //hide copy behind
	        if($(this.ctrl_id+"_cpy_behind")){
	            $(this.ctrl_id+"_cpy_behind").style.display="none";
	        }
            //Set default_values
            def_controlhost_style = {width:this.get_p('width')+"px",height:this.get_p('height')+"px"};
            def_controlhost_host_style = {width:this.get_p('width')+"px",height:this.get_p('height')+"px",display:"block",position:"relative"};
            def_sl_cpy_behind_style = {width:this.get_p('width')+"px",height:this.get_p('height')+"px"};
            def_fla_cpy_behind_style = {width:this.get_p('width')+"px",height:this.get_p('height')+"px"};
            
            //set styles from controlhost
            if($(this.ctrl_id)){
                this.set_element_styles($(this.ctrl_id),this.get_p('controlhost_style'));
                this.set_element_styles($(this.ctrl_id),def_controlhost_style);
            }
            //set styles from controlhost_id_host
            if($(this.ctrl_id + "_host")){
                this.set_element_styles($(this.ctrl_id + "_host"),def_controlhost_host_style);
            }
            //set styles for image
            if($(this.ctrl_id + "_img")){
                this.set_element_styles($(this.ctrl_id + "_img"),this.get_p('img_style'));
            }
            
            //start check for rmc
            this.check_rmc_available();          
            
		},
		create_show_all:function(obj_name){
		    this.ctrl_id = this.ctrl_id + "_" + obj_name;
		    switch(obj_name){
                case "sl": 
                    this.check_sl(); //check if SL is installed
                    break;
                case "fla":
                    this.check_fla(); //check if Fla is installed
                    break;
                default: this.check_img(); //Display Fallback Image
                    break;
            }
		},
		create_element:function(host,element,inner_HTML,attributes,styles,returntyp){
		    new_element = document.createElement(element);
		    this.set_element_attributes(new_element,inner_HTML,attributes);
		    this.set_element_styles(new_element,styles);
		    
		    switch(returntyp){
		        case "obj":
		            if(host==""){
		            }else{
		                host.appendChild(new_element);
		            }
		            return new_element;
		        break;
		        case "html":
		            return new_element.outerHTML;
		        break;
		        default:
		            if(host==""){
		            }else{
		                host.appendChild(new_element);
		            }
		            return new_element;
		    }
		},
		set_element_attributes:function(element,inner_HTML,attributes){
		    for(var key in attributes){
		        if(key!="style"){
		            element.setAttribute(key,attributes[key]);
		        }
		    }
		    element.innerHTML = inner_HTML;		    
		},
		set_element_styles:function(element,styles){
		    Element.extend(element);
		    element.setStyle(styles);
		},
		create_rmc_avail:function(){
		    
	        my_a = this.create_element("","a","",{'id':this.ctrl_id + "_rmc_avail",'href':"#"},this.get_p('rmc_avail_style'),"obj");
            my_span = this.create_element(my_a,"span",this.get_p('rmc_avail_cpy'),{'id':this.ctrl_id + "_rmc_avail_cpy"},this.get_p('rmc_avail_cpy_style'),"obj");

            Element.extend(my_a);
            new Insertion.Top(this.ctrl_id+"_host", my_a);		
            Event.observe($(this.ctrl_id + "_rmc_avail"), 'click', this.create_sl_cta.bindAsEventListener(this));
		},
		getvalue:function(key){
            return this.options[key];
		},
		setvalue:function(key,val){
            this.options[key]=val;
		},
		//Check if right version of Silveright is installed
		check_sl:function(){
            //Is Silverlight installed
            //if (Silverlight.isInstalled(this.get_p('sl_version')) && isFF3 == false && this.get_p('xaml_url')!="")
            if (Silverlight.isInstalled(this.get_p('sl_version')) && this.get_p('xaml_url')!="")
            {
                if(this.get_p('sl_sim_no_ply')){
                    this.sl_active_flag = true;
                    this.rmc_active_flag = true;
                    this.check_img();
                }else{
                    this.create_sl();
                }
            }else{
                this.tryorder_count++;
                if(this.tryorder_count<=this.tryorder_length){
                    this.sl_active_flag = true;
                    this.rmc_active_flag = true;
                    this.check_rmc_available();
                    
                }else{
                    this.sl_active_flag = true;
                    this.rmc_active_flag = true;
                    this.check_img();
                }
            }
		},
		create_sl:function(){
		    $(this.ctrl_id+"_host").innerHTML="";
		    tmp_host_id=document.getElementById(this.ctrl_id + "_host");
		    tmp_ctrl_id=this.ctrl_id + "_sl_ctrl"
		    createSilverlightObj(this.get_p('xaml_url'),tmp_host_id ,tmp_ctrl_id , this.get_p('sl_properties'), this.get_p('prefix') + this.get_p('sl_instance_name'),this.get_p('xaml_js_classname'));
			//create copy behind
			cpy_behind = this.create_element("","div","",{'id':this.ctrl_id + "_sl_cpy_behind"},this.get_p('sl_cpy_behind_style'),"obj");
			this.create_element(cpy_behind,"div",this.get_p('sl_cpy_behind_cpy'),{'id':this.ctrl_id + "_sl_cpy_behind_cpy"},this.get_p('sl_cpy_behind_cpy_style'),"obj");
			
			new Insertion.Top(this.ctrl_id, cpy_behind);
			this.set_element_styles($(this.ctrl_id + "_sl_cpy_behind"),def_sl_cpy_behind_style);
		},
		
		//Check if right version of Flash is installed
		check_fla:function(){
            //Is Flash installed
            if (swfobject.hasFlashPlayerVersion(this.get_p('fla_version')) && this.get_p('swf_url')!="")
            {
                //alert("fla is installed | Version: " + options['fla_Version']);
                this.create_fla();
            }else{
                this.tryorder_count++;
                if(this.tryorder_count<=this.tryorder_length){
                    //alert("fla not installed | Version: " + options['fla_Version']);
                    this.rmc_active_flag = true;
                    this.check_rmc_available();
                }else{
                    this.rmc_active_flag = true;
                    this.check_img();
                }
            }
		},
		create_fla:function(){
		    //clear controlhost_id_host
		    $(this.ctrl_id + "_host").innerHTML = "";
            //Create div controlhost_id_ctrl for flash object
		    this.create_element($(this.ctrl_id+"_host"),"div","",{'id':this.ctrl_id + "_fla_ctrl"},this.get_p('fla_ctrl_style'),"obj");
		    
		    //create Flash Object
		    swfobject.embedSWF(this.get_p('swf_url'), this.ctrl_id+ "_fla_ctrl", this.get_p('width'), this.get_p('height'), this.get_p('fla_version'), this.get_p('fla_flashvars'), this.get_p('fla_params'), this.get_p('fla_attributes'));
		    
		   cpy_behind = this.create_element("","div","",{'id':this.ctrl_id + "_fla_cpy_behind"},this.get_p('fla_cpy_behind_style'),"obj");
		   this.create_element(cpy_behind,"div",this.get_p('fla_cpy_behind_cpy'),{'id':this.ctrl_id + "_fla_cpy_behind_cpy"},this.get_p('fla_cpy_behind_cpy_style'),"obj");
		   new Insertion.Top(this.ctrl_id, cpy_behind);
		   
		   this.set_element_styles($(this.ctrl_id + "_fla_cpy_behind"),def_fla_cpy_behind_style);
		},
		//Insert Image
		check_img:function(){
		    //show image controlhost_id_img_id
		    if($(this.ctrl_id+"_img")){
		        $(this.ctrl_id+"_img").style.display="block";
		    }
		    //show copy behind
		    if($(this.ctrl_id+"_cpy_behind")){
		        $(this.ctrl_id+"_cpy_behind").style.display="block";
		    }
		    if(this.rmc_active_flag){
	            //new Insertion.Top(options["controlhost_id"]+"_host", this.create_rmc_avail());
	            if(this.get_p('rmc_avail_active') && this.sl_active_flag){
	                this.create_rmc_avail();
                    this.rmc_avail_hide_show();
                }
                if(this.sl_active_flag && this.get_p('sl_pig_active')){
                    
                    //PIG Div overlay erstellen
                    this.create_sl_pig();
                }
                if(this.sl_active_flag && this.get_p('sl_cta_init_show')){
                    this.create_sl_cta();
                }
            }
		},
		get_p:function(prop){
		    if(this.options[prop]==undefined){	    
		        this.options[prop]=this.def_vals[prop];
		        return this.options[prop];
		    }else{
		        return this.options[prop];
		    }
		},
		create_sl_cta:function(){
		    //alert("create_sl_cta");
		    if($(this.ctrl_id + "_sl_cta")==undefined){
		        sl_btn = this.create_element("","div","",{'id':this.ctrl_id + "_sl_cta"},this.get_p('sl_cta_style'),"obj");
		        Element.extend(sl_btn);
                new Insertion.Bottom(this.ctrl_id+"_host", sl_btn);
                $(this.ctrl_id + "_sl_cta").innerHTML = Silverlight.createObject(null, null, null, {version: this.get_p('sl_version'), inplaceInstallPrompt:this.get_p('sl_inplaceInstallPrompt')},{}, null);
                new Effect.Appear(this.ctrl_id + "_sl_cta",{duration:1.0});
            }else{
                if($(this.ctrl_id + "_sl_cta").getStyle('display')=="none"){
                    new Effect.Appear(this.ctrl_id + "_sl_cta",{duration:1.0});
                }else{
                    new Effect.Fade(this.ctrl_id + "_sl_cta",{duration:1.0});
                } 
            }
		},
		create_sl_pig:function(){
		    overlay_outer = this.create_element("","div","",{'id':this.ctrl_id + "_pig"},this.get_p('sl_pig_style'),"obj");
            overlay_inner = this.create_element(overlay_outer,"div","test",{'id':this.ctrl_id + "_pig_cpy"},this.get_p('sl_pig_cpy_style'),"obj");
            new Insertion.Bottom(this.ctrl_id+"_host", overlay_outer);
            new Effect.Appear(this.ctrl_id + "_pig",{duration:1.0});
		},
		//Check in TryOrder if RMC is available
		check_rmc_available:function(){
            switch(String(this.get_p('tryorder')[this.tryorder_count])){
                case "sl": 
                    this.check_sl(); //check if SL is installed
                    break;
                case "fla":
                    this.check_fla(); //check if Fla is installed
                    break;
                default: this.check_img(); //Display Fallback Image
                    break;
            }
		},
		rmc_avail_hide_show:function(){
		    rmc_flag=false;
		    this.default_time = 5000;
		    this.rmc_time = this.default_time;
		    
		    if(this.get_p('rmc_avail_time')!=undefined){
		        this.rmc_time = parseInt(this.get_p('rmc_avail_time'))*1000;
		    }

		    var call_rmc_avail = new Obj_avail_HideShow_TopBtm(this.ctrl_id+"_rmc_avail", this.rmc_time);
		    
            Event.observe($(this.ctrl_id+"_host"), 'mouseover', function() {
                call_rmc_avail.startBlindDown(call_rmc_avail);
            });
		},
		get_rmc_top_time:function(){
		    return this.rmc_top_time;
		}
		
	}
);

function createSilverlightObj(xaml_url, host_element, ctrl_id, sl_properties,sl_instance_name, xaml_js_classname)
{
    sl_instance_name = new sl_ad.Page();
	Silverlight.createObjectEx({
		source: xaml_url,
		parentElement: host_element,
		id: ctrl_id,
		properties: sl_properties,
		events: {
			onLoad: Silverlight.createDelegate(sl_instance_name, sl_instance_name.handleLoad),
			onError: function(sender, args) {
			    //Create error div only when not on live system
			    if(document.URL.indexOf("http://www.microsoft")>-1){
			    }else{
                    var errorDiv = $("sl_errorLocation");
                    //alert($("sl_errorLocation"));
				    if (errorDiv != null || errorDiv !=undefined) {
					    var errorText = args.errorType + "- " + args.errorMessage;
								
					    if (args.ErrorType == "ParserError") {
						    errorText += "<br>File: " + args.xamlFile;
						    errorText += ", line " + args.lineNumber;
						    errorText += " character " + args.charPosition;
					    }
					    else if (args.ErrorType == "RuntimeError") {
						    errorText += "<br>line " + args.lineNumber;
						    errorText += " character " +  args.charPosition;
					    }
					    $("sl_errorLocation").innerHTML = $("sl_errorLocation").innerHTML + "<br />" + errorText;
				    }
			    }
				
			}
		}
	});
}
		
var Obj_avail_HideShow_TopBtm = Class.create
(
	{
		initialize:function(id,time)
		{   
		    
			// Name of the animated Div Tag
			this.id = id;
			// Duration of the timeout
			this.time = time;
			// Flag if effect is in progress
			this.Obj_avail_inProgress = false;
			// Set Reference to the Object Start the BlindDown Animation
			this.startBlindDown(this.id);
		},
		startBlindDown:function( )
		{
			// If Effekt is not in Progress Start Effekt
			if (!this.Obj_avail_inProgress)
			{
				// start effect
				// beforeStart: set Progress Var to true
				// afterFinish: start the Timer after what time the divs should disappear again
				new Effect.BlindDown(
					this.id,
					{
						beforeStart: delegate( this, this.lock ),
						afterFinish: delegate( this, this.startTimer )
					}
				);
			}
		},
		lock: function()
		{
			this.Obj_avail_inProgress = true;
		},
		unlock: function()
		{
			this.Obj_avail_inProgress = false;
		},
		startTimer:function()
		{
			var dg = delegate( this, this.startBlindUp );
			window.setTimeout( dg, this.time );
		},
		startBlindUp:function()
		{
			// Start Effect
			// afterFinish: set Progress Var to false
			new Effect.BlindUp
			(
				this.id,
				{
					afterFinish: delegate( this, this.unlock )
				}
			);
		}
	}
);

function delegate(instance, method) {
	return function() {
		return method.apply(instance, arguments);
	}
}



function sl_installXP(options)
{
alert('test');
var thisObject=this;
this.tryorder_length=options['tryorder'].length;
this.tryorder_count=0;

////Default Standard Werte setzen
//var default_args = {
//    'tryorder' : ["sl","fla","img"],
//    'glb_Height' : "",
//    'glb_Width': "",
//    'glb_ControlHost_id' : "ControlHost",
//    'glb_ControlHost_css' : "",
//    'glb_PublishStartDate' : "",
//    'glb_PublishEndDate' : "",
//    'sl_Active' : true,
//    'sl_Version' : "1.0",
//    'sl_ControlDiv_id'	: "silverlightControl",
//    'sl_XAML_url': "",
//    'sl_XAML_js_classname': "",
//    'sl_isWindowless' : "",
//    'sl_background' : "",
//    'sl_enableHtmlAccess' : "",
//    'sl_ShowInstallBtn' : "",
//    'sl_ErrorLocation_id' : "",
//    'sl_DisplayTime' : "forever",
//    'sl_PIG_id' : "PostInstallGuidance",
//    'sl_PIG_Active' : true,
//    'sl_PIG_style' : "",
//    'sl_PIG_MSIE_notavail_cpy' : "Ihr Browser ist "+ Silverlight.ua.Browser + ". Starten Sie nach der Installation Ihren Browser neu um das Silverlight Plug-In zu aktivieren.",
//    'sl_PIG_MSIE_avail_cpy' : "Starten Sie nach der Installation Ihren Browser neu um das Silverlight Plug-In zu aktivieren.",
//    'sl_PIG_FFSaf_cpy' : "Ihr Browser ist "+ Silverlight.ua.Browser + ". Starten Sie nach der Installation Ihren Browser neu um das Silverlight Plug-In zu aktivieren.",
//    'sl_PIG_notsupport' : "M&ouml;glicherweise unterst&uuml;tzt Ihr Browser das Microsoft Silverlight Plug-In nicht.<br />Bitte besuchen Sie <a href='http://www.microsoft.com/silverlight/system-requirements.aspx' title='weitere Informationen'>http://www.microsoft.com/silverlight/system-requirements.aspx</a> f&uuml;r weitere Informationen",
//    'fla_Active' : false,
//    'fla_Version' : "8",
//    'fla_ControlDiv_id' : "flashControl",
//    'fla_ControlDiv_css' : "",
//    'fla_SWFUrl' : "",
//    'fla_background' : "#FFFFFF",
//    'fla_params' : "",
//    'fla_DisplayTime' : "",
//    'img_Active' : true,
//    'img_ControlDiv_id'	: "imgControl",
//    'img_src' : "sl/assets/fallback.jpg",
//    'img_alt' : "",
//    'img_css' : "",
//    'img_linked' : false,
//    'img_href' : "http://www.microsoft.de",
//    'img_target' : "_blank",
//    'img_DisplayTime' : ""
//}
////Standard Variablen setzen
//for(var index in default_args) {
//    if(typeof options[index] == "undefined") options[index] = default_args[index];
//}

//Get and Set Values
this.getvalue = function(key)
{
    return options[key];
};
this.setvalue = function(key,val)
{
    this.val=val;
    options[key]=this.val;
};

//Try Order auslesen
//Check if right version of Silveright is installed
this.check_sl=function()
{
    //Is Silverlight installed
    if (Silverlight.isInstalled(this.options['sl_version']))
    {
        //alert("SL installed");
        //create Silverlight Object now
    }else{
        this.tryorder_count++;
        if(this.tryorder_count<=this.tryorder_length){
            alert("SL not installed");
            this.checkobj();
        }else{
            this.check_img();
        }
    }
};

//Check if right version of Flash is installed
this.check_fla=function()
{
    //Is Flash installed
    if (swfobject.hasFlashPlayerVersion(options['fla_Version']))
    {
        alert(options['fla_Version']+": fla installed");
    }else{
        this.tryorder_count++;
        if(this.tryorder_count<=this.tryorder_length){
            alert(options['fla_Version']+": fla not installed");
            this.checkobj();
        }else{
            this.check_img();
        }
    }
};

//Insert Image
this.check_img=function()
{
    if (options['img_src']!= "" && options['img_src'] != null && options['img_src'] != "undefined"){
        alert("show img");
    }else{
        //Alert when no image source is defiend (Just on the Developing Servers)
        var hostname = window.location.hostname;
        inthost=hostname.split(".");
        if(inthost=="wwwppe" || inthost=="wwwstaging" || inthost=="localhost"){
            alert("'img_src' Variable fehlt. Bitte diese Variable setzen sonst wird ein 1px transparentes Bild angezeigt");
        }
        //Standard Image Anzeigen 1px trans
        alert("Standard Image Anzeigen");
    }
};
this.show_img=function()
{
    if(options['sl_ShowInstallBtn']){
        
    }
    if(options['sl_PIG_Active']){
        
    }
}
this.checkobj=function(){
    switch(String(options['tryorder'][this.tryorder_count])){
        case "sl": this.check_sl(); //check if SL is installed
            break;
        case "fla": this.check_fla(); //check if Fla is installed
            break;
        default: this.check_img(); //Display Fallback Image
            break;
    }
};
this.checkobj();
}



//Ad default_values
var scene_ad;
var default_values_ads = {
    'controlhost_id':"dynamics_ads",
    'controlhost_style':{
        position:"relative"
    },
    'controlhost_host_style':{},
    'tryorder':["sl","fla"],
    'width':"120",
    'height':"240",
    'prefix':"",
    'img_style':{
        position: "absolute",
        top: 0,
        left: 0,
        borderWidth: 0,
        width: "120px",
        height:"240px"
    },
    'swf_url':"",
    'fla_version':"8.0.0",
    'fla_attributes':{
        wmode:"opague",
        bgcolor:"#FFFFFF",
        quality:"high"
    },
    'fla_flashvars':{},
    'fla_params':{},
    'fla_ctrl_style':{},
    'fla_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'fla_cpy_behind_cpy':"",
    'fla_cpy_behind_cpy_style':{},
    'xaml_url':"",
    'sl_version':"1.0",
    'sl_instance_name': scene_ad,
    'xaml_js_classname': sl_ad,
    'sl_ctrl_style':{},
    'sl_pig_active':false,
    'sl_pig_style':{
        position:"absolute",
        display:"none",
        width:"120px",
        top:"80px",
        left:0,
        backgroundColor:"#ccc"
    },
    'sl_pig_cpy':"",
    'sl_pig_cpy_style':{
        padding:"3px 5px"
    },
    'sl_cta_init_show':false,
    'sl_inplaceInstallPrompt':false,
    'sl_cta_style':{
        display:"none",
        zIndex:99,
        position:"absolute",
        top:"20px",
        left:"20px"
    },
    'sl_properties':{
        width: "100%",
        height: "100%",
        version: "1.0",
        background:'#00333333',
        isWindowless: "true"
    },
    'sl_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'sl_cpy_behind_cpy_style':{},
    'sl_cpy_behind_cpy':"",
    'sl_sim_no_ply':false,
    'rmc_avail_active':false,
    'rmc_avail_time':"6",
    'rmc_avail_cpy':"Silverlight verfügbar",
    'rmc_avail_cpy_style':{
        padding: "5px 5px 0 0",
        margin: "0 0 0 38px",
        cursor: "pointer",
        fontSize:"12px",
        textDecoration:"underline"
    },
    'rmc_avail_style':{
        display:"none",
        cssFloat:"left",
        overflow:"hidden",
        margin:0,
        padding:0,
        zIndex:2,
        position:"absolute",
        top:0,
        textDecoration:"none",
        width:"118px",
        height:"50px",
        border:"solid 1px #ccc",
        background:"#F9F9F9 url(/germany/dynamics/_global/templates/img/sl_ani_gif_30px.gif) no-repeat 3px center"
    }
};

img_default_values_ads = {
    'controlhost_id':"dynamics_ads",
    'controlhost_style':{
        position:"relative"
    },
    'controlhost_host_style':{},
    'tryorder':[],
    'width':"120",
    'height':"240",
    'prefix':"",
    'img_style':{
        position: "absolute",
        top: 0,
        left: 0,
        borderWidth: 0,
        width: "120px",
        height:"240px"
    },
    'swf_url':"",
    'fla_version':"8.0.0",
    'fla_attributes':{
        wmode:"opague",
        bgcolor:"#FFFFFF",
        quality:"high"
    },
    'fla_flashvars':{},
    'fla_params':{},
    'fla_ctrl_style':{},
    'fla_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'fla_cpy_behind_cpy':"",
    'fla_cpy_behind_cpy_style':{},
    'xaml_url':"",
    'sl_version':"1.0",
    'sl_instance_name': scene_ad,
    'xaml_js_classname': sl_ad,
    'sl_ctrl_style':{},
    'sl_pig_active':false,
    'sl_pig_style':{
        position:"absolute",
        display:"none",
        width:"120px",
        top:"80px",
        left:0,
        backgroundColor:"#ccc"
    },
    'sl_pig_cpy':"",
    'sl_pig_cpy_style':{
        padding:"3px 5px"
    },
    'sl_cta_init_show':false,
    'sl_inplaceInstallPrompt':false,
    'sl_cta_style':{
        display:"none",
        zIndex:99,
        position:"absolute",
        top:"20px",
        left:"20px"
    },
    'sl_properties':{
        width: '100%',
        height: '100%',
        version: "1.0",
        background:'#00333333',
        isWindowless: "true"
    },
    'sl_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'sl_cpy_behind_cpy_style':{},
    'sl_cpy_behind_cpy':"",
    'sl_sim_no_ply':false,
    'rmc_avail_active':false,
    'rmc_avail_time':"6",
    'rmc_avail_cpy':"Silverlight verfügbar",
    'rmc_avail_cpy_style':{
        padding: "5px 5px 0 0",
        margin: "0 0 0 38px",
        cursor: "pointer",
        fontSize:"12px",
        textDecoration:"underline"
    },
    'rmc_avail_style':{
        display:"none",
        cssFloat:"left",
        overflow:"hidden",
        margin:0,
        padding:0,
        zIndex:2,
        position:"absolute",
        top:0,
        textDecoration:"none",
        width:"118px",
        height:"50px",
        border:"solid 1px #ccc",
        background:"#F9F9F9 url(/germany/dynamics/_global/templates/img/sl_ani_gif_30px.gif) no-repeat 3px center"
    }
};

sl_default_values_ads = {
    'controlhost_id':"dynamics_ads",
    'controlhost_style':{
        position:"relative"
    },
    'controlhost_host_style':{},
    'tryorder':["sl"],
    'width':"120",
    'height':"240",
    'prefix':"",
    'img_style':{
        position: "absolute",
        top: 0,
        left: 0,
        borderWidth: 0,
        width: "120px",
        height:"240px"
    },
    'swf_url':"",
    'fla_version':"8.0.0",
    'fla_attributes':{
        wmode:"opague",
        bgcolor:"#FFFFFF",
        quality:"high"
    },
    'fla_flashvars':{},
    'fla_params':{},
    'fla_ctrl_style':{},
    'fla_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'fla_cpy_behind_cpy':"",
    'fla_cpy_behind_cpy_style':{},
    'xaml_url':"",
    'sl_version':"1.0",
    'sl_instance_name': scene_ad,
    'xaml_js_classname': sl_ad,
    'sl_ctrl_style':{},
    'sl_pig_active':false,
    'sl_pig_style':{
        position:"absolute",
        display:"none",
        width:"120px",
        top:"80px",
        left:0,
        backgroundColor:"#ccc"
    },
    'sl_pig_cpy':"",
    'sl_pig_cpy_style':{
        padding:"3px 5px"
    },
    'sl_cta_init_show':false,
    'sl_inplaceInstallPrompt':false,
    'sl_cta_style':{
        display:"none",
        zIndex:99,
        position:"absolute",
        top:"20px",
        left:"20px"
    },
    'sl_properties':{
        width: "100%",
        height: "100%",
        version: "1.0",
        background:'#00333333',
        isWindowless: "true"
    },
    'sl_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'sl_cpy_behind_cpy_style':{},
    'sl_cpy_behind_cpy':"",
    'sl_sim_no_ply':false,
    'rmc_avail_active':false,
    'rmc_avail_time':"6",
    'rmc_avail_cpy':"Silverlight verfügbar",
    'rmc_avail_cpy_style':{
        padding: "5px 5px 0 0",
        margin: "0 0 0 38px",
        cursor: "pointer",
        fontSize:"12px",
        textDecoration:"underline"
    },
    'rmc_avail_style':{
        display:"none",
        cssFloat:"left",
        overflow:"hidden",
        margin:0,
        padding:0,
        zIndex:2,
        position:"absolute",
        top:0,
        textDecoration:"none",
        width:"118px",
        height:"50px",
        border:"solid 1px #ccc",
        background:"#F9F9F9 url(/germany/dynamics/_global/templates/img/sl_ani_gif_30px.gif) no-repeat 3px center"
    }
};

fla_default_values_ads = {
    'controlhost_id':"dynamics_ads",
    'controlhost_style':{
        position:"relative"
    },
    'controlhost_host_style':{},
    'tryorder':["fla"],
    'width':"120",
    'height':"240",
    'prefix':"",
    'img_style':{
        position: "absolute",
        top: 0,
        left: 0,
        borderWidth: 0,
        width: "120px",
        height:"240px"
    },
    'swf_url':"",
    'fla_version':"8.0.0",
    'fla_attributes':{
        wmode:"opague",
        bgcolor:"#FFFFFF",
        quality:"high"
    },
    'fla_flashvars':{},
    'fla_params':{},
    'fla_ctrl_style':{},
    'fla_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'fla_cpy_behind_cpy':"",
    'fla_cpy_behind_cpy_style':{},
    'xaml_url':"",
    'sl_version':"1.0",
    'sl_instance_name': scene_ad,
    'xaml_js_classname': sl_ad,
    'sl_ctrl_style':{},
    'sl_pig_active':false,
    'sl_pig_style':{
        position:"absolute",
        display:"none",
        width:"120px",
        top:"80px",
        left:0,
        backgroundColor:"#ccc"
    },
    'sl_pig_cpy':"",
    'sl_pig_cpy_style':{
        padding:"3px 5px"
    },
    'sl_cta_init_show':false,
    'sl_inplaceInstallPrompt':false,
    'sl_cta_style':{
        display:"none",
        zIndex:99,
        position:"absolute",
        top:"20px",
        left:"20px"
    },
    'sl_properties':{
        width: "100%",
        height: "100%",
        version: "1.0",
        background:'#00333333',
        isWindowless: "true"
    },
    'sl_cpy_behind_style':{
        position:"absolute",
        top:0,
        left:0,
        overflow:"hidden"
    },
    'sl_cpy_behind_cpy_style':{},
    'sl_cpy_behind_cpy':"",
    'sl_sim_no_ply':false,
    'rmc_avail_active':false,
    'rmc_avail_time':"6",
    'rmc_avail_cpy':"Silverlight verfügbar",
    'rmc_avail_cpy_style':{
        padding: "5px 5px 0 0",
        margin: "0 0 0 38px",
        cursor: "pointer",
        fontSize:"12px",
        textDecoration:"underline"
    },
    'rmc_avail_style':{
        display:"none",
        cssFloat:"left",
        overflow:"hidden",
        margin:0,
        padding:0,
        zIndex:2,
        position:"absolute",
        top:0,
        textDecoration:"none",
        width:"118px",
        height:"50px",
        border:"solid 1px #ccc",
        background:"#F9F9F9 url(/germany/dynamics/_global/templates/img/sl_ani_gif_30px.gif) no-repeat 3px center"
    }
};