﻿var threadStartet = "";
var sectionNew = "";
function getContent(section)
{
    if (threadStartet != "")
      return;
    
    threadStartet = true;
    sectionNew = section;
    new Effect.Opacity('PanelContent', { from: 1, to: 0 });
    window.setTimeout("DoPostBack();", 700);
    
    var time = 2300;
    if (window.navigator.userAgent.indexOf("MSIE") == -1)
        time = 2500;
    window.setTimeout("LoadEffect();", time);
}

function DoPostBack()
{
    $get('PanelContent').style.display = 'none';   
    __doPostBack('ButtonFake',sectionNew);
}

function LoadEffect()
{
   window.setTimeout("threadEnd();", 500);
   new Effect.Opacity('PanelContent', { from: 0, to: 1 });
}    

function threadEnd()
{
   $get('PanelContent').style.display = 'inline';   
    threadStartet = "";
}

function getLanguage(language)
{
     __doPostBack('ButtonLang',language);
}    


window.onerror = function(){return false;}

var currentObj = '';
function OpenCloseDesc(obj)
{    
if (currentObj != '')     
if (currentObj != obj)   
if ($get(currentObj) != null)    
$get(currentObj).style.display = 'none';            

if ($get(obj).style.display == 'inline')        
$get(obj).style.display = 'none';    
else if ($get(obj).style.display == 'none')        
$get(obj).style.display = 'inline';            


currentObj = obj;}
