<!--
// DotMenu
// provides cross-browser functionality
//==========================
function getObjectRef(name) {
if(document.getElementById) return document.getElementById(name);
else if(document.all) return document.all[name];
else return null;
}
// general functions to assist the script
//===========================
function show(name) {
var el = getObjectRef(name);
if(el) el.style.visibility = "visible";
}
function hide(name) {
var el = getObjectRef(name);
if(el) el.style.visibility = "hidden";
}
function getWidth(name) {
var el = getObjectRef(name);
return el.offsetWidth;
}
function getHeight(name) {
var el = getObjectRef(name);
return el.offsetHeight;
}
function moveMe(name,x,y) {
var el = getObjectRef(name);
if(el) { el.style.top = parseInt(y); el.style.left = parseInt(x); } }
function moveBy(name,x,y) {
var el = getObjectRef(name);
if(el) { el.style.top = parseInt(el.style.top) + parseInt(y); el.style.left = parseInt(el.style.left) + parseInt(x); } }
// Creates the menu objects
//===================
var menuCount = 0;
function menuObject(name,x,y,caption, r, parent) {
if ( (!document.getElementById&&!document.all) || navigator.userAgent.indexOf("Opera")>-1) return;
document.write('<div id="divDot' + menuCount + '" class="dotempty" style="top: ' + y + '; left: ' + x + '"></div>');
document.write('<div id="divCap' + menuCount + '" class="caption" style="top: 0; left: 0">' + caption + '</div>');
this.name = name;
this.parent = parent
this.ref = "divDot" + menuCount;
this.caption = "divCap" + menuCount
if(r) this.radius = r;
else this.radius = 400;
this.subMenus = new Array();
this.state = 0;
this.moving = false;
if(this.parent) this.action = "null";
else this.action = "toggle";
if(this.parent) this.startAngle = parent.startAngle;
else this.startAngle = 0;
getObjectRef(this.ref).objRef = this.name;
this.show = function() { show(this.ref); }
this.hide = function() { hide(this.ref); }
this.moveMe = function(x,y) { if(this.parent) { x += this.parent.x(); y += this.parent.y(); } moveMe(this.ref,x,y); }
this.moveBy = function(x,y) { moveBy(this.ref,x,y); }
this.x = function() { return parseInt(getObjectRef(this.ref).style.left); }
this.y = function() { return parseInt(getObjectRef(this.ref).style.top); }
this.w = function() { return getWidth(this.ref); }
this.h = function() { return getHeight(this.ref); }
this.showCaption = function() {
moveMe(this.caption, this.x() - (getWidth(this.caption)/2) + (this.w()/2), (this.y() + this.h()));
show(this.caption);
}
this.hideCaption = function() {
hide(this.caption);
}
this.setCaption = function(c) { getObjectRef(this.caption).innerHTML = c;}
this.addItem = function(c,action,r) {
getObjectRef(this.ref).className = "dot";
if(!r) r = this.radius/2;
var sub = new menuObject(this.name + ".subMenus[" + this.subMenus.length + "]",0,0,c,r,this);
sub.parent = this;
sub.action = action;
sub.moveMe(0,0);
this.subMenus[this.subMenus.length] = sub;
return sub;
}
this.expand = function() {
if(this.subMenus.length > 0) {
var p = true;
if(this.parent) {
p = !this.parent.moving;
for(var i=0; i<this.parent.subMenus.length;i++)
p = p && ((this.parent.subMenus[i].state==0) || (this.parent.subMenus[i].state==this.parent.subMenus[i].subMenus.length)) && (this.parent.subMenus[i].moving==false);
} else var o = false;
if((!this.parent || this.parent.state == this.parent.subMenus.length) && p) {
if(this.parent) this.collapseAll(this.name);
var diff = 360 / this.subMenus.length;
for(var i=0;i<this.subMenus.length;i++){
this.subMenus[i].moveMe(0,0);
this.subMenus[i].show();
this.moving = true;
this.subMenus[i].slide(this.subMenus[i].radius * cos(degToRad((diff*i)+this.startAngle)), this.subMenus[i].radius * sin(degToRad((diff*i)+this.startAngle)), this.name + ".subMenus[" + i + "].showCaption();" + this.name + ".moving=false;" + this.name + ".state+=1;");
}
if(this.parent){
getObjectRef(this.parent.ref).style.filter = "alpha (opacity=33)";
getObjectRef(this.parent.ref).style.MozOpacity = "33%";
getObjectRef(this.parent.ref).className = "dotoff";
getObjectRef(this.parent.caption).style.filter = "alpha (opacity=33)";
getObjectRef(this.parent.caption).style.MozOpacity = "33%";
for(i=0;i<this.parent.subMenus.length;i++) {
getObjectRef(this.parent.subMenus[i].ref).style.filter = "alpha (opacity=66)";
getObjectRef(this.parent.subMenus[i].ref).style.MozOpacity = "66%";
getObjectRef(this.parent.subMenus[i].caption).style.filter = "alpha (opacity=66)";
getObjectRef(this.parent.subMenus[i].caption).style.MozOpacity = "66%"; }
if(this.parent.parent) {
for(i=0;i<this.parent.parent.subMenus.length;i++) {
getObjectRef(this.parent.parent.subMenus[i].ref).style.filter = "alpha (opacity=33)";
getObjectRef(this.parent.parent.subMenus[i].ref).style.MozOpacity = "33%";
getObjectRef(this.parent.parent.subMenus[i].ref).className = "dotoff";
getObjectRef(this.parent.parent.subMenus[i].caption).style.filter = "alpha (opacity=33)"; getObjectRef(this.parent.parent.subMenus[i].caption).style.MozOpacity = "33%";
}
getObjectRef(this.parent.parent.ref).style.MozOpacity = "33%";
getObjectRef(this.parent.parent.ref).style.MozOpacity = "33%";
getObjectRef(this.parent.parent.ref).className = "dotoff";
}
}
getObjectRef(this.ref).style.filter = "alpha (opacity=66)";
getObjectRef(this.caption).style.filter = "alpha (opacity=66)"; getObjectRef(this.ref).style.MozOpacity = "66%";
getObjectRef(this.caption).style.MozOpacity = "66%"; }
} }
this.collapse = function() {
var p = true;
p = !this.moving;
for(var i=0; i<this.subMenus.length;i++)
p = p && (this.subMenus[i].state==0) && (this.subMenus[i].moving==false);
if(p && this.subMenus.length > 0) {
for(var i=0;i<this.subMenus.length;i++){
this.subMenus[i].hideCaption();
this.moving = true;
this.subMenus[i].slide(0, 0, this.name + ".subMenus[" + i + "].hide();" + this.name + ".moving=false;" + this.name + ".state-=1;");
}
if(this.parent){
getObjectRef(this.parent.ref).style.filter = "alpha (opacity=66)";
getObjectRef(this.parent.ref).style.MozOpacity = "66%";
if(this.parent.subMenus.length != 0)
getObjectRef(this.parent.ref).className = "dot";
else
getObjectRef(this.parent.ref).className = "dotempty";
getObjectRef(this.parent.caption).style.filter = "alpha (opacity=66)";
getObjectRef(this.parent.caption).style.MozOpacity = "66%";
for(i=0;i<this.parent.subMenus.length;i++) {
getObjectRef(this.parent.subMenus[i].ref).style.filter = "alpha (opacity=100)";
getObjectRef(this.parent.subMenus[i].ref).style.MozOpacity = "100%";
if(this.parent.subMenus[i].subMenus.length != 0) getObjectRef(this.parent.subMenus[i].ref).className = "dot";
else
getObjectRef(this.parent.subMenus[i].ref).className = "dotempty";
getObjectRef(this.parent.subMenus[i].caption).style.filter = "alpha (opacity=100)"; getObjectRef(this.parent.subMenus[i].caption).style.MozOpacity = "100%";
}
if(this.parent.parent) {
for(i=0;i<this.parent.parent.subMenus.length;i++) {
getObjectRef(this.parent.parent.subMenus[i].ref).style.filter = "alpha (opacity=66)";
getObjectRef(this.parent.parent.subMenus[i].ref).style.MozOpacity = "66%";
if(this.parent.parent.subMenus[i].subMenus.length != 0)
getObjectRef(this.parent.parent.subMenus[i].ref).className = "dot";
else
getObjectRef(this.parent.parent.subMenus[i].ref).className = "dotempty";
getObjectRef(this.parent.parent.subMenus[i].caption).style.filter = "alpha (opacity=66)"; getObjectRef(this.parent.parent.subMenus[i].caption).style.MozOpacity = "66%";
}
}
}
getObjectRef(this.ref).style.filter = "alpha (opacity=100)";
getObjectRef(this.caption).style.filter = "alpha (opacity=100)"; getObjectRef(this.ref).style.MozOpacity = "100%";
getObjectRef(this.caption).style.MozOpacity = "100%";
}
}
this.collapseAll = function(except) {
for(var i=0;i<this.parent.subMenus.length;i++) {
if(this.parent.subMenus[i].name!=except && this.parent.subMenus[i].state==this.parent.subMenus[i].subMenus.length) {
this.parent.subMenus[i].collapse();
} }
}
this.toggle = function(e) {
if(document.all) id = window.event.srcElement;
else id = e.target;
var dot = eval(id.objRef);
if(dot.state==0 && !dot.moving) dot.expand();
else if(dot.state==dot.subMenus.length && !dot.moving) dot.collapse()
}
this.doAction = function(e) {
if(document.all) id = window.event.srcElement;
else id = e.target;
var dot = eval(id.objRef);
if(dot.action == "toggle") dot.toggle(e);
else eval(dot.action);
}
//change these if you want to change the events that trigger the actions
//==================================================
//getObjectRef(this.ref).onmousemove = this.toggle;
getObjectRef(this.ref).onmouseup = this.doAction;
this.slide = function(xx,yy,func) {
if(!func) func = "";
var px = this.parent.x();
var py = this.parent.y();
var x = xx - this.x() + px;
var y = yy - this.y() + py;
var d = sqrt(square(xx-this.x() + px) + square(yy-this.y() + py));
var v = d/8;
if(v<1) v = 1;
if( (Math.abs(x) < v) && (Math.abs(y) < v) ) {
moveMe(this.ref,xx + px,yy + py); if(func != "") eval(func);
} else { var a = round(atan(x,y));
dx = round(v * cos(degToRad(a)));
dy = round(v * sin(degToRad(a)));
this.moveBy(dx,dy);
setTimeout(this.name + ".slide(" + xx + "," + yy + ", '" + func + "');",10); }
}
// Preoading the windows filters.
if (menuCount==0 && document.all) document.all[this.ref].style.filter = "alpha (opacity=100)";
menuCount++;
return this;
}
// Math functions
//================
var pi = Math.PI;
function square(x) { return (x*x); }
function sqrt(x) { return Math.sqrt(x); }
function round(x) { return Math.round(x); }
function rand(x,y) { return (round(Math.random()*(y-x)) + x); }
function cos(x) { return Math.cos(x) }
function sin(x) { return Math.sin(x) }
function degToRad(x) { return ( x/(360/(2*pi)) ); }
function radToDeg(x) { return ( x*(360/(2*pi)) ); }
function atan(s,t) {
if( s == 0.0 && t > 0.0)
angle = 90.0;
else if(s == 0.0 && t < 0.0) angle = 270.0;
else if (s < 0.0 ) angle = 180.0 + radToDeg(Math.atan(t/s));
else if (s > 0.0 && t < 0.0)
angle = 360.0 + radToDeg(Math.atan(t/s));
else {
if(s==0.0) s=0.00001;
angle = radToDeg(Math.atan(t/s));
}
if(angle < 0.0) angle += 360.0;
return angle;
}
// make the menus and provide information on usage
//=====================================
// Um das Menu Ihren Vorstellungen entsprechend anzupassen, gehen Sie folgendermaßen vor:
//	- Editieren Sie die Styles .dot, .dotoff und .caption
//	- Fügen Sie das main menu mit folgendem Code hinzu
//		var [menu_name] = new menuObject("[menu_name]", [x position], [y position], [caption], [spacing between sub menus]);
//	- Fügen Sie die Submenus hinzu:
//		var [sub_menu] = [menu_name].addItem([caption],[action],[spacing]);
//	ODER
//		var [sub-sub_menu] = [sub_menu].addItem([caption],[action],[spacing]);
//	ODER
//		[menu_name].subMenus[x].addItem([caption],[action],[spacing]);
//	- wobei action ein String ist, der evaluiert wird, wenn ein Punkt angeklickt wird (NOTE spacing ist optional und entspricht, wenn leer gelassen dem (parent's value)/2 - der Defaultwert für das main menu item ist 400)
//	- Nachfolgend Extras:
//		+ menuItem.show()			- zeigt Menupunkt an
//		+ menuItem.showCaption()	- zeigt Menu's Caption an
//		+ menuItem.hide()
//		+ menuItem.hideCaption()
//		+ menuItem.startAngle = x	- Default ist 0 Grad, was bedeutet, daß das erste Submenu direkt rechts, die nachfolgenden Items im Uhrzeigersinn angezeigt werden
//		+ menuItem.setCaption("text")	- erlaubt, den Menutext (Caption) zu ändern
//		+ menuItem.expand()		- öffnet Submenus (wenn vorhanden)
//		+ menuItem.collapse()		- schließt ein SubItem (wenn eines geöffnet ist)
//		+ menuItem.moveMe(x,y)		- bewegt Menu zu den Koordinaten (x,y)
//		+ menuItem.moveBy(x,y)		- bewegt ein Menu um (x,y)-Pixels
//		+ menuItem.x() & menuItem.y()	- retrieve a menus coordinates
//====================================================================================
//get dimentions of the page
if(document.all) pageWidth = document.body.offsetWidth-20;
else pageWidth = innerWidth;
if(document.all) pageHeight = document.body.offsetHeight-4;
else pageHeight = innerHeight;
//Create main menu
var menu = new menuObject("menu",pageWidth/1.75,pageHeight/2,"<h3>Downloads",pageHeight/1.75);
menu.startAngle = -90;
//show menu and caption
menu.show();
menu.showCaption();
//Add submenus
//menu.addItem("Privat","window.open('http://programme.szuka.de')");
menu.addItem("Audio/Photo/Video","toggle");
menu.addItem("Desktop","toggle");
menu.addItem("Internet","toggle");
menu.addItem("Office","toggle");
menu.addItem("Sonstige","toggle");
menu.addItem("System","toggle");
menu.subMenus[0].addItem("CamStudio","window.open('http://tinyurl.com/33hg9y','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("Camtasia Studio","window.open('http://tinyurl.com/dgpwp3','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("CDBurnerXP","window.open('http://tinyurl.com/yonf37','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("Cover Commander","window.open('http://tinyurl.com/ovfd4d','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("Debut Video","window.open('http://tinyurl.com/ye4pmuz','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("DiscRipper","window.open('http://tinyurl.com/3ho6m8q','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("Free<br>Video Converter","window.open('http://tinyurl.com/2umppff','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("GIFOptimizer","window.open('http://tinyurl.com/ybvzzfw','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("SDP Downloader","window.open('http://tinyurl.com/35vz4','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("WMP LyricsPlugin","window.open('http://www.lyricsplugin.com','','width=800,height=450,scrollbars=yes')");
menu.subMenus[0].addItem("XMedia Recode","window.open('http://tinyurl.com/5g7rf2','','width=800,height=450,scrollbars=yes')");
menu.subMenus[1].addItem("CursorXP","window.open('http://cursorxp.pro.de','','width=800,height=450,scrollbars=yes')");
menu.subMenus[1].addItem("KKMenu","window.open('http://tinyurl.com/36qkk6u','','width=800,height=450,scrollbars=yes')");
menu.subMenus[1].addItem("ObjectDock","window.open('http://tinyurl.com/26frz','','width=800,height=450,scrollbars=yes')");
menu.subMenus[1].addItem("TellTime","window.open('http://tinyurl.com/772gx','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("FireFox Erweiterungen","window.open('http://tinyurl.com/394fqlj','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("FireSave","window.open('http://tinyurl.com/ydglpmg','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("FTPWatchdog","window.open('http://tinyurl.com/6s8c2o','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("Java","window.open('http://tinyurl.com/2br7la','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("TCP Optimizer","window.open('http://tinyurl.com/ex6r','','width=800,height=450,scrollbars=yes')");
menu.subMenus[2].addItem("WMP FirefoxPlugin","window.open('http://tinyurl.com/24c97a','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("AdobeReader","window.open('http://get.adobe.com/de/reader','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("CLCL (deutsch)","window.open('http://tinyurl.com/35rd5qb','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("FormFiller","window.open('http://tinyurl.com/3n7jq2','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("NitroPDF","window.open('http://www.nitropdf.com/de/','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("Notepad++","window.open('http://tinyurl.com/aqwm4','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("OfficeSounds","window.open('http://tinyurl.com/43ymzx','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("PDF24","window.open('http://de.pdf24.org','','width=800,height=450,scrollbars=yes')");
menu.subMenus[3].addItem("PDF-XChange Viewer","window.open('http://tinyurl.com/29muks9','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("Ahnenblatt","window.open('http://ahnenblatt.de','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("DVD-Cover Printmaster","window.open('http://tinyurl.com/64bq3tz','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("Family Tree Legends","window.open('http://tinyurl.com/337ywl','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("Ged2Web","window.open('http://wtoram.co.uk','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("KeePass","window.open('http://keepass.info','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("MyBible","window.open('mybible.php','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("SRManager","window.open('http://tinyurl.com/6zh5m28','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("Tidy UI","window.open('http://tinyurl.com/6gp5d','','width=800,height=450,scrollbars=yes')");
menu.subMenus[4].addItem("WinRAR","window.open('http://tinyurl.com/7l7o49','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("avast! Free Antivirus","window.open('http://tinyurl.com/2bu4s2j','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("TuneUp Utilities","window.open('http://tinyurl.com/4rwc4','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("UniversalExtractor","window.open('http://tinyurl.com/23asla','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("Unlocker","window.open('http://tinyurl.com/3tsodlk','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("WinOptimizer","window.open('http://tinyurl.com/3q65roj','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("WiseCleaner","window.open('http://tinyurl.com/34uml6','','width=800,height=450,scrollbars=yes')");
menu.subMenus[5].addItem("Wondershare Time Freeze","window.open('http://tinyurl.com/35gtcud','','width=800,height=450,scrollbars=yes')");
//-->
