function GetDocumentHeight() { return document.body.clientHeight; } function createSilverlight(xamlfile,PlugID, heit,bgcolor,iswindo) { Silverlight.createObject( xamlfile, // Source property value. parentElement, // DOM reference to hosting DIV tag. PlugID, // Unique plug-in ID value. { // Per-instance properties. width:'100%', // Width of rectangular region of // plug-in area in pixels. height:heit, // Height of rectangular region of // plug-in area in pixels. inplaceInstallPrompt:false, // Determines whether to display // in-place install prompt if // invalid version detected. background:bgcolor, // Background color of plug-in. isWindowless:iswindo, // Determines whether to display plug-in // in Windowless mode. framerate:'24', // MaxFrameRate property value. version:'1.0' // Silverlight version to use. }, { onError:null, // OnError property value -- // event handler function name. onLoad:null // OnLoad property value -- // event handler function name. }, null); // Context value -- event handler function name. } function createMySilverlightPlugin(xamlfile,PlugID,heit,bgcolor,iswindo) { if ((navigator.userAgent.indexOf('Windows') != -1) && (navigator.appVersion.indexOf('MSIE') != -1)){ try{ var AgControl = new ActiveXObject("AgControl.AgControl"); createSilverlight(xamlfile,PlugID,heit,bgcolor,iswindo); parentElement.style.visibility='visible'; var Myhead=document.getElementById('masthead'); Myhead.style.visibility='hidden'; Myhead.style.height=0; } catch (e){ parentElement.style.visibility='hidden'; parentElement.style.height=0; var myhead2=document.getElementById("masthead"); myhead2.style.visibility='visible'; } } // firefox if ((navigator.plugins != null) && (navigator.plugins.length > 0)){ if (document.getElementById && !document.all && navigator.plugins["Silverlight Plug-In"] ){ createSilverlight(xamlfile,PlugID,heit,bgcolor,iswindo); parentElement.style.visibility='visible'; var Myhead=document.getElementById("masthead"); Myhead.style.visibility='hidden'; Myhead.style.height=0; } else{ parentElement.style.visibility='hidden'; parentElement.style.height=0; var myhead2=document.getElementById("masthead"); myhead2.style.visibility='visible'; } } } //// Scripts for Top HEader function onLoaded(sender, args) { // Retrieve a reference to the plug-in. var slPlugin = sender.getHost(); // Set the event handler function to the OnResize event. slPlugin.content.onResize = onResized; // Do initial layout of the app based on initial size. updateLayout(sender,slPlugin.content.actualWidth, slPlugin.content.actualHeight); } function onResized(sender, eventArgs) { var slPlugin = sender.getHost(); // Do layout resizing of the app whenever the plug-in actualwidth or actualheight changes. updateLayout(sender,slPlugin.content.actualWidth, slPlugin.content.actualHeight); } // Resize and reposition application elements. function updateLayout(sender,width, height) { var motto=sender.findName("MottoText") motto["Canvas.Left"] = width-motto["Width"]; // Perform layout tasks based on width and height. } //// Scripts for Background function onLoadedBack(sender, args) { // Retrieve a reference to the plug-in. var slPlugin = sender.getHost(); // Set the event handler function to the OnResize event. slPlugin.content.onResize = onResizedBack; // Do initial layout of the app based on initial size. updateLayoutBack(sender,slPlugin.content.actualWidth, slPlugin.content.actualHeight); } function onResizedBack(sender, eventArgs) { var slPlugin = sender.getHost(); // Do layout resizing of the app whenever the plug-in actualwidth or actualheight changes. updateLayoutBack(sender,slPlugin.content.actualWidth, slPlugin.content.actualHeight); } // Resize and reposition application elements. function updateLayoutBack(sender,width, height) { var motto=sender.findName("BackBubble") if (width>1024) width=1024; motto["Width"] = width; var heit=GetDocumentHeight()-150; //top Position of Floater if (heit>1024) heit=1024; var slPlugin = sender.getHost(); slPlugin.height=heit; motto["Height"] = heit; // Perform layout tasks based on width and height. }