var IsSelect=false;

function FindImgLink()
{var A=document.getElementById("preimg"),B=document.getElementById("nxtimg");
if(A!=null){
$("preimg2").parentElement.href=A.parentElement;
}
else $("preimg2").style.display="none";
if(B!=null)$("nxtimg2").parentElement.href=B.parentElement;
else $("nxtimg2").style.display="none";
}
function startBorder(A){document.getElementById(A).childNodes[0].childNodes[0].style.border="solid 2px #9E0101"}
function endBorder(A){document.getElementById(A).childNodes[0].childNodes[0].style.border="solid 2px #000000"}

function nTabs(B,A)
{
    var C=document.getElementById(B).getElementsByTagName("li");
    for(i=0;i<2;i++)if(C[i].id==A.id)
    {
        document.getElementById(B+"_Title"+i).className="active";
        document.getElementById(B+"_Content"+i).style.display="block"
    }
    else
    {
        document.getElementById(B+"_Title"+i).className="normal";
        document.getElementById(B+"_Content"+i).style.display="none"
    }
}

function JustPage()
{
    setInterval(SetMenuPosition,50)
}

function SetMenuPosition()
{
    var A=document.getElementById("menuBar"),D=document.getElementById("pagepic");
    A.style.left=parseInt(D.clientWidth)/2-parseInt(A.clientWidth)/2+6+parseInt(GetLeft(D))+"px";
		
    var C=document.documentElement.clientHeight,B=document.documentElement.scrollTop;
    A.style.top=parseInt(C)+parseInt(B)-parseInt(A.clientHeight)+"px";
    A.style.display="block"
}

function GetLeft(A)
{
    var B=A.offsetLeft;
    while(A=A.offsetParent)B+=A.offsetLeft;
    return B
}

function JustDate()
{
    var A=parseInt(event.clientX),B=parseInt(event.clientY+document.body.scrollTop);
    document.getElementById("dateDiv").style.left=A-10+"px";
    document.getElementById("dateDiv").style.top=B-10+"px";
    ShowDate()
}
function ShowDate()
{
    document.getElementById("dateDiv").style.display="block"
}
function HiddenDate()
{
    if(!IsSelect)document.getElementById("dateDiv").style.display="none";
    IsSelect=false
}


function SetSelectValue(A)
{
    IsSelect=A
}


