
try {
// create span element so that HTMLElement is accessible
document.createElement('span');
HTMLElement.prototype.click = function () {
if (typeof this.onclick == 'function')
this.onclick({type: 'click'});
};
}
catch (e) {
//alert('click method for HTMLElement couldn\'t be added')
}
try {
// create a element so that HTMLAnchorElement is accessible
document.createElement('a');
HTMLElement.prototype.click = function () {
if (typeof this.onclick == 'function') {
if (this.onclick({type: 'click'}) && this.href)
window.open(this.href, this.target? this.target : '_self');
}
else if (this.href)
window.open(this.href, this.target? this.target : '_self');
};
}
catch (e) {
//alert('click method for HTMLAnchorElement couldn\'t be added')
}



function doload() {

for (i=1;i <= 11; i++){
d = document.getElementById("menuitem" + i);
if (d){
//alert(d.innerHTML);
//if (i < 8) {
v = 56; 
//}
//else 
//if (i < 9) {
//v = 46; }
//else
//{ v = 37;}
//h = Math.floor((v-d.offsetHeight) / 2);
//d.style.marginTop = h + "px";
//alert(h);
}

//setInterval('prog()',120);
}

}

function menuclick(parent) {
if (parent.firstChild.click) {
parent.firstChild.click(); }
}

function showmenu(t,id,levelx) {
//alert(t.offsetTop);
for(i=2;i<1000;i++) {
d = document.getElementById("smdv" + i + "_" + (levelx));
if (d) 
d.style.display = "none";
}

if (levelx < 2)
for(j=1;j<5;j++){
for(i=2;i<1000;i++) {
d = document.getElementById("smdv" + i + "_" + j);
if (d) 
d.style.display = "none";
}
}

//alert("smdv" + id + "_" + levelx);
if (t.id)
if (levelx > 1)
t.parentNode.style.display = "block";

d = document.getElementById("smdv" + id + "_" + levelx);
if (d) {
//d.style.top = "0px";
//d.style.left = "0px";
d.style.display = "block";

if (levelx > 1)
d.style.top = Math.round(22+parseInt(t.parentNode.offsetTop + t.offsetTop)-(parseInt(d.style.height)/2)) +"px";
else
d.style.top = Math.round(22+parseInt(t.offsetTop)-(parseInt(d.style.height)/2)) +"px";
d.style.left = (198*(levelx)) + "px";
//alert("smdv" + id + "_" + levelx);
// parseInt(d.style.height)
}
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function prog() {
if (typeof prog.n == 'undefined') prog.n = 0;
var z = '', d = document.getElementById('progressbar');
z = d.innerHTML;
if (z.length < 6)
z = z + '.';
else
z = '';
d.innerHTML = z;
}


