id_partner = '';
 
 function show_div(id)
 { 
   var left;
   left = pageWidth() / 2 + 200;
   if(left < 700)
     left = 700;

   var top;
   top = document.getElementById('tbl').offsetHeight + 200;
   
   var name = navigator.appName;
   if (name == "Microsoft Internet Explorer")
   {
     if(id_partner == '')
     {
       document.getElementById(id).style.left = left;
       document.getElementById(id).style.top = top;
       document.getElementById('h_' + id).style.top = top + 15;
       document.getElementById('d_' + id).style.top = top + 30;
       document.getElementById(id).style.display = 'block';
       document.getElementById('h_' + id).style.left = left + 15;
       document.getElementById('h_' + id).style.display = 'block';
       document.getElementById('d_' + id).style.left = left + 15;
       document.getElementById('d_' + id).style.display = 'block';
       document.getElementById('dd_' + id).style.top = 0;
       
	   document.getElementById('h_' + id).style.height = 100;
	   document.getElementById('d_' + id).style.height = 100;
	   document.getElementById('dd_' + id).style.height = 100;
       id_partner = id;
     }
     else
     {     
       hide_div(id_partner);
         
       document.getElementById(id).style.left = left;
       document.getElementById(id).style.top = top;
       document.getElementById('h_' + id).style.top = top + 15;
       document.getElementById('d_' + id).style.top = top + 30;
       document.getElementById(id).style.display = 'block';
       document.getElementById('h_' + id).style.left = left + 15;
       document.getElementById('h_' + id).style.display = 'block';
       document.getElementById('d_' + id).style.left = left + 15;
       document.getElementById('d_' + id).style.display = 'block';
       
   	   document.getElementById('h_' + id).style.height = 100;
	   document.getElementById('d_' + id).style.height = 100;
	   
       if(id_partner != id)
         document.getElementById('dd_' + id).style.top = 0;

       id_partner = id;
     }
   }
   else
   {   
     left -= 10;
     
     if(id_partner == '')
     { 
       document.getElementById(id).setAttribute('style', 'display: block; PADDING-RIGHT: 5px; PADDING-LEFT: 15px; FILTER: alpha(opacity=20); LEFT: ' + left + 'px; PADDING-BOTTOM: 0px; WIDTH: 250px; PADDING-TOP: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 250px; BACKGROUND-COLOR: #949494; opacity: 0.20; moz-opacity: 0.20');
       left = left + 15;
       top = top + 12;
       document.getElementById('h_' + id).setAttribute('style', 'left: ' + left + 'px; display: block; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 15px;');
       top = top + 15;
       document.getElementById('d_' + id).setAttribute('style','display: block; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; LEFT: ' + left + 'px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 200px; overflow: hidden;');
       
       document.getElementById('dd_' + id).setAttribute('style', 'top: 0px;');
       
       id_partner = id;
     }
     else
     {     
       hide_div(id_partner);
         
       document.getElementById(id).setAttribute('style', 'display: block; PADDING-RIGHT: 5px; PADDING-LEFT: 15px; FILTER: alpha(opacity=20); LEFT: ' + left + 'px; PADDING-BOTTOM: 0px; WIDTH: 250px; PADDING-TOP: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 250px; BACKGROUND-COLOR: #949494; opacity: 0.20; moz-opacity: 0.20');
       left = left + 15;
       top = top + 12;
       document.getElementById('h_' + id).setAttribute('style', 'left: ' + left + 'px; display: block; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 15px;');
       top = top + 15;
       document.getElementById('d_' + id).setAttribute('style','display: block; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; LEFT: ' + left + 'px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; TOP: ' + top + 'px; HEIGHT: 200px; overflow: hidden;');
       
       if(id_partner != id)
         document.getElementById('dd_' + id).setAttribute('style', 'top: 0px;');

       id_partner = id;
     }
   }
 }

 function hide_div(id)
 { 
   var name = navigator.appName;
   if (name == "Microsoft Internet Explorer")
   {
     document.getElementById(id).style.display = 'none';
     document.getElementById('d_' + id).style.display = 'none';
     document.getElementById('h_' + id).style.display = 'none';
   }
   else
   {
     document.getElementById(id).setAttribute('style', 'display: none; PADDING-RIGHT: 5px; PADDING-LEFT: 15px; FILTER: alpha(opacity=20); PADDING-BOTTOM: 0px; WIDTH: 250px; PADDING-TOP: 0px; POSITION: absolute; HEIGHT: 300px; BACKGROUND-COLOR: #949494; opacity: 0.20; moz-opacity: 0.20');
     document.getElementById('h_' + id).setAttribute('style', 'display: none; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; HEIGHT: 12px;');
     document.getElementById('d_' + id).setAttribute('style','display: none; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; WIDTH: 220px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; POSITION: absolute; HEIGHT: 260px; overflow: hidden;');
   }   
 }
 
 function up(id)
 {
   var top;
   var height;
   var con_height;
   top = parseInt(document.getElementById('dd_' + id).style.top);
   
   if(top + 20 < 0)
     top = top + 20;
   else
     top = 0;

   var name = navigator.appName;
   if (name == "Microsoft Internet Explorer")
     document.getElementById('dd_' + id).style.top = top;
   else
     document.getElementById('dd_' + id).setAttribute('style', 'position: absolute; top: ' + top + 'px;');
 }

 function down(id)
 {   
   var top;
   var height;
   var con_height;
   top = parseInt(document.getElementById('dd_' + id).style.top);
   height = parseInt(document.getElementById('d_' + id).style.height);
   con_height = parseInt(document.getElementById('dd_' + id).offsetHeight);
   
   if(top - 20 + con_height > height)
     top = top - 20;
   else
   {
     if(con_height > height) 
       top = height - con_height;
     else
       top = 0;
   }
   
   var name = navigator.appName;
   if (name == "Microsoft Internet Explorer")
     document.getElementById('dd_' + id).style.top = top;
   else
     document.getElementById('dd_' + id).setAttribute('style', 'top: ' + top + 'px; position: absolute');
 }

 function resize()
 {
   if(id_partner != '')
   {
     var left;
     left = pageWidth() / 2 + 200;//document.body.clientWidth / 2 + 200;
     if(left < 700)
       left = 700;
     document.getElementById(id_partner).style.left = left;
     document.getElementById('h_' + id_partner).style.left = left + 15;
     document.getElementById('d_' + id_partner).style.left = left + 15;
   }
 }
 
 function pageWidth() {
   return window.innerWidth != null?
   window.innerWidth: document.documentElement &&
   document.documentElement.clientWidth ?
   document.documentElement.clientWidth:document.body != null?
   document.body.clientWidth:null;
  };



 onresize = resize;
