function showFlash(name, width, height, cpos)
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
    document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  width=' + width);
    document.writeln(' height=' + height + ' id="' + name + '" align="middle">');
	document.writeln('<param name="movie" value="/img/' + name + '.swf?pageNum=' + cpos + '" />');
    document.writeln('<param name="quality" value="high" />');
    document.writeln('<param name="bgcolor" value="#ffffff" />');
    document.writeln('<embed src="/img/' + name + '.swf?pageNum=' + cpos + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '"'
);
    document.writeln(' name="' + name + '" align= "middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
);
    document.writeln('</object>');
}

function showFlash2(name, width, height, cpos)
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
    document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  width=' + width);
    document.writeln(' height=' + height + ' id="' + name + '" align="middle">');
    document.writeln('<param name="movie" value="/img/' + name + '.swf?pageNum=' + cpos + '" />');
    document.writeln('<param name="quality" value="high" />');
    document.writeln('<param name="bgcolor" value="#ffffff" />');
    document.writeln('<embed src="/data/' + name + '?pageNum=' + cpos + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '"'
);
    document.writeln(' name="' + name + '" align= "middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
);
    document.writeln('</object>');
}

function ShowMovie(name, width, height)
{
	document.writeln('<embed src="http://' + name + '"  autostart="1" width="' + width + '" height="' + height + '">');
}

function getCookie(name)
{
    var nameOfCookie = name + "=";
    var x = 0;
    while ( x <= document.cookie.length )
    {
        var y = (x+nameOfCookie.length);
        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                endOfCookie = document.cookie.length;
                return unescape( document.cookie.substring( y, endOfCookie ) );
        }
        x = document.cookie.indexOf( " ", x ) + 1;
        if ( x == 0 )
            break;
    }
    return "";
}


