﻿function SWFObject(URL, width, height)
{
	var obj = '';
	obj += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="'+width+'" height="100%" border="0">';
	obj += '<param name="movie" value="'+URL+'" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="bgcolor" value="#000000" />';
	obj += '<param name="FlashVars" value="allowResize=true" />';
	obj += '<embed src="'+URL+'" quality="high" bgcolor="#000000" width="'+width+'" height="100%" name="WorldFlightExpo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	obj += '</object>';
	document.write(obj);
}

function SWFObjectN(URL, width, height)
{
	var obj = '';
	obj += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="'+width+'" height="'+height+'" border="0">';
	obj += '<param name="movie" value="'+URL+'" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="bgcolor" value="#000000" />';
	obj += '<param name="FlashVars" value="allowResize=true" />';
	obj += '<embed src="'+URL+'" quality="high" bgcolor="#000000" width="'+width+'" height="'+height+'" name="WorldFlightExpo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	obj += '</object>';
	document.write(obj);
}

function resize(obj)
{
    var obj = document.getElementById(obj);
    var winWidth = window.innerWidth;
    var winHeight = window.innerHeight;
    
    size_per = (720/winHeight);
    var nWidth = (winWidth/size_per);
    
    if (winHeight < 720)
    {
        obj.Attribute("height", winHeight);
        //obj.Attribute("width", nWidth);
    }
    else
    {
        obj.Attribute("height", "768");
    }
}

function musicObj(URL, width, height)
{
	var obj = '';
	obj += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="'+width+'" height="100%" border="0">';
	obj += '<param name="movie" value="'+URL+'" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="bgcolor" value="#000000" />';
	obj += '<param name="FlashVars" value="allowResize=true" />';
	obj += '<embed src="'+URL+'" quality="high" bgcolor="#000000" width="'+width+'" height="100%" name="WorldFlightExpo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	obj += '</object>';
	document.write(obj);
}

function MMVObject(URL, width, height)
{
	var obj = '';	
	obj += '<object id="mediaPlayer" width="'+width+'" height="'+height+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">';
    obj += '<param name="fileName" value="'+URL+'" />';
    obj += '<param name="animationatStart" value="true" />';
    obj += '<param name="transparentatStart" value="true" />';
    obj += '<param name="autoStart" value="true" />';
    obj += '<param name="showControls" value="true" />';
    obj += '<param name="loop" value="false" />';
    obj += '<param name="ShowStatusBar" value="true" />';
    obj += '<param name="ShowTracker" value="true">';    
    obj += '<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" hspace="5" vspace="5" align="middle" bgcolor="black" showcontrols="true" showtracker="true" transparentatstart="true" showdisplay="true" showstatusbar="true" width="'+width+'" height="'+height+'" src="'+URL+'" autostart="true" designtimesp="5311" loop="false" />';
    obj += '</object>';
	document.write(obj);
}

function chatObject(URL, width, height)
{
	var obj = '';
	obj += '<applet code="Client.class" codebase="'+URL+'" archive="scclient_en.zip" width="'+width+'" height="'+height+'" alt="Java Chat Software - AddonChat" MAYSCRIPT>';
	obj += '<param name="room" value="301598">';
	obj += '</applet>';	
	document.write(obj);
}
