CSS
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
#page-table {
height: 100%;
width: 100%;
border-collapse: collapse;
text-align: center;
}
#page-td {
height: 100%;
padding: 0;
vertical-align: middle;
}
#container
{
width:800px;
height: 800px;
margin : 0 auto;
}
#my_video_1
{
position : absolute;
margin-top : 245px;
margin-left: 223px;
}
.navigation-pie
{
height : 800px;
}
JavaScript
window.onload = function() {
var container = document.createElement('div');
container.className = "navigation-pie";
document.getElementById('container').appendChild(container);
var width = parseInt(getComputedStyle(container, "").getPropertyValue('width'));
var height = parseInt(getComputedStyle(container, "").getPropertyValue('height'));
/*
var paper = Raphael(20, 20, 600, 600);
*/
var paper = Raphael(container, width, height);
function arc(center, radius, startAngle, endAngle) {
angle = startAngle;
coords = toCoords(center, radius, angle);
path = "M " + coords[0] + " " + coords[1];
while (angle <= endAngle) {
coords = toCoords(center, radius, angle);
path += " L " + coords[0] + " " + coords[1];
angle += 1;
}
return path;
}
function toCoords(center, radius, angle) {
var radians = (angle / 180) * Math.PI;
var x = center[0] + Math.cos(radians) * radius;
var y = center[1] + Math.sin(radians) * radius;
return [x, y];
}
function colorPicker(seq) {
m = seq % 2;
if (m > 0) {
return "#cfa";
}
return "#fca";
}
startAngle = 50;
seqNo = 20;
rad = 130 / Math.PI;
while (startAngle <= 360) {
seqNo = seqNo + 1;
endAngle = startAngle + 80;
circles = 0;
radius = 250;
rinc = 70;
xCenter = 400;
yCenter = 350;
midAngle = (startAngle + endAngle) / 2;
while (circles < 1) {
paper.path(arc([xCenter, yCenter], radius, startAngle, endAngle)).attr({
'stroke': "#ccc",
'stroke-width': rinc - 1
});
circles += 1;
radius += rinc;
}
startAngle = startAngle + 90;
}
}