var h=0 , flag=0;
function show(){
document.getElementById("begin").style.visibility="visible";
}
function noshow(){
document.getElementById("begin").style.visibility="hidden";
}

function submenu(a){
document.getElementById(a).style.backgroundImage="url('images/dr_bckgr1.jpg')";
document.getElementById(a).style.backgroundRepeat="repeat-x";
}
function submenuback(a){
document.getElementById(a).style.backgroundImage="url('images/dr_bckgr.jpg')";
document.getElementById(a).style.backgroundRepeat="repeat-x";
}



function dom(obj,url){
if (flag==1)  return;
flag=1;
var x= obj.offsetLeft - 100;
var y = obj.offsetTop - 100;
thumb= document.createElement('div');
thumb.id="thumb";
thumb.style.opacity = (0); 
thumb.style.MozOpacity = (0); 
thumb.style.KhtmlOpacity = (0); 
thumb.style.filter = "alpha(opacity=0)"; 
thumb.style.top=y+"px";
thumb.style.left=x+"px";
h=0;
thumb.innerHTML="<div class=\"up\"></div><div class=\"middle\">	<img src=\""+url+"\" class=\"image\" />	</div><div class=\"down\"></div>";
addattr();
document.getElementById("header").appendChild(thumb);
fader(thumb);
}

function addattr(){
thumb.onclick = function h() {document.getElementById('header').removeChild(thumb); flag=0;}
}

function fader(object){
	var speed = Math.round(5); 
    var timer = 0; 
	var ob = object.style;
	for (i=0; i<101; ++i){
	
	setTimeout("fade(\"thumb\","+i+")", (timer*speed));
	++timer;
	}
	
}

function fade(id,opacity){
 var object = document.getElementById(id).style; 
   object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
   object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")";
}



