function menuOver(obj)
{obj.style.cssText="color:#cd9e40;background:#e2dddb;cursor:pointer;";}

function menuOut(obj)
{obj.style.cssText="color:white;background:none;cursor:none;";}

function menuClick(url)
{location.href=url;}
var currentDoc=-1;function switchDoc(obj,val)
{for(i=0;i<maxDoc;i++)
{if($('#first_doc_bg'+i)[0])
$('#first_doc_bg'+i)[0].className='first_doc_slides';$('#first_doc_sc'+i)[0].style.display='none';}
$('#first_doc_sc'+obj).fadeIn(900);if($('#first_doc_bg'+obj)[0])
$('#first_doc_bg'+obj)[0].className='slides_selected';}

function nextDoc()
{if(currentDoc<maxDoc-1)
currentDoc++;else
currentDoc=0;switchDoc(currentDoc,'block');}

function preDoc()
{if(currentDoc==0)
currentDoc=maxDoc-1;else
currentDoc--;switchDoc(currentDoc,'block');}

function playDocs(){nextDoc();if(maxDoc>1)
autoTimerID=window.setTimeout("playDocs()",timerSpeed);}

function stopDocs()
{
    if(maxDoc<=1)
    return;
    //clearTimeout(autoTimerID);
}

function resumeDocs(){if(maxDoc<=1)
return;clearTimeout(autoTimerID);autoTimerID=window.setTimeout("playDocs()",timerSpeed);}

function getMaxHeight(){if(maxDoc<=1)
return;var maxHeight=0;for(i=0;i<maxDoc;i++)
{$('#first_doc_sc'+i)[0].style.display="block";if($('#first_doc_sc'+i)[0].offsetHeight>maxHeight)
maxHeight=$('#first_doc_sc'+i)[0].offsetHeight;$('#first_doc_sc'+i)[0].style.display="none";}
for(i=0;i<maxDoc;i++)
$('#first_doc_sc'+i)[0].style.height=maxHeight;}

function SwitchDiv(CurrentSel,tabPrefix,tabAlign)
{
var maxHeight=0;
var tabCounter=1;
var buttonContainerID=1;//eval(tabPrefix+'BcontainerID');
var selectedClass=1;//eval(tabPrefix+'selectedClass');
var unSelectedClass=1;//eval(tabPrefix+'unSelectedClass');
var tabPositioning=1;//eval(tabPrefix+'Positioning');
var addtopPos=1;//eval(tabPrefix+'TopPos');
var tabPadding=1;//eval(tabPrefix+'TabPad');
if(!tabPositioning)
{
for(i=0;i<tabCounter;i++)
{
	var buttonHeight=$('#'+tabPrefix+'_tab_button'+i).height();
	if(buttonHeight>maxHeight)maxHeight=buttonHeight;
}
$('#'+buttonContainerID).css("height",maxHeight);for(i=0;i<tabCounter;i++)
{var thisbObj=$('#'+tabPrefix+'_tab_button'+i);var thisPos=0;for(n=0;n<i;n++){thisPos+=$('#'+tabPrefix+'_tab_button'+n).width();}
thisbObj.css(tabAlign,thisPos+(i+(i*tabPadding)));thisbObj.css("height",maxHeight);}
var contentMaxHeight=0;for(i=0;i<tabCounter;i++)
{var thisTabcontentOBJ=$('#'+tabPrefix+'_tab_content'+i+" table:only-child");var contentHeight=thisTabcontentOBJ.height();if(contentHeight>contentMaxHeight)
contentMaxHeight=contentHeight;}
for(i=0;i<tabCounter;i++)
$('#'+tabPrefix+'_tab_content'+i+" table:only-child").height(contentMaxHeight);
//eval(tabPrefix+'Positioning=true;'+tabPrefix+'maxHeight='+maxHeight+';');
}
var tabTopPos=1;//eval(tabPrefix+'maxHeight');
var selbtJQ=$('#'+tabPrefix+'_tab_button'+CurrentSel);selbtJQ.attr("class",selectedClass);selbtJQ.css("top",selbtJQ.height()-tabTopPos+addtopPos);$('#'+tabPrefix+'_tab_content'+CurrentSel).fadeIn(300);for(i=0;i<tabCounter;i++)
{if(i==CurrentSel)
continue;var buttonJQ=$('#'+tabPrefix+'_tab_button'+i);var ContentJQ=$('#'+tabPrefix+'_tab_content'+i);if(!buttonJQ||!ContentJQ)
continue;buttonJQ.attr("class",unSelectedClass);buttonJQ.css("top",0);ContentJQ.css("display","none");}}