


// Set Cookie
function setCookie(NameOfCookie, value, expiredays) {
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + 
	((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/;"
}




function MakeFlashObject(insrc,w,h) {
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + w + '" height="' + h + '">')
    document.write('<param name="movie" value="' + insrc + '" /><param name="menu" value="false"><param name="wmode" value="transparent"><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="' + insrc + '" quality="high" menu="false" wmode="transparent" bgcolor="#000000" width="' + w + '" height="' + h + '" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>')
    document.write('</OBJECT>')
}

function MakeQuicktimeObject(insrc,w,h) {

    document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="' + h + '" width="' + w + '">')
    document.write('<param name="src" value="' + insrc + '" >') 
    document.write('<param name="AutoPlay" value="true" >')
    document.write('<param name="Controller" value="true" >')
    document.write('<embed src="' + insrc + '" height="' + h + '" width="' + w + '" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" autoplay="true" />')
    document.write('</object>')
}

function MakeWMVObject(insrc,w,h) {
    document.write('<object id="mediaPlayer" width="' + w + '" height="' + h + '" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject">')
    document.write('<param name="fileName" value="' + insrc + '">')
    document.write('<param name="animationatStart" value="true">')
    document.write('<param name="transparentatStart" value="true">')
    document.write('<param name="autoStart" value="true">')
    document.write('<param name="showControls" value="true">')
    document.write('<oaram name"TransparentAtStart" value="True">')
    document.write('<param name="loop" value="false">')
    document.write('<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="-1" showcontrols="true" showtracker="-1" showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="' + w + '" height="' + h + '" src="' + insrc + '" autostart="true" designtimesp="5311" loop="false"></embed>')
    document.write('</object>')
}

function MakeYouTubeObject(insrc,w,h) {
    document.write('<object width="' + w + '" height="' + h + '"><param name="movie" value="http://www.youtube.com/v/' + insrc + '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' + insrc + '" type="application/x-shockwave-flash" wmode="transparent" width="' + w + '" height="' + h + '"></embed></object>')

}